@@ -4,7 +4,7 @@ using FactCheck
44function factcheck_equals (obj1:: Vector{Vector{Float64}} ,
55 obj2:: Vector{Vector{Float64}} ; tol= 1e-5 )
66 for (i,item) in enumerate (obj2)
7- @fact obj1[i] = > roughly (item, tol)
7+ @fact obj1[i] -- > roughly (item, tol)
88 end
99end
1010
@@ -23,49 +23,49 @@ function factcheck_equals(obj1::Vector{Vector{Vector{Vector{Float64}}}},
2323end
2424
2525pt = LibGEOS. Point (1.0 ,2.0 )
26- @fact GeoInterface. coordinates (pt) = > roughly ([1 ,2 ], 1e-5 )
27- @fact GeoInterface. geotype (pt) = > :Point
26+ @fact GeoInterface. coordinates (pt) -- > roughly ([1 ,2 ], 1e-5 )
27+ @fact GeoInterface. geotype (pt) -- > :Point
2828
2929pt = LibGEOS. Point (LibGEOS. geomFromWKT (" POINT EMPTY" ))
30- @fact GeoInterface. coordinates (pt) = > roughly ([], 1e-5 )
31- @fact GeoInterface. geotype (pt) = > :Point
30+ @fact GeoInterface. coordinates (pt) -- > roughly ([], 1e-5 )
31+ @fact GeoInterface. geotype (pt) -- > :Point
3232
3333mpt = LibGEOS. MultiPoint (LibGEOS. geomFromWKT (" MULTIPOINT(0 0, 10 0, 10 10, 11 10)" ))
3434factcheck_equals (GeoInterface. coordinates (mpt), Vector{Float64}[[0 ,0 ],[10 ,0 ],[10 ,10 ],[11 ,10 ]])
35- @fact GeoInterface. geotype (mpt) = > :MultiPoint
35+ @fact GeoInterface. geotype (mpt) -- > :MultiPoint
3636
3737coords = Vector{Float64}[[8 ,1 ],[9 ,1 ],[9 ,2 ],[8 ,2 ]]
3838ls = LibGEOS. LineString (coords)
3939factcheck_equals (GeoInterface. coordinates (ls), coords)
40- @fact GeoInterface. geotype (ls) = > :LineString
40+ @fact GeoInterface. geotype (ls) -- > :LineString
4141
4242ls = LibGEOS. LineString (LibGEOS. geomFromWKT (" LINESTRING EMPTY" ))
4343factcheck_equals (GeoInterface. coordinates (ls), Vector{Float64}[[]])
44- @fact GeoInterface. geotype (ls) = > :LineString
44+ @fact GeoInterface. geotype (ls) -- > :LineString
4545
4646mls = LibGEOS. MultiLineString (LibGEOS. geomFromWKT (" MULTILINESTRING ((5 0, 10 0), (0 0, 5 0))" ))
4747factcheck_equals (GeoInterface. coordinates (mls), Vector{Vector{Float64}}[Vector{Float64}[[5 ,0 ],[0 ,0 ],[5 ,0 ]]])
48- @fact GeoInterface. geotype (mls) = > :MultiLineString
48+ @fact GeoInterface. geotype (mls) -- > :MultiLineString
4949
5050coords = Vector{Float64}[[8 ,1 ],[9 ,1 ],[9 ,2 ],[8 ,2 ],[8 ,1 ]]
5151lr = LibGEOS. LinearRing (coords)
5252factcheck_equals (GeoInterface. coordinates (lr), coords)
53- @fact GeoInterface. geotype (lr) = > :LineString
53+ @fact GeoInterface. geotype (lr) -- > :LineString
5454
5555coords = Vector{Vector{Float64}}[Vector{Float64}[[0 ,0 ],[10 ,0 ],[10 ,10 ],[0 ,10 ],[0 ,0 ]],
5656 Vector{Float64}[[1 ,8 ],[2 ,8 ],[2 ,9 ],[1 ,9 ],[1 ,8 ]],
5757 Vector{Float64}[[8 ,1 ],[9 ,1 ],[9 ,2 ],[8 ,2 ],[8 ,1 ]]]
5858polygon = LibGEOS. Polygon (coords)
5959factcheck_equals (GeoInterface. coordinates (polygon), coords)
60- @fact GeoInterface. geotype (polygon) = > :Polygon
60+ @fact GeoInterface. geotype (polygon) -- > :Polygon
6161
6262polygon = LibGEOS. Polygon (LibGEOS. geomFromWKT (" POLYGON EMPTY" ))
6363factcheck_equals (GeoInterface. coordinates (polygon), Vector{Vector{Float64}}[[]])
64- @fact GeoInterface. geotype (polygon) = > :Polygon
64+ @fact GeoInterface. geotype (polygon) -- > :Polygon
6565
6666multipolygon = LibGEOS. MultiPolygon (LibGEOS. geomFromWKT (" MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))" ))
6767factcheck_equals (GeoInterface. coordinates (multipolygon), Vector{Vector{Vector{Float64}}}[Vector{Vector{Float64}}[Vector{Float64}[[0 ,0 ],[0 ,10 ],[10 ,10 ],[10 ,0 ],[0 ,0 ]]]])
68- @fact GeoInterface. geotype (multipolygon) = > :MultiPolygon
68+ @fact GeoInterface. geotype (multipolygon) -- > :MultiPolygon
6969
7070geomcollection = LibGEOS. GeometryCollection (LibGEOS. geomFromWKT (" GEOMETRYCOLLECTION (POLYGON ((8 2, 10 10, 8.5 1, 8 2)), POLYGON ((7 8, 10 10, 8 2, 7 8)), POLYGON ((3 8, 10 10, 7 8, 3 8)), POLYGON ((2 2, 8 2, 8.5 1, 2 2)), POLYGON ((2 2, 7 8, 8 2, 2 2)), POLYGON ((2 2, 3 8, 7 8, 2 2)), POLYGON ((0.5 9, 10 10, 3 8, 0.5 9)), POLYGON ((0.5 9, 3 8, 2 2, 0.5 9)), POLYGON ((0 0, 2 2, 8.5 1, 0 0)), POLYGON ((0 0, 0.5 9, 2 2, 0 0)))" ))
7171collection = GeoInterface. geometries (geomcollection)
@@ -80,7 +80,7 @@ coords = Vector{Vector{Vector{Float64}}}[Vector{Vector{Float64}}[Vector{Float64}
8080 Vector{Vector{Float64}}[Vector{Float64}[[0.0 ,0.0 ],[ 2.0 , 2.0 ],[8.5 ,1.0 ],[0.0 ,0.0 ]]],
8181 Vector{Vector{Float64}}[Vector{Float64}[[0.0 ,0.0 ],[ 0.5 , 9.0 ],[2.0 ,2.0 ],[0.0 ,0.0 ]]]]
8282factcheck_equals (map (GeoInterface. coordinates,collection),coords)
83- @fact GeoInterface. geotype (geomcollection) = > :GeometryCollection
83+ @fact GeoInterface. geotype (geomcollection) -- > :GeometryCollection
8484
8585geomcollection = LibGEOS. GeometryCollection (LibGEOS. geomFromWKT (" GEOMETRYCOLLECTION(MULTIPOINT(0 0, 0 0, 1 1),LINESTRING(1 1, 2 2, 2 2, 0 0),POLYGON((5 5, 0 0, 0 2, 2 2, 5 5)))" ))
8686collection = GeoInterface. geometries (geomcollection)
@@ -90,11 +90,11 @@ coords = Vector[Vector{Float64}[[0.0,0.0],[0.0,0.0],[1.0,1.0]],
9090geotypes = [:MultiPoint ,:LineString ,:Polygon ]
9191for (i,item) in enumerate (collection)
9292 factcheck_equals (GeoInterface. coordinates (item), coords[i])
93- @fact GeoInterface. geotype (item) = > geotypes[i]
93+ @fact GeoInterface. geotype (item) -- > geotypes[i]
9494end
95- @fact GeoInterface. geotype (geomcollection) = > :GeometryCollection
95+ @fact GeoInterface. geotype (geomcollection) -- > :GeometryCollection
9696
9797geomcollection = LibGEOS. GeometryCollection (LibGEOS. geomFromWKT (" GEOMETRYCOLLECTION EMPTY" ))
9898collection = GeoInterface. geometries (geomcollection)
99- @fact length (collection) = > 0
100- @fact GeoInterface. geotype (geomcollection) = > :GeometryCollection
99+ @fact length (collection) -- > 0
100+ @fact GeoInterface. geotype (geomcollection) -- > :GeometryCollection
0 commit comments