165
165
p1 = Point (2.2 , 3.6 )
166
166
p2 = [p, p1]
167
167
@test coordinates (p2) == p2
168
- @test pm. rest === (a= 1 , b= 2 )
169
- @test pm. data === p
170
- @test propertynames (pm) == (:data , :a , :b )
168
+ @test pm. meta === (a= 1 , b= 2 )
169
+ @test pm. main === p
170
+ @test propertynames (pm) == (:main , :a , :b )
171
171
@test GeometryBasics. metafree (pm) == p
172
172
@test GeometryBasics. meta (pm) == (a = 1 , b = 2 )
173
173
end
@@ -176,19 +176,19 @@ end
176
176
p = collect (Point {2, Float64} (x, x+ 1 ) for x in 1 : 5 )
177
177
@test p isa AbstractVector
178
178
mpm = Feature (MultiPoint (p); a= 1 , b= 2 )
179
- @test coordinates (mpm. data ) == Point{2 , Float64}[(x, x+ 1 ) for x in 1 : 5 ]
180
- @test mpm. rest === (a= 1 , b= 2 )
181
- @test mpm. data == p
182
- @test propertynames (mpm) == (:data , :a , :b )
179
+ @test coordinates (mpm. main ) == Point{2 , Float64}[(x, x+ 1 ) for x in 1 : 5 ]
180
+ @test mpm. meta === (a= 1 , b= 2 )
181
+ @test mpm. main == p
182
+ @test propertynames (mpm) == (:main , :a , :b )
183
183
@test GeometryBasics. metafree (mpm) == p
184
184
@test GeometryBasics. meta (mpm) == (a = 1 , b = 2 )
185
185
end
186
186
187
187
@testset " Feature{LineString}" begin
188
188
linestring = Feature (LineString (Point{2 , Int}[(10 , 10 ), (20 , 20 ), (10 , 40 )]), a = 1 , b = 2 )
189
189
@test linestring isa Feature
190
- @test linestring. rest === (a = 1 , b = 2 )
191
- @test propertynames (linestring) == (:data , :a , :b )
190
+ @test linestring. meta === (a = 1 , b = 2 )
191
+ @test propertynames (linestring) == (:main , :a , :b )
192
192
@test GeometryBasics. metafree (linestring) == LineString (Point{2 , Int}[(10 , 10 ), (20 , 20 ), (10 , 40 )])
193
193
@test GeometryBasics. meta (linestring) == (a = 1 , b = 2 )
194
194
end
199
199
multilinestring = MultiLineString ([linestring1, linestring2])
200
200
multilinestringmeta = Feature (MultiLineString ([linestring1, linestring2]); boundingbox = Rect (1.0 , 1.0 , 2.0 , 2.0 ))
201
201
@test multilinestringmeta isa Feature
202
- @test multilinestringmeta. rest === (boundingbox = Rect (1.0 , 1.0 , 2.0 , 2.0 ),)
203
- @test multilinestringmeta. data == multilinestring
204
- @test propertynames (multilinestringmeta) == (:data , :boundingbox )
202
+ @test multilinestringmeta. meta === (boundingbox = Rect (1.0 , 1.0 , 2.0 , 2.0 ),)
203
+ @test multilinestringmeta. main == multilinestring
204
+ @test propertynames (multilinestringmeta) == (:main , :boundingbox )
205
205
@test GeometryBasics. metafree (multilinestringmeta) == multilinestring
206
206
@test GeometryBasics. meta (multilinestringmeta) == (boundingbox = GeometryBasics. HyperRectangle {2,Float64} ([1.0 , 1.0 ], [2.0 , 2.0 ]),)
207
207
end
224
224
@test hasproperty (mesh, :normals )
225
225
@test mesh. stress == stress
226
226
@test mesh. normals == normals
227
- @test GeometryBasics. faces (mesh. data ) == tfaces
228
- @test propertynames (mesh) == (:data , :normals , :stress )
227
+ @test GeometryBasics. faces (mesh. main ) == tfaces
228
+ @test propertynames (mesh) == (:main , :normals , :stress )
229
229
end
230
230
end
231
231
end
617
617
618
618
@test nameof (eltype (feat)) == :Feature
619
619
@test eltype (sa) === Feature{Any,(:country_states , :rainfall ),Tuple{Any,Float64}}
620
- @test propertynames (sa) === (:data , :country_states , :rainfall )
620
+ @test propertynames (sa) === (:main , :country_states , :rainfall )
621
621
@test getproperty (sa, :country_states ) isa Array{Any}
622
- @test getproperty (sa, :data ) == geom
622
+ @test getproperty (sa, :main ) == geom
623
623
end
624
624
625
625
@testset " Tests from GeometryTypes" begin
0 commit comments