Skip to content

Commit ec2ccff

Browse files
smithdc1jacobtylerwalls
authored andcommitted
Refs #36036 -- Added note about z argument in GEOSCoordSeq.__init__().
When dropping support for GEOS 3.13 the `GEOSCoordSeq_hasZ()` function will be available on all supported GEOS versions. Instead of the parent geometry providing the z dimension we can reply on GEOSCoordSeq functions directly. This will follow a similar implementation to what was done for the M dimension. While it could be adopted earlier we would need to guess that geometries with 3 dimensions on GEOS < 3.14 are Z geometries.
1 parent 218077d commit ec2ccff

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

django/contrib/gis/geos/coordseq.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class GEOSCoordSeq(GEOSBase):
2020

2121
def __init__(self, ptr, z=False):
2222
"Initialize from a GEOS pointer."
23+
# TODO when dropping support for GEOS 3.13 the z argument can be
24+
# deprecated in favor of using the GEOS function GEOSCoordSeq_hasZ.
2325
if not isinstance(ptr, CS_PTR):
2426
raise TypeError("Coordinate sequence should initialize with a CS_PTR.")
2527
self._ptr = ptr

0 commit comments

Comments
 (0)