diff options
| author | David Smith <smithdc@gmail.com> | 2024-01-17 06:48:45 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-01-18 10:48:40 +0100 |
| commit | cfacd69ab81c37564799a7b8a0a765e3c1f40941 (patch) | |
| tree | 2633d6af5f3690a7e5bd7ef98b18a136377b2d07 /docs | |
| parent | 12c71bff8300f5b1252dab099f4753dc86903fbd (diff) | |
Refs #35058 -- Added is_3d and set_3d() to OGRGeometry.
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` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
