Project-OSRM / osrm-backend

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

duration on ferry relation not considered #1405

Open jase88 opened 9 years ago

jase88 commented 9 years ago

Hey,

Just noticed that the duration that is put on a ferry relation is not considered for routing.

See this route where you are passing this ferry relation Time is 00:01 although duration is set to 4min (00:04) on the relation (not the way)!

Haven't rechecked if it works when duration is tagged on the way. If this is the way you chose to parse, we should document this on the OSM Wiki.

perliedman commented 9 years ago

Looks like the code currently only considers the way: https://github.com/Project-OSRM/osrm-backend/blob/develop/profiles/car.lua#L270 (could not find anything similar that examines the relation).

Unfortunately, I'm not familiar enough with the profiles to fix this, at the moment.

TheMarex commented 9 years ago

@perliedman is right, we don't parse the duration of the relation. In the case above, I would suggest directly tagging the way (as there is only one).

Is tagging ferries using relations a common tagging scheme?

jase88 commented 9 years ago

Is tagging ferries using relations a common tagging scheme?

ferries: as way currently ~10k vs. as relation ~1k. But the wiki documentation allows tagging as relation, altought it's getting more complicated. See http://wiki.openstreetmap.org/wiki/Tag:route%3Dferry

emiltin commented 9 years ago

same goes for train lines. for example, there's now a bridge between copenhagen and malmø, but you cannot bike, however you can bringe your bike in the train. but that train line is tagged using a relation. since they are not yet handles, we get this akward route: http://www.ibikecph.dk/#!/x5fhl.7hev8/x3cpu.7qx4p.

in such cases, a train works like a ferry, linking bikeable networks.