Skip to content
Prev 7458 / 29559 Next

Distance to (nearest) polygon

Dear list members

Is there an easy and preferably fast way to measure the distance from a  
of (large) number of points to the nearest polygon? spDistsN1 seems to 
only want to measure the distance between points.

For example, I need the distance between points at sea to the nearest 
land area (as defined by for example the 'world' dataset).

It's not very important which polygon, e.g., country, the given distance 
is to. It would be nice if the 'distance' from points that are inside 
the polygons were zero or negative, but it's not required -- distance to 
the polygon border, e.g., shoreline, would be OK.