This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to measure the distance from a point(lat,lon) to coastline

0

I have a rather large dataset containing property data, and I want to find the distance from each property to the nearest coastline preferably using Python.

asked 26 Sep '20, 14:46

Sebastian's gravatar image

Sebastian
11112
accept rate: 0%

edited 28 Sep '20, 16:48

alester's gravatar image

alester
6.6k266100

1

There has been done quite some research on finding places that have the largest distance to the nearest road/coast/settlement etc: Pole of inaccessibility. To do that you basically need to answer the same question you have. Maybe that gives you a hint on how to expand your search.

(29 Sep '20, 09:16) TZorn

One Answer:

0

This formula may help. But it can't find the nearest coast. Perhaps you could put the formula with set of coastal locations into a spread sheet along with the properties so set of distances for each property could be seen. https://en.wikipedia.org/wiki/Haversine_formula

answered 28 Sep '20, 22:02

andy%20mackey's gravatar image

andy mackey
13.2k87143285
accept rate: 4%

Source code available on GitHub .