1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #35058 -- Added support for measured geometries to GDAL LineString.

This commit is contained in:
David Smith
2024-01-25 12:55:45 +00:00
committed by Mariusz Felisiak
parent 41aaf5aafa
commit 1df8983aa3
5 changed files with 57 additions and 11 deletions

View File

@@ -936,6 +936,17 @@ coordinate transformation:
>>> OGRGeometry("LINESTRING (1 2 3,4 5 6)").z
[3.0, 6.0]
.. attribute:: m
.. versionadded:: 5.1
Returns a list of M coordinates in this line or ``None`` if the line does
not have M coordinates:
.. code-block:: pycon
>>> OGRGeometry("LINESTRING(0 1 2 10, 1 2 3 11, 2 3 4 12)").m
[10.0, 11.0, 12.0]
.. class:: Polygon

View File

@@ -78,10 +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.
* :class:`~django.contrib.gis.gdal.OGRGeometry`,
:class:`~django.contrib.gis.gdal.Point`, and
:class:`~django.contrib.gis.gdal.LineString` now support measured geometries
via the new :attr:`.OGRGeometry.is_measured` and ``m`` properties, and the
:meth:`.OGRGeometry.set_measured` method.
* :attr:`.OGRGeometry.centroid` is now available on all supported geometry
types.