Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.18k stars 3.29k forks source link

handle subway/railway routes modelled with relations #90

Open emiltin opened 12 years ago

emiltin commented 12 years ago

i can't get osrm to follow subway or railway lines in copenhagen.

ferry lines work fine. with ferries, the way itself is tagged with route=ferry.

however, the subway and railway lines in copenhagen does not have the route tag set. instead they're tagged with railway=subway, and then has relations that describe the route:

http://www.openstreetmap.org/browse/way/4317977

as we're working on a bike route planner, subways and trains does not have a high priority for us right now, but still - if you want to bike to malmø, there is no ferry across the strait to sweden, but there is a railway that allows you to bring your bike.

this brings me to another point - since it's a bike planner, i want to suggest bike routes whenever possible, even though train might be faster. but in the case there is no bike route, train lines should be used. this can be solved nicely with a priority for different way/route type that is separate from the speed (as suggested in #77 which i think is quite important). that way trains can be given a low priority, even though they're fast.

DennisOSRM commented 12 years ago

I see that, too. Maybe a nice addition for version 0.4.

emiltin commented 12 years ago

looking at this again, i don't think it's necessary to consider relations.

all that's needed it to use ways with railway=* , with the actual tag value(s) set in the speedprofile. railways are not tagged with highway=* , but instead railway=*.