Allow a single intersection in a cross-road of sliproads, #4348/3
This commit is contained in:
parent
38ab22ee7c
commit
a7ea6e5327
@ -1049,5 +1049,5 @@ Feature: Slipways and Dedicated Turn Lanes
|
|||||||
|
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| s,f | sab,ae,dbcef,dbcef | depart,turn right,turn slight right,arrive | s,a,e,f |
|
| s,f | sab,dbcef,dbcef | depart,turn right,arrive | s,a,f |
|
||||||
|
@ -493,7 +493,21 @@ operator()(const NodeID /*nid*/, const EdgeID source_edge_id, Intersection inter
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node_based_graph.GetTarget(candidate_road.eid) == main_road_intersection->node)
|
// Check that the cross-road `candidate_road_target` that starts at `d` ends at
|
||||||
|
// main intersection node `c` or has a common node `e` with a cross-road from `c`
|
||||||
|
// a ... b .... c a ... b .... c
|
||||||
|
// ` . ` .
|
||||||
|
// ` . ` e...
|
||||||
|
// ` . ` .
|
||||||
|
// d d
|
||||||
|
//
|
||||||
|
const auto candidate_road_target = node_based_graph.GetTarget(candidate_road.eid);
|
||||||
|
if ((candidate_road_target == main_road_intersection->node) ||
|
||||||
|
(candidate_road_target == node_based_graph.GetTarget(crossing_road.eid) &&
|
||||||
|
util::bearing::angleBetween(candidate_road.bearing, crossing_road.bearing) <
|
||||||
|
FUZZY_ANGLE_DIFFERENCE &&
|
||||||
|
(getTurnDirection(candidate_road.angle) == DirectionModifier::SharpRight ||
|
||||||
|
getTurnDirection(candidate_road.angle) == DirectionModifier::SharpLeft)))
|
||||||
{
|
{
|
||||||
sliproad.instruction.type = TurnType::Sliproad;
|
sliproad.instruction.type = TurnType::Sliproad;
|
||||||
sliproad_found = true;
|
sliproad_found = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user