fix invalid turn angle in forks

This commit is contained in:
Moritz Kobitzsch
2017-05-23 11:59:08 +02:00
parent d262c4dfaa
commit 9bd2b0deaa
5 changed files with 26 additions and 5 deletions
@@ -145,6 +145,7 @@ IntersectionGenerator::ComputeIntersectionShape(const NodeID node_at_center_of_i
intersection.end(),
makeCompareShapeDataAngleToBearing(base_bearing));
}
return intersection;
}
@@ -278,7 +278,7 @@ void IntersectionHandler::assignFork(const EdgeID via_edge,
// right side of fork
if (low_priority_left && !low_priority_right)
right.instruction = {suppressed_right_type, DirectionModifier::SlightLeft};
right.instruction = {suppressed_right_type, DirectionModifier::SlightRight};
else
{
if (low_priority_right && !low_priority_left)
+3 -3
View File
@@ -705,9 +705,8 @@ void TurnHandler::handleDistinctConflict(const EdgeID via_edge,
const auto left_classification = node_based_graph.GetEdgeData(left.eid).road_classification;
const auto right_classification =
node_based_graph.GetEdgeData(right.eid).road_classification;
if (canBeSeenAsFork(left_classification, right_classification))
assignFork(via_edge, left, right);
else if (left_classification.GetPriority() > right_classification.GetPriority())
if (left_classification.GetPriority() > right_classification.GetPriority())
{
// FIXME this should possibly know about the actual roads?
// here we don't know about the intersection size. To be on the save side,
@@ -726,6 +725,7 @@ void TurnHandler::handleDistinctConflict(const EdgeID via_edge,
right.instruction = {findBasicTurnType(via_edge, right),
DirectionModifier::SlightRight};
}
return;
}
const auto left_type = findBasicTurnType(via_edge, left);
const auto right_type = findBasicTurnType(via_edge, right);