add support for junction=circular, allowing named circular junctions to be treated as rotaries

This commit is contained in:
Moritz Kobitzsch
2016-11-24 13:29:17 +01:00
parent 4636aaabfe
commit 12d58ace10
14 changed files with 433 additions and 428 deletions
@@ -56,7 +56,8 @@ bool IntersectionNormalizer::CanMerge(const NodeID node_at_intersection,
return false;
// may not be on a roundabout
if (first_data.roundabout || second_data.roundabout)
if (first_data.roundabout || second_data.roundabout || first_data.circular ||
second_data.circular)
return false;
// exactly one of them has to be reversed
@@ -237,7 +238,8 @@ Intersection IntersectionNormalizer::MergeSegregatedRoads(const NodeID intersect
const bool is_connected_to_roundabout = [this, &intersection]() {
for (const auto &road : intersection)
{
if (node_based_graph.GetEdgeData(road.eid).roundabout)
if (node_based_graph.GetEdgeData(road.eid).roundabout ||
node_based_graph.GetEdgeData(road.eid).circular)
return true;
}
return false;