mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +00:00
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
This commit is contained in:
parent
9c6d7b4a67
commit
2005530920
4 changed files with 43 additions and 12 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue