Skip to content

Commit c614496

Browse files
committed
return tuple points from GeoInterface methods
1 parent ad29f68 commit c614496

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/geo_interface.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,14 @@ end
6767

6868
function _get_tuple_point(geom, seq, (x, y, z), i, context = get_global_context(), hasz=hasZ(geom, context))
6969
if hasz
70-
GC.@preserve x y z begin
71-
GEOSCoordSeq_getXYZ_r(context, seq, i - UInt32(1), x, y, z)
72-
end
70+
GEOSCoordSeq_getXYZ_r(context, seq, i - UInt32(1), x, y, z)
7371
return x[], y[], Z[]
7472
else
75-
GC.@preserve x y begin
76-
GEOSCoordSeq_getXY_r(context, seq, i - UInt32(1), x, y)
77-
end
73+
GEOSCoordSeq_getXY_r(context, seq, i - UInt32(1), x, y)
7874
return x[], y[]
7975
end
8076
end
77+
8178
GeoInterface.getgeom(t::AbstractPointTrait, geom::PreparedGeometry) = nothing
8279
function GeoInterface.getgeom(::PolygonTrait, geom::Polygon, i::Int)
8380
if i == 1

0 commit comments

Comments
 (0)