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

How to get railway distance

0

Hi. I'm very new in this map business and I need some guide on where should I start to get a railway distance between two points. I discovered OpenRailwayMap but I'm not sure how to use the API to get the distance info. Couldn't find any documentation about it.. Please help..

asked 24 Dec '18, 00:40

zarulzakuan's gravatar image

zarulzakuan
11112
accept rate: 0%

edited 24 Dec '18, 09:20

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

1

I don't know of any all-purpose API that gives you the "railway distance" between two points, not least because even more than with car traffic, the exact specifications of the rolling stock limit which tracks you can use. The "railway distance" for a TGV is very different from that for a diesel freight train.

It is likely that you need to run your own server providing railway routing according to the specifications of your use case. Some people have experimented with using standard automobile routing engines and simply feeding them tracks instead of roads, however this can lead to unrealistic results ("make a left turn at this intersection").

Michael Reichert held a talk on this at this year's SotM conference in Milan, in which he also presented an Open Source project (based on the GraphHopper routing engine) for railway routing:

https://2018.stateofthemap.org/slides/T071-Routing_on_rails_with_OpenStreetMap.pdf

answered 24 Dec '18, 09:27

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%