summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2024-01-23 08:12:03 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2024-01-25 08:59:16 +0100
commit3f6d939c62efd967f548c27a265748cc2cc47ca5 (patch)
tree012129ff2d0fd068562880d08a6867ca838815c5 /docs
parenta702a0773dee8ea74119a8e0edf7ecc5d0ee4a1a (diff)
Refs #35058 -- Added support for measured geometries to GDAL Point.
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/gis/gdal.txt33
-rw-r--r--docs/releases/5.1.txt5
2 files changed, 38 insertions, 0 deletions
diff --git a/docs/ref/contrib/gis/gdal.txt b/docs/ref/contrib/gis/gdal.txt
index 4b7a706fc4..f6e9ef0964 100644
--- a/docs/ref/contrib/gis/gdal.txt
+++ b/docs/ref/contrib/gis/gdal.txt
@@ -581,6 +581,27 @@ coordinate transformation:
>>> p.wkt
"POINT (1 2)"
+ .. attribute:: is_measured
+
+ .. versionadded:: 5.1
+
+ A boolean indicating if this geometry has M coordinates.
+
+ .. method:: set_measured(value)
+
+ .. versionadded:: 5.1
+
+ A method to add or remove the M coordinate dimension.
+
+ .. code-block:: pycon
+
+ >>> p = OGRGeometry("POINT (1 2)")
+ >>> p.is_measured
+ False
+ >>> p.set_measured(True)
+ >>> p.wkt
+ "POINT M (1 2 0)"
+
.. attribute:: geom_count
Returns the number of elements in this geometry:
@@ -864,6 +885,18 @@ coordinate transformation:
>>> OGRGeometry("POINT (1 2 3)").z
3.0
+ .. attribute:: m
+
+ .. versionadded:: 5.1
+
+ Returns the M coordinate of this point, or ``None`` if the Point does not
+ have an M coordinate:
+
+ .. code-block:: pycon
+
+ >>> OGRGeometry("POINT ZM (1 2 3 4)").m
+ 4.0
+
.. class:: LineString
.. attribute:: x
diff --git a/docs/releases/5.1.txt b/docs/releases/5.1.txt
index 9e8ff8c049..463551e85c 100644
--- a/docs/releases/5.1.txt
+++ b/docs/releases/5.1.txt
@@ -78,6 +78,11 @@ Minor features
* The new :meth:`.OGRGeometry.set_3d` method allows addition and removal of the
``Z`` coordinate dimension.
+* :class:`~django.contrib.gis.gdal.OGRGeometry` and
+ :class:`~django.contrib.gis.gdal.Point` now support measured geometries
+ via the new :attr:`.OGRGeometry.is_measured` and :attr:`.Point.m` properties,
+ and the :meth:`.OGRGeometry.set_measured` method.
+
:mod:`django.contrib.messages`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~