[postgis-users] centroid calculation

Dylan Beaudette dylan.beaudette at gmail.com
Wed Jan 9 13:45:44 PST 2008


Hi,

I have noticed that the ST_centroid() function will compute _geometrically_ 
correct centroids, but will not always compute _logically_ correct centroids.

For example, given two polygons defining hillslope position such that one 
polygon defines the "ridge" and another defines the "slope". These two 
polygons are roughly concentric and therefore the geometric centroid of the 
outermost polygon is computed to exist somewhere in the innermost polygon.

Are there any known ways to make postgis return a logically correct centroid: 
i.e. in the presence of concentric polygons force the position the centroid 
to be within the correct polygon.

Thanks!

Dylan

-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341



More information about the postgis-users mailing list