[postgis-users] Nearest Neighbour on a polygon gemeotry to a given point
Nicklas Avén
nicklas.aven at jordogskog.no
Tue Sep 7 07:30:40 PDT 2010
hi
take a look at ST_Shortestline and ST_closestpoint if you have version 1.5 of postgis.
they will do what you want directly on the polygon.
HTH
Nicklas
2010-09-07 David Potts wrote:
>I have a series of x/y values that represent towns and a coastline that
>that is encoded as a Polygon.
>
>I want to return the nearest point on the polygon to a town. I have seen
>the item
>http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_nearest_neighbor_generic
>
>Which seems to be fine if you both objects that your are searching are
>point data or have a centroid of some type.
>
>What is the best solution, turn my coastal outline polygon in to a series
>of x/y values and use the solution from postgis_nearest_neighbor_generic,
>or is there some better way?
>
>regards
>
>
>Dave.
>
>--
>Any views expressed in this message are those of the individual sender,
>except where the sender specifically states them to be the views of the
>Pinan Software
>
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100907/49d8d80e/attachment.html>
More information about the postgis-users
mailing list