<p>There are public databases with the coastline in lon,lat format. You just need to find the point closest to your coordinates in that coastline. For that you need the formula of the distance between two lon,lat points on an ellipsoid. In this article you can find that and an idea of how to do it: 
Garcia-Castellanos, D., &amp; U. Lombardo, 2007. Poles of Inaccessibility: a calculation algorithm for the remotest places on Earth. Scott. Geogr. J., 123, 227-233. doi:10.1080/14702540801897809 
available here: <a href="https://web.archive.org/web/20140629230429/http://cuba.ija.csic.es/~danielgc/papers/Garcia-Castellanos,%20Lombardo,%202007,%20SGJ.pdf" rel="nofollow noreferrer">https://web.archive.org/web/20140629230429/http://cuba.ija.csic.es/~danielgc/papers/Garcia-Castellanos,%20Lombardo,%202007,%20SGJ.pdf</a></p>

CC BY-SA 3.0
2016-11-12T22:58:04.933Z
2016-11-12T22:58:04.933Z
DrGC
<p>Well if you can describe the lake perimeter by a set of latitudes and longitudes then you can calculate the great circles of those points and the position of interest. The minimum value will correspond to the distance between the generic point and the closest one on the coast.</p>

<p><a href="http://www.movable-type.co.uk/scripts/latlong.html" rel="nofollow noreferrer">This website</a> describes how you can calculate the great circles.</p>

CC BY-SA 3.0
2016-11-14T09:24:11.333Z
2016-11-14T09:24:11.333Z
user6974
<p>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 <a href="http://oceancolor.gsfc.nasa.gov/DOCS/DistFromCoast/" rel="noreferrer">this <em>DistFromCoast</em> dataset</a> that has the distance to the nearest coastal point, but it does not provide the nearest coastal point itself.</p>

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

CC BY-SA 3.0
2015-11-13T10:31:37.757Z
Maybe it would be better to ask this on GIS.SE?
Gimelist
CC BY-SA 3.0
2015-11-13T11:21:21.980Z
My colleagues made such a dataset but it's still experimental and I don't think it's open quite yet.
gerrit
CC BY-SA 3.0
2015-11-13T11:22:02.007Z
@Michael Maybe, or on opendata.  Personally I think it's on-topic here as well.
gerrit
CC BY-SA 3.0
2015-11-13T17:30:03.007Z
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.
Matt Hall
CC BY-SA 3.0
2015-11-13T19:54:52.197Z
This will be of use: http://gis.stackexchange.com/questions/99755/how-to-find-the-distance-to-the-nearest-coastline-from-a-land-based-latitude-lon
f.thorpe
CC BY-SA 3.0
2015-11-16T05:08:43.280Z
@farrenthorpe thanks - it looks like it's exactly what I'm looking for. kwinkunks - I have very limited GIS experience, but I do have some Python knowledge - which is fortunate as it's used in the GIS.SE post.
user4624937
<ocean><geography><open-data><coastal><software>
How can I find the nearest point on the coast from an ocean location?
user4624937
# How can I find the nearest point on the coast from an ocean location?

(Asked by: username_0 on 2015-11-13)

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](http://oceancolor.gsfc.nasa.gov/DOCS/DistFromCoast/) 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?

**Tags:** ocean, geography, open-data, coastal, software

> **Comments:**
> **username_1**: Maybe it would be better to ask this on GIS.SE?  
> **username_2**: My colleagues made such a dataset but it's still experimental and I don't think it's open quite yet.  
> **username_2**: @Michael Maybe, or on opendata.  Personally I think it's on-topic here as well.  
> **username_3**: 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.  
> **username_4**: This will be of use: http://gis.stackexchange.com/questions/99755/how-to-find-the-distance-to-the-nearest-coastline-from-a-land-based-latitude-lon  
> **username_0**: @farrenthorpe thanks - it looks like it's exactly what I'm looking for. kwinkunks - I have very limited GIS experience, but I do have some Python knowledge - which is fortunate as it's used in the GIS.SE post.  

---

## 2 answers

### Answer by username_5 on 2016-11-12. Score: 2

There are public databases with the coastline in lon,lat format. You just need to find the point closest to your coordinates in that coastline. For that you need the formula of the distance between two lon,lat points on an ellipsoid. In this article you can find that and an idea of how to do it:
Garcia-Castellanos, D., & U. Lombardo, 2007. Poles of Inaccessibility: a calculation algorithm for the remotest places on Earth. Scott. Geogr. J., 123, 227-233. doi:10.1080/14702540801897809
available here: <https://web.archive.org/web/20140629230429/http://cuba.ija.csic.es/~danielgc/papers/Garcia-Castellanos,%20Lombardo,%202007,%20SGJ.pdf>


---

### Answer by username_6 on 2016-11-14. Score: 0

Well if you can describe the lake perimeter by a set of latitudes and longitudes then you can calculate the great circles of those points and the position of interest. The minimum value will correspond to the distance between the generic point and the closest one on the coast.

[This website](http://www.movable-type.co.uk/scripts/latlong.html) describes how you can calculate the great circles.


---

