ST_pointonsurface() will return a point that is guaranteed to be on the polygon. I believe that this point is the point that is at a maximum distance from any edge. This may be more useful for your case than a centroid. There is no such thing as a logically correct "centroid", there is only what a centroid *is* and what it is may not be on the surface of a polygon.
On Jan 9, 2008 3:45 PM, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > 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 > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- ************************************ David William Bitner
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
