@@ -19,8 +19,8 @@ julia> GeometrySet([Ball((0.0, 0.0)), Ball((1.0, 1.0))])
1919
2020Geometries with different CRS will be projected to the CRS of the first geometry.
2121"""
22- struct GeometrySet{M<: Manifold ,C<: CRS ,G<: Geometry{M,C} } <: Domain{M,C}
23- geoms:: Vector{G}
22+ struct GeometrySet{M<: Manifold ,C<: CRS ,G<: Geometry{M,C} ,V <: AbstractVector{G} } <: Domain{M,C}
23+ geoms:: V
2424end
2525
2626# constructor with iterator of geometries
@@ -50,7 +50,7 @@ Base.vcat(d1::Domain, d2::GeometrySet) = GeometrySet(vcat(collect(d1), d2.geoms)
5050# SPECIAL CASE: POINT SET
5151# ------------------------
5252
53- const PointSet{M<: Manifold ,C<: CRS } = GeometrySet{M,C,Point{M,C}}
53+ const PointSet{M<: Manifold ,C<: CRS ,V <: AbstractVector{Point{M,C}} } = GeometrySet{M,C,Point{M,C},V }
5454
5555"""
5656 PointSet(points)
@@ -68,7 +68,7 @@ julia> PointSet([(1,2,3), (4,5,6)])
6868julia> PointSet((1,2,3), (4,5,6))
6969```
7070"""
71- PointSet (points:: AbstractVector{Point{M,C}} ) where {M<: Manifold ,C<: CRS } = PointSet {M,C} (points)
71+ PointSet (points:: AbstractVector{Point{M,C}} ) where {M<: Manifold ,C<: CRS } = PointSet {M,C,typeof(points) } (points)
7272PointSet (points:: Vararg{P} ) where {P<: Point } = PointSet (collect (points))
7373PointSet (coords:: AbstractVector{TP} ) where {TP<: Tuple } = PointSet (Point .(coords))
7474PointSet (coords:: Vararg{TP} ) where {TP<: Tuple } = PointSet (collect (coords))
0 commit comments