[postgis-users] need a point in a polygon like centroid but in the polygon

Larry Reeder lnreeder at gmail.com
Thu Dec 8 18:59:39 PST 2011


I think what you're looking for is ST_PointOnSurface:
http://www.postgis.org/docs/ST_PointOnSurface.html

But be aware that this may generate a point on the edge of the
polygon, but not inside it, so that ST_Intersect is true, but
ST_Within fails.

     -Larry

On Thu, Dec 8, 2011 at 7:47 PM, Stephen Woodbridge
<woodbri at swoodbridge.com> wrote:
> Hi all,
>
> I thought we had a function that would give a point like a centroid, but one
> the is in the polygon. Maybe someone posted a function for that, but my
> google-foo is not strong tonight!
>
> Any ideas?
>
> Thanks,
>  -Steve
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list