Project-OSRM / osrm-text-instructions

Text instructions from OSRM route responses
BSD 2-Clause "Simplified" License
87 stars 61 forks source link

Roundabout: duplicate instructions #253

Closed Penegal closed 6 years ago

Penegal commented 6 years ago

Hello, there.

I noticed there are duplicate instructions when running through roundabouts, for instance:

  1. Enter the roundabout and take the 2nd exit onto Avenue du Bon Curé on entering the roundabout;
  2. Make a slight right onto Avenue du Bon Curé on exiting the roundabout.

image

These instructions essentially tell the same thing: when you're at the enter of a roundabout, you have no other choice than entering it; the useful information in this case is at which point leave it, which is already said on the entering point. Only one point, out of enter and exit, should generate instructions; for clarity, it should be the first, to emphasize the entering on the roundabout in case of a possibility to evade it just before the enter; the second instruction should be removed, as it is merely a duplicate of a part of the first one.

Note that I don't have much experience with real world examples, so there could be cases justifying this duplication for clarity.

Regards.

1ec5 commented 6 years ago

You’re right that these two instructions are a bit redundant. In real-time turn-by-turn navigation, it also means that there isn’t enough time to say the exit instruction before the exit needs to be taken.

The Mapbox Directions API does have some heuristics behind the scenes that make this particular scenario easier on the ears: when roundabout_exits=true, the entrance and exit instructions are joined together. That heuristic isn’t implemented in the OSRM demo site, which is intended to reflect OSRM output in rawer form.

OSRM Text Instructions, likewise, is intended to be fairly lightweight so that clients can implement their own heuristics as needed. I’m closing this issue because #15 would need to be implemented before OSRMTI could feasibly do that for the client.