don't collapse highway ramps into uturns (#4074)

This commit is contained in:
Moritz Kobitzsch
2017-05-23 11:42:23 +02:00
committed by Daniel J. H
parent a58139dfb5
commit ceaf065d0e
5 changed files with 52 additions and 4 deletions
@@ -147,6 +147,12 @@ bool isUTurn(const RouteStepIterator step_prior_to_intersection,
step_prior_to_intersection, step_entering_intersection, step_leaving_intersection))
return false;
// uturns only allowed on turns
if (!hasTurnType(*step_entering_intersection, TurnType::Turn) &&
!hasTurnType(*step_entering_intersection, TurnType::Continue) &&
!hasTurnType(*step_entering_intersection, TurnType::EndOfRoad))
return false;
// the most basic condition for a uturn is that we actually turn around
const bool takes_u_turn = bearingsAreReversed(
util::bearing::reverse(step_entering_intersection->intersections.front()