Fixes Sliproads onto a roundabout to be classified as sliproads, resolves #3540

This commit is contained in:
Daniel J. Hofmann 2017-01-09 20:42:36 +05:30 committed by Patrick Niklaus
parent 32f63e5e0c
commit b3483f95a7
2 changed files with 14 additions and 6 deletions

View File

@ -875,20 +875,20 @@ Feature: Slipways and Dedicated Turn Lanes
| ab | through | trunk | yes | | |
| bx | through | trunk | yes | | |
| ac | round | primary | yes | roundabout | |
| cdy | round | primary | yes | roundabout | |
| cdy | round | primary | yes | roundabout | |
| yb | round | primary | yes | roundabout | |
| be | round | primary | yes | roundabout | |
| ea | round | primary | yes | roundabout | |
| et | out | primary | yes | | the extraterrestrial |
| sc | | trunk_link | yes | | |
| yx | right | trunk_link | yes | | |
| yx | right | trunk_link | yes | | |
And the relations
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sa | ab | a | only_straight |
| restriction | ab | bx | b | only_straight |
| restriction | yb | be | b | only_straight |
When I route I should get
| waypoints | route | turns | locations |
| z,t | through,out,out | depart,roundabout-exit-2,arrive | |
| waypoints | route | turns | locations |
| z,t | through,,out,out | depart,off ramp slight right,round-exit-3,arrive | z,s,c,t |

View File

@ -271,7 +271,8 @@ operator()(const NodeID /*nid*/, const EdgeID source_edge_id, Intersection inter
continue;
}
// The turn off of the Sliproad has to be obvious and a narrow turn
// The turn off of the Sliproad has to be obvious and a narrow turn and must not be a
// roundabout
{
const auto index = findObviousTurn(sliproad_edge, target_intersection);
@ -288,6 +289,13 @@ operator()(const NodeID /*nid*/, const EdgeID source_edge_id, Intersection inter
{
continue;
}
const auto &onto_data = node_based_graph.GetEdgeData(onto.eid);
if (onto_data.roundabout)
{
continue;
}
}
// Check for curvature. Depending on the turn's direction at `c`. Scenario for right turn: