Project-OSRM / osrm-backend

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

Ramp treated as channelized turn lane #4663

Open oxidase opened 6 years ago

oxidase commented 6 years ago

OSRM should distinguish between channelized turn lanes and off-ramps based on whether there’s a highway=motorway_junction node at the beginning of the link way, not based on whether the link way is a motorway_link or trunk_link.

This way represents an off-ramp from Westwood Northern Boulevard to Race Road in Cincinnati, Ohio. Westwood Northern Boulevard is tagged as a highway=primary, because this is the only grade-separated interchange along the street, the rest being at-grade; additionally, there are residential abutters all along the road. Since OSRM only recognizes motorway and trunk roads as having exits, OSRM says to turn slightly right onto the ramp – incorrectly interpreting the primary_link way as a channelized turn lane (a “slip road” in OSRM lingo). Fortunately, OSRM Text Instructions recovers by saying “toward Race Road”, since a destination tag is present.

It isn’t entirely clear to me how OSRM distinguishes a “slip road” from a ramp, but relying on motorway_junction nodes would probably result in fewer edge cases. It’s entirely possible that some motorways and trunk roads are missing motorway_junction nodes at grade-separated interchanges, but those cases should be fixed in OSM.

(From @1ec5)

Penegal commented 6 years ago

Am I correct to assume that this bug explains why, in this route, OSRM says to make a slight right instead of exit to? The node connecting the starting primary highway to the link is tagged with highway=motorway_junction, as this is described by onsite signs as a junction, even if it is not a motorway, so OSRM should treat it as such; it doesn't matter if this is a motorway or not.

1ec5 commented 6 years ago

Am I correct to assume that this bug explains why, in this route, OSRM says to make a slight right instead of exit to?

Yes, this is another example of the bug.