summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2025-12-07 07:59:22 +0000
committerJacob Walls <jacobtylerwalls@gmail.com>2026-02-09 08:44:08 -0500
commitec2ccff9a512adc715c5fc620bbe80790857b147 (patch)
tree35705a1dc7612ec79c2c3ef9a9af0f998ae09161
parent218077d944e5e57a560f256034f5c4f13e77ab14 (diff)
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.
-rw-r--r--django/contrib/gis/geos/coordseq.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/gis/geos/coordseq.py b/django/contrib/gis/geos/coordseq.py
index 042f707dd2..febeeebfa3 100644
--- a/django/contrib/gis/geos/coordseq.py
+++ b/django/contrib/gis/geos/coordseq.py
@@ -20,6 +20,8 @@ class GEOSCoordSeq(GEOSBase):
def __init__(self, ptr, z=False):
"Initialize from a GEOS pointer."
+ # TODO when dropping support for GEOS 3.13 the z argument can be
+ # deprecated in favor of using the GEOS function GEOSCoordSeq_hasZ.
if not isinstance(ptr, CS_PTR):
raise TypeError("Coordinate sequence should initialize with a CS_PTR.")
self._ptr = ptr