Don't use obvious directions at ramp bifurcations, #4895

This commit is contained in:
Michael Krasnyk
2018-02-16 22:23:22 +01:00
parent e2c1956aa5
commit 1cafafc4cd
3 changed files with 9 additions and 3 deletions
+6 -1
View File
@@ -249,8 +249,13 @@ Intersection TurnHandler::handleThreeWayTurn(const EdgeID via_edge, Intersection
OOOOOOO
*/
const auto all_ramps =
std::all_of(intersection.begin(), intersection.end(), [this](const auto &road) {
return node_based_graph.GetEdgeData(road.eid).flags.road_classification.IsRampClass();
});
auto fork = findFork(via_edge, intersection);
if (fork && obvious_index == 0)
if (fork && (all_ramps || obvious_index == 0))
{
assignFork(via_edge, fork->getLeft(), fork->getRight());
}