fix issues with roundabouts and intersections and sliproads

This commit is contained in:
Moritz Kobitzsch
2016-06-21 14:37:20 +02:00
committed by Patrick Niklaus
parent ec4dcee8bd
commit 2868f702a5
6 changed files with 120 additions and 59 deletions
+20
View File
@@ -456,6 +456,26 @@ inline ConnectedRoad mirror(ConnectedRoad road)
return road;
}
inline bool hasRoundaboutType(const TurnInstruction instruction)
{
using namespace extractor::guidance::TurnType;
const constexpr TurnType::Enum valid_types[] = {TurnType::EnterRoundabout,
TurnType::EnterAndExitRoundabout,
TurnType::EnterRotary,
TurnType::EnterAndExitRotary,
TurnType::EnterRoundaboutIntersection,
TurnType::EnterAndExitRoundaboutIntersection,
TurnType::EnterRoundaboutAtExit,
TurnType::ExitRoundabout,
TurnType::EnterRotaryAtExit,
TurnType::ExitRotary,
TurnType::EnterRoundaboutIntersectionAtExit,
TurnType::ExitRoundaboutIntersection,
TurnType::StayOnRoundabout};
const auto valid_end = valid_types + 13;
return std::find(valid_types, valid_end, instruction.type) != valid_end;
};
} // namespace guidance
} // namespace extractor
} // namespace osrm