osrm-backend
osrm-backend copied to clipboard
Use turn lanes in guidance instructions
Currently OSRM generates instructions such as right or left by identifying left or right turns based on the geometry.
Interpreting geometries correctly is difficult and often we do not interpret it correctly.
Example: This should turn left

Fixing guidance and geometry identification is a bigger lift, what we this issue proposes is to use turn lanes information to annotate turn types as a "fallback" or "quick fix":
If, for example, there are turn lanes saying left|right at an intersection, we should annotate the turns as left and right accordingly and not annotate them straight and right even if we might conclude that with the geometry.
Unfortunately, the OSM database does not have a lot of turn lanes, so we definitely cannot base our guidance solely on turn lanes and disregard geometry identification. There are still reasons why we would want this fix:
- If the geometry is difficult, it is an easy fallback to fix this
- If there is a turn-lane in the data, we can have high confidence in the data that the resulting instructions is correct (especially at T-intersections)