[OSM-dev] Can I get "distance across dry land" with OpenStreetMap

Ævar Arnfjörð Bjarmason avarab at gmail.com
Tue Jun 14 16:52:08 BST 2011


I have the following problems I want to solve with OpenStreetMap data:

  * For points A and B, detect if either one is on an island, and that
    you therefore can't traverse between them without a swim.

  * For points A and B, get the distance between them by land. E.g. if
    A and B are on opposite sites of a fjord.

The routing libraries I've found seem to all assume that I want to
route across roads, whereas for this task all I need is just a
coastline shapfile of the planet. I'd then find out if A and B are on
different coastlines, or the shortest path between them on land.

Is there anything that does this already? I'm fairly sure I could do
some cleverness with PostGIS to find out whether the line between
points A and B crosses the ocean, but what I actually want is the
distance between them sans ocean.



More information about the dev mailing list