diff options
| author | David Smith <smithdc@gmail.com> | 2024-01-28 08:41:25 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-01-28 14:40:19 +0100 |
| commit | 2005530920e7c290bb1cf7d9ada155250faa81ad (patch) | |
| tree | 00951f85dbd3d697440442008d61de3eb17f36e1 /docs | |
| parent | 9c6d7b4a678b7bbc6a1a14420f686162ba9016f5 (diff) | |
Refs #35058 -- Made centroid available on all geometry types.
Centroid is available on all geometry types since GDAL 1.8.0.
Previously it was restricted to Polygon.
https://gdal.org/doxygen/classOGRGeometry.html#a91787f669b2a148169667e270e7e40df
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/gis/gdal.txt | 13 | ||||
| -rw-r--r-- | docs/releases/5.1.txt | 3 |
2 files changed, 12 insertions, 4 deletions
diff --git a/docs/ref/contrib/gis/gdal.txt b/docs/ref/contrib/gis/gdal.txt index f6e9ef0964..be6e738160 100644 --- a/docs/ref/contrib/gis/gdal.txt +++ b/docs/ref/contrib/gis/gdal.txt @@ -839,6 +839,15 @@ coordinate transformation: Returns the region consisting of the union of this geometry and the other, as a new :class:`OGRGeometry` object. + .. attribute:: centroid + + Returns a :class:`Point` representing the centroid of this geometry. + + .. versionchanged:: 5.1 + + ``centroid`` was promoted from a :class:`.Polygon` only attribute to + being available on all geometry types. + .. attribute:: tuple Returns the coordinates of a point geometry as a tuple, the @@ -939,10 +948,6 @@ coordinate transformation: An alias for :attr:`shell`. - .. attribute:: centroid - - Returns a :class:`Point` representing the centroid of this polygon. - .. class:: GeometryCollection .. method:: add(geom) diff --git a/docs/releases/5.1.txt b/docs/releases/5.1.txt index 463551e85c..34ef350afd 100644 --- a/docs/releases/5.1.txt +++ b/docs/releases/5.1.txt @@ -83,6 +83,9 @@ Minor features via the new :attr:`.OGRGeometry.is_measured` and :attr:`.Point.m` properties, and the :meth:`.OGRGeometry.set_measured` method. +* :attr:`.OGRGeometry.centroid` is now available on all supported geometry + types. + :mod:`django.contrib.messages` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
