[postgis-users] Corner coordinates from Geometry

Kevin Neufeld kneufeld at refractions.net
Tue Nov 24 09:38:47 PST 2009


Maxime van Noppen wrote:
> Paul Ramsey wrote:
>> Use ST_Centroid() then. It's just the mid-point of the bbox, so it's
>> fast to calculate.
> 
> It might be outside the polygon though.
> 

In which case, if it matters, use ST_PointOnSurface().

Paul, just a clarification, I believe centroid calculates the geometric centre of a geoemtry or "centre of mass" and not 
the mid-point of the bbox.  Here are a few pictorial examples:
http://postgis.org/documentation/manual-1.5SVN/ST_Centroid.html

-- Kevin



More information about the postgis-users mailing list