Adapts obvious turn classification: no longer take entry_allowed into account, resolves #3987
This commit is contained in:
parent
31511416ed
commit
df000debe9
@ -36,9 +36,9 @@ Feature: Turn Lane Guidance
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, |
|
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false, |
|
||||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true, |
|
||||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
| a,f | in,cross,cross | depart,continue right,arrive | ,, |
|
||||||
|
|
||||||
@sliproads
|
@sliproads
|
||||||
Scenario: Separate Turn Lanes
|
Scenario: Separate Turn Lanes
|
||||||
|
@ -359,7 +359,7 @@ Feature: Collapse
|
|||||||
| a,g | first,second,second | depart,turn left,arrive | a,b,g |
|
| a,g | first,second,second | depart,turn left,arrive | a,b,g |
|
||||||
| d,g | first,second,second | depart,turn right,arrive | d,e,g |
|
| d,g | first,second,second | depart,turn right,arrive | d,e,g |
|
||||||
| g,f | second,first,first | depart,turn right,arrive | g,e,f |
|
| g,f | second,first,first | depart,turn right,arrive | g,e,f |
|
||||||
| g,c | second,first,first | depart,end of road left,arrive | g,b,c |
|
| g,c | second,first,first | depart,turn left,arrive | g,e,c |
|
||||||
|
|
||||||
Scenario: Do not collapse turning roads
|
Scenario: Do not collapse turning roads
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -691,7 +691,7 @@ Feature: Collapse
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
|
| a,g | road,road,cross,cross | depart,continue slight left,turn left,arrive | a,b,c,g |
|
||||||
| a,e | road,road | depart,arrive | a,e |
|
| a,e | road,road | depart,arrive | a,e |
|
||||||
|
|
||||||
Scenario: On-Off on Highway
|
Scenario: On-Off on Highway
|
||||||
@ -1016,7 +1016,7 @@ Feature: Collapse
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| a,g | road,cross,cross | depart,fork left,arrive | a,b,g |
|
| a,g | road,road,cross,cross | depart,fork slight left,turn left,arrive | a,b,c,g |
|
||||||
| a,e | road,road,road | depart,fork slight right,arrive | a,b,e |
|
| a,e | road,road,road | depart,fork slight right,arrive | a,b,e |
|
||||||
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive | a,b,d,f |
|
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive | a,b,d,f |
|
||||||
|
|
||||||
|
@ -206,8 +206,8 @@ Feature: Simple Turns
|
|||||||
| c,a | road,road | depart,arrive | c,a |
|
| c,a | road,road | depart,arrive | c,a |
|
||||||
| g,a | turn,road,road | depart,turn left,arrive | g,b,a |
|
| g,a | turn,road,road | depart,turn left,arrive | g,b,a |
|
||||||
| g,c | turn,road,road | depart,turn right,arrive | g,b,c |
|
| g,c | turn,road,road | depart,turn right,arrive | g,b,c |
|
||||||
| g,f | turn,road,road | depart,turn left,arrive | g,e,f |
|
| g,f | turn,road,road | depart,end of road left,arrive | g,e,f |
|
||||||
| c,f | road,road,road | depart,continue right,arrive | c,b,f |
|
| c,f | road,road,road | depart,turn right,arrive | c,b,f |
|
||||||
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
|
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
|
||||||
|
|
||||||
# http://www.openstreetmap.org/#map=19/52.48753/13.52838
|
# http://www.openstreetmap.org/#map=19/52.48753/13.52838
|
||||||
@ -1313,7 +1313,7 @@ Feature: Simple Turns
|
|||||||
# we don't care for turn instructions, this is a coordinate extraction bug check
|
# we don't care for turn instructions, this is a coordinate extraction bug check
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | intersections |
|
| waypoints | route | intersections |
|
||||||
| a,g | ab,bcdefgh | true:90,true:45 false:180 false:270;true:180 |
|
| a,g | ab,bcdefgh,bcdefgh | true:90;true:45 false:180 false:270;true:180 |
|
||||||
|
|
||||||
#https://github.com/Project-OSRM/osrm-backend/pull/3469#issuecomment-270806580
|
#https://github.com/Project-OSRM/osrm-backend/pull/3469#issuecomment-270806580
|
||||||
Scenario: Oszillating Lower Priority Road
|
Scenario: Oszillating Lower Priority Road
|
||||||
|
@ -410,11 +410,8 @@ std::size_t IntersectionHandler::findObviousTurn(const EdgeID via_edge,
|
|||||||
const auto &best_option_data =
|
const auto &best_option_data =
|
||||||
node_based_graph.GetEdgeData(intersection[best_option].eid);
|
node_based_graph.GetEdgeData(intersection[best_option].eid);
|
||||||
const auto adjusted_distinction_ratio = [&]() {
|
const auto adjusted_distinction_ratio = [&]() {
|
||||||
// not allowed competitors are easily distinct
|
// obviousness by road classes
|
||||||
if (!intersection[index].entry_allowed)
|
if (in_way_data.road_classification == best_option_data.road_classification &&
|
||||||
return 0.7 * DISTINCTION_RATIO;
|
|
||||||
// a bit less obvious are road classes
|
|
||||||
else if (in_way_data.road_classification == best_option_data.road_classification &&
|
|
||||||
best_option_data.road_classification.GetPriority() <
|
best_option_data.road_classification.GetPriority() <
|
||||||
node_based_graph.GetEdgeData(intersection[index].eid)
|
node_based_graph.GetEdgeData(intersection[index].eid)
|
||||||
.road_classification.GetPriority())
|
.road_classification.GetPriority())
|
||||||
|
Loading…
Reference in New Issue
Block a user