Improves lane handling for subsequent going straight, resolves #2625
Before we only worked on subsequent quick turns, as in: `right, right` keeps the user on the rightmost lanes. This changeset modifies the logic to work on any subsequent steps that are "quick" and have lane information we can constrain later. Because we do not have a from-lane => to-lanes mapping we take the lanes left and right of the turn lanes into account when heuristically assigning the leftmost / rightmost lanes. There are some edge cases where this still does not give us the optimal solution but it gets close to what is actually possible at the moment without having a lane mapping in post-processing. References: - https://github.com/Project-OSRM/osrm-backend/issues/2625 fix rebase
This commit is contained in:
committed by
Moritz Kobitzsch
parent
b6dbf81206
commit
86fd04e556
@@ -139,7 +139,7 @@ typename Intersection::const_iterator findBestMatch(const TurnLaneType::Mask tag
|
||||
// possible that it is forbidden. In addition, the best u-turn angle does not necessarily represent
|
||||
// the u-turn, since it could be a sharp-left turn instead on a road with a middle island.
|
||||
typename Intersection::const_iterator
|
||||
findBestMatchForReverse(const TurnLaneType::Mask &neighbor_tag, const Intersection &intersection)
|
||||
findBestMatchForReverse(const TurnLaneType::Mask neighbor_tag, const Intersection &intersection)
|
||||
{
|
||||
const auto neighbor_itr = findBestMatch(neighbor_tag, intersection);
|
||||
if (neighbor_itr + 1 == intersection.cend())
|
||||
|
||||
Reference in New Issue
Block a user