<html>
<head>
</head>
<body>hi<br />
<br />
take a look at ST_Shortestline and ST_closestpoint if you have version 1.5 of postgis. <br />
they will do what you want directly on the polygon.<br />
HTH<br />
Nicklas<br />
<br />
2010-09-07 David Potts wrote:<br />
<br />
<br />
>I have a series of x/y values that represent towns and a coastline that<br />
>that is encoded as a Polygon.<br />
><br />
>I want to return the nearest point on the polygon to a town. I have seen<br />
>the item<br />
>http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_nearest_neighbor_generic<br />
><br />
>Which seems to be fine if you both objects that your are searching are<br />
>point data or have a centroid of some type.<br />
><br />
>What is the best solution, turn my coastal outline polygon in to a series<br />
>of x/y values and use the solution from postgis_nearest_neighbor_generic,<br />
>or is there some better way?<br />
><br />
>regards<br />
><br />
><br />
>Dave.<br />
><br />
>-- <br />
>Any views expressed in this message are those of the individual sender,<br />
>except where the sender specifically states them to be the views of the<br />
>Pinan Software<br />
><br />
><br />
>_______________________________________________<br />
>postgis-users mailing list<br />
>postgis-users@postgis.refractions.net<br />
>http://postgis.refractions.net/mailman/listinfo/postgis-users<br />
><br />
>
</body>
</html>