diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/gis/gdal.txt | 21 | ||||
| -rw-r--r-- | docs/releases/5.1.txt | 6 |
2 files changed, 27 insertions, 0 deletions
diff --git a/docs/ref/contrib/gis/gdal.txt b/docs/ref/contrib/gis/gdal.txt index c0221a17a9..c98c76cd10 100644 --- a/docs/ref/contrib/gis/gdal.txt +++ b/docs/ref/contrib/gis/gdal.txt @@ -556,6 +556,27 @@ coordinate transformation: Returns or sets the coordinate dimension of this geometry. For example, the value would be 2 for two-dimensional geometries. + .. attribute:: is_3d + + .. versionadded:: 5.1 + + A boolean indicating if this geometry has Z coordinates. + + .. method:: set_3d(value) + + .. versionadded:: 5.1 + + A method that adds or removes the Z coordinate dimension. + + .. code-block:: pycon + + >>> p = OGRGeometry("POINT (1 2 3)") + >>> p.is_3d + True + >>> p.set_3d(False) + >>> p.wkt + "POINT (1 2)" + .. attribute:: geom_count Returns the number of elements in this geometry: diff --git a/docs/releases/5.1.txt b/docs/releases/5.1.txt index f8393303be..be609cea7f 100644 --- a/docs/releases/5.1.txt +++ b/docs/releases/5.1.txt @@ -72,6 +72,12 @@ Minor features * :class:`~django.contrib.gis.measure.Area` now supports the ``ha`` unit. +* The new :attr:`.OGRGeometry.is_3d` attribute allows checking if a geometry + has a ``Z`` coordinate dimension. + +* The new :meth:`.OGRGeometry.set_3d` method allows addition and removal of the + ``Z`` coordinate dimension. + :mod:`django.contrib.messages` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
