@@ -54,7 +54,7 @@ function GeoInterface.getgeom(::AbstractGeometryTrait, geom::Union{LineString,Li
5454 return _get_tuple_point (geom, seq, refs, i)
5555end
5656function GeoInterface. getgeom (:: AbstractGeometryTrait , geom:: Union{LineString,LinearRing} )
57- context = get_global_context ( )
57+ context = get_context (geom )
5858 seq = getCoordSeq (geom, context)
5959 n = getSize (seq, context) # Faster thatn `GI.ngeom(geom)` when we already have `seq`
6060 # Preallocate refse
@@ -65,7 +65,7 @@ function GeoInterface.getgeom(::AbstractGeometryTrait, geom::Union{LineString,Li
6565 return (_get_tuple_point (geom, seq, refs, i, context, hasz) for i in UInt32 (1 ): UInt32 (n))
6666end
6767
68- function _get_tuple_point (geom, seq, (x, y, z), i, context = get_global_context ( ), hasz= hasZ (geom, context))
68+ function _get_tuple_point (geom, seq, (x, y, z), i, context= get_context (geom ), hasz= hasZ (geom, context))
6969 if hasz
7070 GEOSCoordSeq_getXYZ_r (context, seq, i - UInt32 (1 ), x, y, z)
7171 return x[], y[], Z[]
@@ -74,7 +74,6 @@ function _get_tuple_point(geom, seq, (x, y, z), i, context = get_global_context(
7474 return x[], y[]
7575 end
7676end
77-
7877GeoInterface. getgeom (t:: AbstractPointTrait , geom:: PreparedGeometry ) = nothing
7978function GeoInterface. getgeom (:: PolygonTrait , geom:: Polygon , i:: Int )
8079 if i == 1
0 commit comments