[postgis-users] Distance from point inside polygon to closest edge of the polygon

Chris Story kc5hhq at gmail.com
Tue Jul 31 04:40:37 PDT 2007


Michael,
ExteriorRing doesn't seem to work. Maybe this is due to the_geom being a
multi-polygon? This returns something, but I'm not sure if it is correct.
Could anyone tell me?


SELECT distance(transform(GeomFromText( 'POINT(-81.0571731786471
28.0183613937886 )', 4326 ),utmzone(GeomFromText( 'POINT(-81.0571731786471
28.0183613937886 )', 4326 ))),
boundary(transform(the_geom,utmzone(GeomFromText( 'POINT(-81.0571731786471
28.0183613937886)', 4326 ))))) FROM "S_FIRM_PAN" where gid = 743;

On 7/30/07, Michael Fuhr <mike at fuhr.org> wrote:
>
> On Mon, Jul 30, 2007 at 08:43:34PM -0500, Chris Story wrote:
> > I am attempting to determine the distance from a point inside a polygon
> > to the edge of the polygon. How can I achieve this?
>
> Have you tried distance(point_geom, exteriorring(poly_geom))?
>
> --
> Michael Fuhr
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



-- 
Thank you,

Chris Story
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070731/887f9d50/attachment.html>


More information about the postgis-users mailing list