# How can I find the nearest point on the coast from an ocean location?

Given some location of interest $X$ in a lake or in the ocean with known lat and lon, I'd like to find the lat and lon of the coastal location that is closest to $X$, as well as distance between the two points. Of course, once the lat and lon of the coastal point is found, it's straightforward to compute the distance. I know of this DistFromCoast dataset that has the distance to the nearest coastal point, but it does not provide the nearest coastal point itself.

Would anyone know of datasets, software, or algorithms that may help with my task?

• Maybe it would be better to ask this on GIS.SE? – Gimelist Nov 13 '15 at 10:31
• My colleagues made such a dataset but it's still experimental and I don't think it's open quite yet. – gerrit Nov 13 '15 at 11:21
• @Michael Maybe, or on opendata. Personally I think it's on-topic here as well. – gerrit Nov 13 '15 at 11:22
• What kind of technology are you using or have knowledge of — a GIS, GDAL, Python...? Knowing this might help someone give you a useful answer. – kwinkunks Nov 13 '15 at 17:30
• This will be of use: gis.stackexchange.com/questions/99755/… – farrenthorpe Nov 13 '15 at 19:54