That really doesn't accomplish much since the return value from st_centroid is a point, you will be getting back the same point without any guarantee that it is on the surface.
St_pointonsurface(the_geom) suffices for my use case as I need dynamic labelpoints from polygons clipped to a map extent. > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On > Behalf Of Gmail > Sent: Monday, May 04, 2009 11:28 AM > To: [email protected] > Subject: [postgis-users] Re: st_centroid Points not on Polygon > > > I hope that I'm not jumping in on the conversation, but this > has yet to fail me: > > <code> > insert into layer_centroids(the_geom, polygon_id) > select > ST_PointOnSurface(ST_Centroid(layer_polygons.the_geom)), > layer_polygons.polygon_id > from layer_polygons; > </code> > > My polygons consist of census boundaries and tracks. > > cheers, > dassouki > > _______________________________________________ > postgis-users mailing list [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
