valhalla / valhalla

Open Source Routing Engine for OpenStreetMap
https://valhalla.github.io/valhalla/
Other
4.56k stars 688 forks source link

Ferry relations are ignored, e.g. to island Sylt #4381

Open OptiMael opened 1 year ago

OptiMael commented 1 year ago

Routing in this example ignores the car shuttle train SyltShuttle.

The changes leading to this issue were made here and discussed in this thread .

Are there any plans for Valhalla to adopt the new proposal?

nilsnolde commented 1 year ago

Can you please boil down the "proposal" to a few sentences?

We do train ferries generally, but we also do have a few issues with ferry connections, specifically with islands as well, which are being worked on. You might wanna try this branch: https://github.com/valhalla/valhalla/pull/4378.

OptiMael commented 1 year ago

As I understand the original idea was to consider a relation with tag route=shuttle_train connected to a Car_shuttle node as a possible route.

Edit: Compared to a ferry, the Car_shuttle seems to be the equivalent to a ferry_terminal

nilsnolde commented 1 year ago

Ah interesting! No, we don't respect that yet. Thanks for flagging it though. Even the eurotunnel does this now?

OptiMael commented 1 year ago

That's correct. Valhalla seems to always use the ferry at Calais (France) instead of the chunnel.

nilsnolde commented 1 year ago

Ah wait, no, the problem must be smth else. We don't care about those nodes, it should still work as-is. Maybe it'll be one of the PRs that are already merged or will be merged very soon. I also didn't update the software on the public server in a longer while.

nilsnolde commented 1 year ago

@OptiMael can you point us to the actual OSM way that should be used as route=shuttle_train for car travel for the Sylt line? I seem to be blind, I only see this way (+ some rails): https://www.openstreetmap.org/way/310476567#map=13/54.8782/8.5370

OptiMael commented 1 year ago

@nilsnolde Parent: https://www.openstreetmap.org/relation/15617114 Child 1 (to island): https://www.openstreetmap.org/relation/6377345 Child 2 (to mainland): https://www.openstreetmap.org/relation/6384504

kevinkreiser commented 1 year ago

disclaimer i didnt debug this or review code at all

yeah if all the tagging is on the relation then that isnt going to work. we do process relations but only for vanity information like route numbers. for this to work today the member ways of the relations need to be tagged with something that makes the router think our modes of travel have access. it looks to me like only the relation has this tagging and so we dont use it

nilsnolde commented 1 year ago

jep, that's why I didn't see them:) the same very surely goes for all other routing engines. correct me if I'm wrong, but I don't know any convention for other cases where these highly routing-sensitive tags are only on the relations.. it's like putting a highway=motorway on motorway relations and not tagging the members.

kevinkreiser commented 1 year ago

that would be my opinion yes. basically this is tagged wrong. maybe there is a special convention that im not aware of?

nilsnolde commented 1 year ago

It’s very much walking the line of “don’t tag for the router”, but (speaking exclusively for myself), there’s a limit to what OSM downstream software should be burdened with maintaining.

@OptiMael is there a chance to re-tag those members? I’m fairly confident in saying, hardly any router will implement ferry relations just to save a few bytes. And this kind of relation is really only existing to save bytes, there’s nothing relational about it (like turn restrictions).