Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Returns the ST_Point value that is the mathematical centroid of the surface value.
If the surface is the empty set, returns NULL. Otherwise, returns the mathematical centroid of the surface.
The spatial reference system identifier of the result is the same as the spatial reference system of the surface-expression.
Returns the ST_Point value that is the mathematical centroid of the surface value. Note that this point will not necessarily
be a point on the surface.
This method can not be used with geometries in round-Earth spatial reference system.
SQL/MM (ISO/IEC 13249-3: 2006)
The following example returns the result Point (5 4.666667).
Point (5 4.666667)
SELECT TREAT( Shape as ST_Surface ).ST_Centroid()
FROM SpatialShapes WHERE ShapeID = 22