From ec2ccff9a512adc715c5fc620bbe80790857b147 Mon Sep 17 00:00:00 2001 From: David Smith Date: Sun, 7 Dec 2025 07:59:22 +0000 Subject: 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. --- django/contrib/gis/geos/coordseq.py | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.3