turn lane handler moved to scenario based handling
This commit is contained in:
@@ -0,0 +1,186 @@
|
||||
@routing @guidance @turn-lanes
|
||||
Feature: Turn Lane Guidance
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 3 meters
|
||||
|
||||
#requires https://github.com/cucumber/cucumber-js/issues/417
|
||||
#Due to this, we use & as a pipe character. Switch them out for \| when 417 is fixed
|
||||
@bug @WORKAROUND-FIXME
|
||||
Scenario: Separate Turn Lanes
|
||||
Given the node map
|
||||
| | | | | | | | e | |
|
||||
| a | | | b | | | | c | g |
|
||||
| | | | | | | | d | |
|
||||
| | | | | | | | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name | oneway |
|
||||
| ab | | in | yes |
|
||||
| bc | left\|through | in | yes |
|
||||
| bd | right | in | yes |
|
||||
| ec | | cross | no |
|
||||
| cd | | cross | no |
|
||||
| df | | cross | no |
|
||||
| cg | | straight | no |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | cd | d | no_left_turn |
|
||||
| restriction | bc | cd | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, |
|
||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
@TODO @2650 @bug
|
||||
Scenario: Sliproad with through lane
|
||||
Given the node map
|
||||
| | | | | | | | | | f | | | |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | | | | g | | | | | |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | e |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | | | | | | d | | | |
|
||||
| a | | | | | | | | | | | | |
|
||||
| | | | | | b | | | | | | | |
|
||||
| | | | | | | | | | c | | | |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | h | | | | | i | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | turn:lanes:forward |
|
||||
| ab | ghough | yes | |
|
||||
| bc | ghough | yes | through\|none |
|
||||
| bd | ghough | yes | none\|through |
|
||||
| de | ghough | yes | |
|
||||
| fgb | haight | yes | |
|
||||
| bh | haight | yes | left\|none |
|
||||
| fd | market | yes | |
|
||||
| dc | market | yes | |
|
||||
| ci | market | yes | |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | fgb | bd | b | no_left_turn |
|
||||
| restriction | fgb | bc | b | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | ghough,haight,haight | depart,turn right,arrive | |
|
||||
| a,i | ghough,market,market | depart,turn right,arrive | |
|
||||
| a,e | ghough,ghough,ghough | depart,continue slight left,arrive | |
|
||||
|
||||
@TODO @2650 @bug
|
||||
Scenario: Sliproad with through lane
|
||||
Given the node map
|
||||
| | | | | | | | f | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | g | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | e |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | d | | |
|
||||
| a | | | | | | | | | |
|
||||
| | | | | b | | | | | |
|
||||
| | | | | | | | c | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | h | | | | i | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | turn:lanes:forward |
|
||||
| ab | ghough | yes | |
|
||||
| bc | ghough | yes | through\|none |
|
||||
| bd | ghough | yes | none\|through |
|
||||
| fgb | haight | yes | |
|
||||
| bh | haight | yes | left\|none |
|
||||
| fd | market | yes | |
|
||||
| dc | market | yes | |
|
||||
| ci | market | yes | |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | dc | d | no_right_turn |
|
||||
| restriction | fgb | bd | b | no_left_turn |
|
||||
| restriction | fgb | bc | b | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | ghough,haight,haight | depart,turn right,arrive | |
|
||||
| a,i | ghough,market,market | depart,turn right,arrive | |
|
||||
| a,e | ghough,ghough,ghough | depart,continue slight left,arrive | |
|
||||
|
||||
Scenario: Separate Turn Lanes
|
||||
Given the node map
|
||||
| | | | | | | | e | |
|
||||
| a | | | b | | | | c | g |
|
||||
| | | | | | | | d | |
|
||||
| | | | | | | | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name | oneway |
|
||||
| ab | | in | yes |
|
||||
| bc | left\|through | in | yes |
|
||||
| bd | right | in | yes |
|
||||
| ec | | cross | no |
|
||||
| cd | | cross | no |
|
||||
| df | | cross | no |
|
||||
| cg | | straight | no |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | cd | d | no_left_turn |
|
||||
| restriction | bc | cd | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, |
|
||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
@guidance @lanes @sliproads
|
||||
Scenario: Separate Turn Lanes Next to other turns
|
||||
Given the node map
|
||||
| | | | | | | | e | |
|
||||
| a | | | b | | | | c | g |
|
||||
| | | | | | | | d | |
|
||||
| | | | | | | | f | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| i | | | h | | | | j | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name | oneway |
|
||||
| ab | | in | yes |
|
||||
| bc | left\|through | in | yes |
|
||||
| bd | right | in | yes |
|
||||
| ec | | cross | no |
|
||||
| cd | | cross | no |
|
||||
| df | | cross | no |
|
||||
| cg | | straight | no |
|
||||
| bh | left\|right | turn | yes |
|
||||
| ihj | | other | no |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | cd | d | no_left_turn |
|
||||
| restriction | bc | cd | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, |
|
||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
| a,j | in,turn,other,other | depart,turn right,turn left,arrive | ,,left:true right:false, |
|
||||
| a,i | in,turn,other,other | depart,turn right,turn right,arrive | ,,left:false right:true, |
|
||||
|
||||
@@ -277,6 +277,7 @@ Feature: Turn Lane Guidance
|
||||
| a,j | road,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
#this can happen due to traffic lights / lanes not drawn up to the intersection itself
|
||||
@2654
|
||||
Scenario: Turn Lanes Given earlier than actual turn
|
||||
Given the node map
|
||||
| a | | b | c | | d |
|
||||
@@ -295,6 +296,7 @@ Feature: Turn Lane Guidance
|
||||
| a,e | road,turn,turn | depart,turn right,arrive | ,none:false right:true, |
|
||||
| a,d | road,road | depart,arrive | , |
|
||||
|
||||
@2654
|
||||
Scenario: Turn Lanes Given earlier than actual turn
|
||||
Given the node map
|
||||
| a | | b | c | d | | e | | f | g | h | | i |
|
||||
@@ -462,17 +464,19 @@ Feature: Turn Lane Guidance
|
||||
| | | | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway | highway |
|
||||
| ab | road | left\|left\|through\|through | yes | primary |
|
||||
| bd | road | through\|through | yes | primary |
|
||||
| bc | road | left\|left | yes | primary |
|
||||
| de | road | | yes | primary |
|
||||
| fdcg | cross | | | secondary |
|
||||
| nodes | name | turn:lanes:forward | oneway | highway |
|
||||
| ab | road | left\|left\|through\|through\|right | yes | primary |
|
||||
| bd | road | through\|through | yes | primary |
|
||||
| bc | road | left\|left | yes | primary |
|
||||
| de | road | | yes | primary |
|
||||
| fd | cross | | | secondary |
|
||||
| dc | cross | | | secondary |
|
||||
| cg | cross | | | secondary |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | fdcg | d | no_left_turn |
|
||||
| restriction | bc | fdcg | c | no_right_turn |
|
||||
| restriction | bd | dc | d | no_left_turn |
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
@@ -729,6 +733,7 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | turns | route | lanes |
|
||||
| d,c | depart,merge slight left,arrive | ramp,Hwy,Hwy | ,slight right:true slight right:true, |
|
||||
|
||||
@2654
|
||||
Scenario: Fork on motorway links - don't fork on through but use lane
|
||||
Given the node map
|
||||
| i | | | | | a |
|
||||
@@ -798,6 +803,27 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| x,d | road,road | depart,arrive | , |
|
||||
|
||||
@partition
|
||||
Scenario: Partitioned turn, Slight Curve
|
||||
Given the node map
|
||||
| | | f | | e |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | | g | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes:forward |
|
||||
| ab | road | primary | yes | left\|right |
|
||||
| bc | cross | primary | yes | |
|
||||
| fbg | cross | primary | yes | |
|
||||
| dce | cross | primary | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, |
|
||||
| a,e | road,cross,cross | depart,turn left,arrive | ,left:true right:false, |
|
||||
|
||||
Scenario: Lane Parsing Issue #2694
|
||||
Given the node map
|
||||
@@ -930,3 +956,31 @@ Feature: Turn Lane Guidance
|
||||
| a,c | in,left,left | depart,turn left,arrive | ,left:true straight:false right;uturn:false, |
|
||||
| a,d | in,through,through | depart,new name straight,arrive | ,left:false straight:true right;uturn:false, |
|
||||
| a,e | in,right,right | depart,turn right,arrive | ,left:false straight:false right;uturn:true, |
|
||||
|
||||
@todo @2654
|
||||
#https://github.com/Project-OSRM/osrm-backend/issues/2645
|
||||
#http://www.openstreetmap.org/export#map=19/52.56054/13.32152
|
||||
Scenario: Kurt-Schuhmacher-Damm
|
||||
Given the node map
|
||||
| | | | g | | f |
|
||||
| | | | | | |
|
||||
| j | | | h | | e |
|
||||
| | | | | | |
|
||||
| a | | | b | | c |
|
||||
| | | | i | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes |
|
||||
| ab | | motorway_link | yes | left\|none\|right |
|
||||
| bc | | primary_link | yes | |
|
||||
| cd | ksd | secondary | yes | |
|
||||
| cef | ksd | primary | yes | |
|
||||
| hj | | motorway_link | yes | |
|
||||
| eh | | secondary_link | yes | |
|
||||
| gh | ksd | primary | yes | |
|
||||
| hbi | ksd | secondary | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | ,ksd,ksd | depart,turn left,arrive | ,left:true none:true right:false, |
|
||||
| a,i | ,ksd,ksd | depart,turn right,arrive | ,left:false none:true right:true, |
|
||||
|
||||
Reference in New Issue
Block a user