MCPcopy
hub / github.com/django/django / centroid

Method centroid

django/contrib/gis/gdal/geometries.py:584–589  ·  view source on GitHub ↗

Return the centroid (a Point) of this Polygon.

(self)

Source from the content-addressed store, hash-verified

582
583 @property
584 def centroid(self):
585 """Return the centroid (a Point) of this Polygon."""
586 # The centroid is a Point, create a geometry for this.
587 p = OGRGeometry(OGRGeomType("Point"))
588 capi.get_centroid(self.ptr, p.ptr)
589 return p
590
591
592# The subclasses for OGR Geometry.

Callers

nothing calls this directly

Calls 2

OGRGeomTypeClass · 0.90
OGRGeometryClass · 0.85

Tested by

no test coverage detected