fix roundabout handling with lanes

instead of artificially removing lanes from a roundabout, we don't assing them in the first place.
this also prevents a problem where we would end up collapsing turns with lanes in a roundabout
This commit is contained in:
Moritz Kobitzsch
2016-12-15 11:02:10 +01:00
parent e48ca65af4
commit d584bcad11
10 changed files with 33 additions and 49 deletions
+4
View File
@@ -1053,9 +1053,13 @@ std::vector<RouteStep> collapseTurns(std::vector<RouteStep> steps)
const auto &current_step = steps[step_index];
const auto next_step_index = step_index + 1;
const auto one_back_index = getPreviousIndex(step_index, steps);
BOOST_ASSERT(one_back_index < steps.size());
const auto &one_back_step = steps[one_back_index];
if (hasRoundaboutType(current_step.maneuver.instruction) ||
hasRoundaboutType(one_back_step.maneuver.instruction))
continue;
if (!hasManeuver(one_back_step, current_step))
continue;