Juergen Lorenz Simon wrote: > Hi, > > I have a nut to crack and i'm not finding anything suitable in the > PostGIS documentation. The problem is as follows: > > I have a POLYGON G and a POINT P. I'd like to find the closest point to > P on G (not in, ON). Is there a quick way of doing this with the > build-in functions? Or is there some plsql routine I can use?
Hi, You could take the various rings of your polygon with ST_DumpRings, find the closest point with ST_Line_Locate_Point and ST_Line_Interpolate_Point. > PS: Coming to think of it: is there some open source repository for > PostGIS code? There is the wiki : http://trac.osgeo.org/postgis/wiki/UsersWikiMain -- Maxime _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
