Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f625d2446 | |||
| 0c6cca1ca4 |
@@ -1,3 +1,7 @@
|
||||
# 5.2.8
|
||||
- Bugfixes:
|
||||
- Handle an edge case that cause the turn instruction code to segfault during osrm-extract on Egypt.
|
||||
|
||||
# 5.2.7
|
||||
- Bugfixes
|
||||
- BREAKING: Fix bug that could result in failure to load 'osrm.icd' files. This breaks the dataformat
|
||||
|
||||
@@ -138,7 +138,20 @@ Intersection IntersectionGenerator::getConnectedRoads(const NodeID from_node,
|
||||
const auto valid_count =
|
||||
boost::count_if(intersection, [](const ConnectedRoad &road) { return road.entry_allowed; });
|
||||
if (0 == valid_count && uturn_could_be_valid)
|
||||
intersection[0].entry_allowed = true;
|
||||
{
|
||||
// after intersections sorting by angles, find the u-turn with (from_node == to_node)
|
||||
// that was inserted together with setting uturn_could_be_valid flag
|
||||
std::size_t self_u_turn = 0;
|
||||
while (self_u_turn < intersection.size()
|
||||
&& intersection[self_u_turn].turn.angle < std::numeric_limits<double>::epsilon()
|
||||
&& from_node != node_based_graph.GetTarget(intersection[self_u_turn].turn.eid))
|
||||
{
|
||||
++self_u_turn;
|
||||
}
|
||||
|
||||
BOOST_ASSERT(from_node == node_based_graph.GetTarget(intersection[self_u_turn].turn.eid));
|
||||
intersection[self_u_turn].entry_allowed = true;
|
||||
}
|
||||
|
||||
return mergeSegregatedRoads(std::move(intersection));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user