Skip to content
Apache Sedona 1.9.0 is out now, featuring Spark 4.1 support, proj4sedona CRS transformation, Bing Tile functions, and more!

ST_Centroid

Introduction: Return the centroid point of A

ST_Centroid

Format: ST_Centroid (A: Geometry)

Return type: Geometry

Since: v1.5.0

Example:

SELECT ST_Centroid(ST_GeomFromWKT('MULTIPOINT(-1  0, -1 2, 7 8, 9 8, 10 6)'))

Output:

POINT (4.8 4.8)