- Polygon / MultiPolygon — area-weighted centroid via
S2Polygon.getCentroid(). - LineString / MultiLineString — length-weighted centroid via
S2Polyline.getCentroid(). - Point / MultiPoint — mean of the unit vectors.
- GeographyCollection — recursive weighted sum across the children.
NULL when the centroid is undefined (empty geometry, or antipodal points whose unit vectors cancel).
Signatures
Parameters
Geography
required
The geography whose spherical centroid is returned.
Return type
The centroid as a Geography point, or
NULL when undefined.
