Project-OSRM / osrm-backend

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

Demote Trunk Roads to non-motorway type #4274

Open MoKob opened 7 years ago

MoKob commented 7 years ago

OSM lists trunk as the second-most important road in a country, not necessarily a divided highway.

Right now, the car profile and OSRM in general assume trunk to be just like a motorway. Trunk roads are mapped within many cities, which is why the guidance handlers currently work around normal intersections by checking connections to normal roads.

This is in conflict with some motorways starting directly connected to the road network. To allow assigning correct turns to motorways starting within a city, we should reconsider the treatment of trunks as motorways. This aligns well with what I see in the tests, where many tests use off/on ramps on situations that just really do not look like they should be considered as such.

This would imply

screen shot 2017-07-10 at 16 59 12 2

Resolving this issue would turn the above pictured slight left into ramp slight left.

MoKob commented 7 years ago

The main problem here is that trunk roads are different on a by country basis. In Germany we need trunks to be treated like ramps, in US cities, trunk roads are most often not even closely related to ramps. If we want to treat both ways, we would require country awareness #4167

MoKob commented 7 years ago

A case where this triggers in SF: http://map.project-osrm.org/?z=18&center=37.800890%2C-122.424393&loc=37.801082%2C-122.425954&loc=37.800561%2C-122.424479&hl=en&alt=0