Skip to content

Commit 7c50076

Browse files
authored
fix tests on GEOS 3.12 (#179)
We were testing setting and getting the Z coordinate of a 2D geometry. It seems that this now always returns NaN.
1 parent f48a5ce commit 7c50076

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/test_geos_functions.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ end
170170
@test LibGEOS.getSize(cs_) == 1
171171
@test LibGEOS.getDimensions(cs_) == 2
172172
@test LibGEOS.getCoordinates(cs_) == [[5.0, 3.0]]
173+
# z coordinate stays NaN for 2D geometry
174+
@test isnan(LibGEOS.getZ(cs_, 1))
175+
LibGEOS.setZ!(cs_, 1, 2.0)
176+
@test isnan(LibGEOS.getZ(cs_, 1))
173177

174178
cs_2 = LibGEOS.createCoordSeq([5.0, 3.0])
175179
@test LibGEOS.getSize(cs_2) == 1
@@ -186,7 +190,7 @@ end
186190
@test LibGEOS.getCoordinates(cs_3, 2) == [1.0, 2.0]
187191
@test LibGEOS.getCoordinates(cs_3, 3) == [1.0, 3.0]
188192

189-
193+
cs_ = LibGEOS.createCoordSeq(0, 0, 0)
190194
for i = 1:5
191195
x = i * 10.0
192196
y = i * 10.0 + 1.0

0 commit comments

Comments
 (0)