> Ah yes, a classic case of RTFM. > > Is this acceptable behavior for this function? Could PostGIS deal with this > internally to do a post process st_pointonsurface when the centroid is not > within the polygon.
Yes, indeed, perfectly acceptable, as it corresponds to the mathematical definition of the centroid, or center of masses, that is not necessarily on the surface of the object. It is important, for other applications, that the result is truely the centroid. That's why pointOnSurface (often confused with centroid) was added, beside centroid. > > For now I guess I will just write a wrapper function for ( CASE WHEN > st_within(st_centroid(), poly) then st_centroid() else st_pointonsurface() > END ) > _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
