add locations to turn scenarios

start assigning turn locations to test / further locations
add locations/make roads not overlapping - staggered
larger grid size for utf tests (new name)
This commit is contained in:
Moritz Kobitzsch 2016-12-21 18:14:40 +01:00 committed by Patrick Niklaus
parent cd1a73dde6
commit 8d83c3adbb
5 changed files with 345 additions and 333 deletions

View File

@ -9,10 +9,10 @@ Feature: Collapse
Scenario: Collapse U-Turn Triangle Intersection
Given the node map
"""
g f e d
a b c
g---f---e---d
\ /
\ /
a-----b-----c
"""
And the ways
@ -23,19 +23,19 @@ Feature: Collapse
| be | primary_link | | yes |
When I route I should get
| waypoints | route | turns |
| a,g | road,road,road | depart,continue uturn,arrive |
| d,c | road,road,road | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,g | road,road,road | depart,continue uturn,arrive | a,b,g |
| d,c | road,road,road | depart,continue uturn,arrive | d,f,c |
@reverse @traffic-signals
Scenario: Collapse U-Turn Triangle Intersection
Given the node map
"""
g f j e d
g---f---j---e---d
\ /
h i
a b c
\ /
a-------b-------c
"""
And the ways
@ -52,9 +52,9 @@ Feature: Collapse
| i | traffic_signals |
When I route I should get
| waypoints | route | turns |
| a,g | road,road,road | depart,continue uturn,arrive |
| d,c | road,road,road | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,g | road,road,road | depart,continue uturn,arrive | a,b,g |
| d,c | road,road,road | depart,continue uturn,arrive | d,f,b |
Scenario: Forking before a turn (forky)
Given the node map
@ -85,8 +85,8 @@ Feature: Collapse
| restriction | bc | dc | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,g | road,cross,cross | depart,turn left,arrive |
| a,e | road,road,road | depart,continue right,arrive |
| waypoints | route | turns | locations |
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
| a,e | road,road,road | depart,continue right,arrive | a,b,e |
# We should discuss whether the next item should be collapsed to depart,turn right,arrive.
| a,f | road,road,cross,cross | depart,continue slight right,turn right,arrive |
| a,f | road,road,cross,cross | depart,continue slight right,turn right,arrive | a,b,d,f |

View File

@ -32,23 +32,23 @@ Feature: Collapse
| gb | primary | first | yes |
When I route I should get
| waypoints | route | turns |
| a,l | first,second,second | depart,turn right,arrive |
| a,d | first,first | depart,arrive |
| a,j | first,second,second | depart,turn left,arrive |
| a,h | first,first,first | depart,continue uturn,arrive |
| e,j | first,second,second | depart,turn right,arrive |
| e,h | first,first | depart,arrive |
| e,l | first,second,second | depart,turn left,arrive |
| e,d | first,first,first | depart,continue uturn,arrive |
| k,h | second,first,first | depart,turn right,arrive |
| k,l | second,second | depart,arrive |
| k,d | second,first,first | depart,turn left,arrive |
| k,j | second,second,second | depart,continue uturn,arrive |
| i,d | second,first,first | depart,turn right,arrive |
| i,j | second,second | depart,arrive |
| i,h | second,first,first | depart,turn left,arrive |
| i,l | second,second,second | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
| a,d | first,first | depart,arrive | a,d |
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
| e,h | first,first | depart,arrive | e,h |
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
| k,l | second,second | depart,arrive | k,l |
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
| i,j | second,second | depart,arrive | i,j |
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
Scenario: Segregated Intersection, Cross Belonging to Correct Street
Given the node map
@ -77,23 +77,23 @@ Feature: Collapse
| gb | primary | second | yes |
When I route I should get
| waypoints | route | turns |
| a,l | first,second,second | depart,turn right,arrive |
| a,d | first,first | depart,arrive |
| a,j | first,second,second | depart,turn left,arrive |
| a,h | first,first,first | depart,continue uturn,arrive |
| e,j | first,second,second | depart,turn right,arrive |
| e,h | first,first | depart,arrive |
| e,l | first,second,second | depart,turn left,arrive |
| e,d | first,first,first | depart,continue uturn,arrive |
| k,h | second,first,first | depart,turn right,arrive |
| k,l | second,second | depart,arrive |
| k,d | second,first,first | depart,turn left,arrive |
| k,j | second,second,second | depart,continue uturn,arrive |
| i,d | second,first,first | depart,turn right,arrive |
| i,j | second,second | depart,arrive |
| i,h | second,first,first | depart,turn left,arrive |
| i,l | second,second,second | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
| a,d | first,first | depart,arrive | a,d |
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
| e,h | first,first | depart,arrive | e,h |
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
| k,l | second,second | depart,arrive | k,l |
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
| i,j | second,second | depart,arrive | i,j |
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
Scenario: Segregated Intersection, Cross Belonging to Mixed Streets
Given the node map
@ -122,23 +122,23 @@ Feature: Collapse
| gb | primary | first | yes |
When I route I should get
| waypoints | route | turns |
| a,l | first,second,second | depart,turn right,arrive |
| a,d | first,first | depart,arrive |
| a,j | first,second,second | depart,turn left,arrive |
| a,h | first,first,first | depart,continue uturn,arrive |
| e,j | first,second,second | depart,turn right,arrive |
| e,h | first,first | depart,arrive |
| e,l | first,second,second | depart,turn left,arrive |
| e,d | first,first,first | depart,continue uturn,arrive |
| k,h | second,first,first | depart,turn right,arrive |
| k,l | second,second | depart,arrive |
| k,d | second,first,first | depart,turn left,arrive |
| k,j | second,second,second | depart,continue uturn,arrive |
| i,d | second,first,first | depart,turn right,arrive |
| i,j | second,second | depart,arrive |
| i,h | second,first,first | depart,turn left,arrive |
| i,l | second,second,second | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
| a,d | first,first | depart,arrive | a,d |
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
| e,h | first,first | depart,arrive | e,h |
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
| k,l | second,second | depart,arrive | k,l |
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
| i,j | second,second | depart,arrive | i,j |
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
Scenario: Partly Segregated Intersection, Two Segregated Roads
Given the node map
@ -172,23 +172,23 @@ Feature: Collapse
| liejk | primary | second | yes | 5 |
When I route I should get
| waypoints | route | turns |
| a,h | first,second,second | depart,turn right,arrive |
| a,c | first,first | depart,arrive |
| a,j | first,second,second | depart,turn left,arrive |
| a,f | first,first,first | depart,continue uturn,arrive |
| d,j | first,second,second | depart,turn right,arrive |
| d,f | first,first | depart,arrive |
| d,h | first,second,second | depart,turn left,arrive |
| d,c | first,first,first | depart,continue uturn,arrive |
| g,c | second,first,first | depart,turn right,arrive |
| g,j | second,second | depart,arrive |
| g,f | second,first,first | depart,turn left,arrive |
| g,h | second,second,second | depart,continue uturn,arrive |
| i,f | second,first,first | depart,turn right,arrive |
| i,h | second,second | depart,arrive |
| i,c | second,first,first | depart,turn left,arrive |
| i,j | second,second,second | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,h | first,second,second | depart,turn right,arrive | a,b,h |
| a,c | first,first | depart,arrive | a,c |
| a,j | first,second,second | depart,turn left,arrive | a,b,j |
| a,f | first,first,first | depart,continue uturn,arrive | a,b,f |
| d,j | first,second,second | depart,turn right,arrive | d,e,j |
| d,f | first,first | depart,arrive | d,f |
| d,h | first,second,second | depart,turn left,arrive | d,e,h |
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
| g,c | second,first,first | depart,turn right,arrive | g,b,c |
| g,j | second,second | depart,arrive | g,j |
| g,f | second,first,first | depart,turn left,arrive | g,e,f |
| g,h | second,second,second | depart,continue uturn,arrive | g,b,h |
| i,f | second,first,first | depart,turn right,arrive | i,e,f |
| i,h | second,second | depart,arrive | i,h |
| i,c | second,first,first | depart,turn left,arrive | i,b,c |
| i,j | second,second,second | depart,continue uturn,arrive | i,e,j |
Scenario: Partly Segregated Intersection, Two Segregated Roads, Intersection belongs to Second
Given the node map
@ -226,23 +226,23 @@ Feature: Collapse
| liejk | primary | second | yes | 5 |
When I route I should get
| waypoints | route | turns |
| a,h | first,second,second | depart,turn right,arrive |
| a,c | first,first | depart,arrive |
| a,j | first,second,second | depart,turn left,arrive |
| a,f | first,first,first | depart,continue uturn,arrive |
| d,j | first,second,second | depart,turn right,arrive |
| d,f | first,first | depart,arrive |
| d,h | first,second,second | depart,turn left,arrive |
| d,c | first,first,first | depart,continue uturn,arrive |
| g,c | second,first,first | depart,turn right,arrive |
| g,j | second,second | depart,arrive |
| g,f | second,first,first | depart,turn left,arrive |
| g,h | second,second,second | depart,continue uturn,arrive |
| i,f | second,first,first | depart,turn right,arrive |
| i,h | second,second | depart,arrive |
| i,c | second,first,first | depart,turn left,arrive |
| i,j | second,second,second | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,h | first,second,second | depart,turn right,arrive | a,b,h |
| a,c | first,first | depart,arrive | a,c |
| a,j | first,second,second | depart,turn left,arrive | a,b,j |
| a,f | first,first,first | depart,continue uturn,arrive | a,b,f |
| d,j | first,second,second | depart,turn right,arrive | d,e,j |
| d,f | first,first | depart,arrive | d,f |
| d,h | first,second,second | depart,turn left,arrive | d,e,h |
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
| g,c | second,first,first | depart,turn right,arrive | g,b,c |
| g,j | second,second | depart,arrive | g,j |
| g,f | second,first,first | depart,turn left,arrive | g,e,f |
| g,h | second,second,second | depart,continue uturn,arrive | g,b,h |
| i,f | second,first,first | depart,turn right,arrive | i,e,f |
| i,h | second,second | depart,arrive | i,h |
| i,c | second,first,first | depart,turn left,arrive | i,b,c |
| i,j | second,second,second | depart,continue uturn,arrive | i,e,j |
Scenario: Segregated Intersection, Cross Belonging to Mixed Streets - Slight Angles
Given the node map
@ -271,23 +271,23 @@ Feature: Collapse
| gb | primary | first | yes |
When I route I should get
| waypoints | route | turns |
| a,l | first,second,second | depart,turn right,arrive |
| a,d | first,first | depart,arrive |
| a,j | first,second,second | depart,turn left,arrive |
| a,h | first,first,first | depart,continue uturn,arrive |
| e,j | first,second,second | depart,turn right,arrive |
| e,h | first,first | depart,arrive |
| e,l | first,second,second | depart,turn left,arrive |
| e,d | first,first,first | depart,continue uturn,arrive |
| k,h | second,first,first | depart,turn right,arrive |
| k,l | second,second | depart,arrive |
| k,d | second,first,first | depart,turn left,arrive |
| k,j | second,second,second | depart,continue uturn,arrive |
| i,d | second,first,first | depart,turn right,arrive |
| i,j | second,second | depart,arrive |
| i,h | second,first,first | depart,turn left,arrive |
| i,l | second,second,second | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
| a,d | first,first | depart,arrive | a,d |
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
| e,h | first,first | depart,arrive | e,h |
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
| k,l | second,second | depart,arrive | k,l |
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
| i,j | second,second | depart,arrive | i,j |
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
Scenario: Segregated Intersection, Cross Belonging to Mixed Streets - Slight Angles (2)
Given the node map
@ -316,23 +316,23 @@ Feature: Collapse
| gb | primary | first | yes |
When I route I should get
| waypoints | route | turns |
| a,l | first,second,second | depart,turn right,arrive |
| a,d | first,first | depart,arrive |
| a,j | first,second,second | depart,turn left,arrive |
| a,h | first,first,first | depart,continue uturn,arrive |
| e,j | first,second,second | depart,turn right,arrive |
| e,h | first,first | depart,arrive |
| e,l | first,second,second | depart,turn left,arrive |
| e,d | first,first,first | depart,continue uturn,arrive |
| k,h | second,first,first | depart,turn right,arrive |
| k,l | second,second | depart,arrive |
| k,d | second,first,first | depart,turn left,arrive |
| k,j | second,second,second | depart,continue uturn,arrive |
| i,d | second,first,first | depart,turn right,arrive |
| i,j | second,second | depart,arrive |
| i,h | second,first,first | depart,turn left,arrive |
| i,l | second,second,second | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
| a,d | first,first | depart,arrive | a,d |
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
| e,h | first,first | depart,arrive | e,h |
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
| k,l | second,second | depart,arrive | k,l |
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
| i,j | second,second | depart,arrive | i,j |
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
Scenario: Entering a segregated road
Given the node map
@ -353,20 +353,20 @@ Feature: Collapse
| ge | primary | second | no |
When I route I should get
| waypoints | route | turns |
| d,c | first,first,first | depart,continue uturn,arrive |
| a,f | first,first,first | depart,continue uturn,arrive |
| a,g | first,second,second | depart,turn left,arrive |
| d,g | first,second,second | depart,turn right,arrive |
| g,f | second,first,first | depart,turn right,arrive |
| g,c | second,first,first | depart,end of road left,arrive |
| waypoints | route | turns | locations |
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
| a,f | first,first,first | depart,continue uturn,arrive | a,b,f |
| a,g | first,second,second | depart,turn left,arrive | a,b,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,c | second,first,first | depart,end of road left,arrive | g,b,c |
Scenario: Do not collapse turning roads
Given the node map
"""
e
c d
a b f
c---d
a---b-f
"""
And the ways
@ -378,10 +378,10 @@ Feature: Collapse
| bf | primary | third | yes |
When I route I should get
| waypoints | route | turns |
| a,d | first,first,first,first | depart,continue left,continue right,arrive |
| a,e | first,second,second | depart,turn left,arrive |
| a,f | first,third,third | depart,turn straight,arrive |
| waypoints | route | turns | locations |
| a,d | first,first,first,first | depart,continue left,continue right,arrive | a,b,c,d |
| a,e | first,second,second | depart,turn left,arrive | a,b,e |
| a,f | first,third,third | depart,turn straight,arrive | a,b,f |
Scenario: Bridge on unnamed road
Given the node map
@ -403,8 +403,8 @@ Feature: Collapse
Given the node map
"""
f
i h g e
a b c d
i-h-----g-e
a-b-----c-d
"""
And the ways
@ -419,8 +419,8 @@ Feature: Collapse
| hi | primary | yes | to_bridge |
When I route I should get
| waypoints | route | turns |
| a,f | to_bridge,target_road,target_road | depart,turn left,arrive |
| waypoints | route | turns | locations |
| a,f | to_bridge,target_road,target_road | depart,turn left,arrive | a,d,f |
Scenario: Pankenbruecke
Given the node map
@ -440,6 +440,7 @@ Feature: Collapse
|
g
"""
And the ways
| nodes | highway | name | oneway | lanes |
| kabhj | primary | inroad | yes | 4 |
@ -449,17 +450,17 @@ Feature: Collapse
| fi | primary | cross | no | |
When I route I should get
| waypoints | route | turns |
| a,g | inroad,outroad,outroad | depart,new name straight,arrive |
| a,i | inroad,cross,cross | depart,turn left,arrive |
| waypoints | route | turns | locations |
| a,g | inroad,outroad,outroad | depart,new name straight,arrive | a,d,g |
| a,i | inroad,cross,cross | depart,turn left,arrive | a,f,i |
Scenario: Close Turns - Don't Collapse
Given the node map
"""
g d
e b c f
| |
e-b-c-f
| |
a h
"""
@ -472,10 +473,10 @@ Feature: Collapse
| ch | primary | reverse |
When I route I should get
| waypoints | route | turns |
| a,d | in,cross,out,out | depart,turn right,turn left,arrive |
| a,h | in,cross,reverse,reverse | depart,turn right,turn right,arrive |
| g,d | straight,cross,out,out | depart,turn left,turn left,arrive |
| waypoints | route | turns | locations |
| a,d | in,cross,out,out | depart,turn right,turn left,arrive | a,b,c,d |
| a,h | in,cross,reverse,reverse | depart,turn right,turn right,arrive | a,b,c,h |
| g,d | straight,cross,out,out | depart,turn left,turn left,arrive | g,b,c,d |
Scenario: No Name During Turns
Given the node map
@ -569,15 +570,15 @@ Feature: Collapse
Given the node map
"""
h
a
g
a .
..
.g
b f
c
e
d
| c .
| | . ,
| | . .
| | . e
| | d
j i
"""
@ -589,27 +590,27 @@ Feature: Collapse
| gbj | secondary | out | yes |
When I route I should get
| waypoints | route | turns |
| i,h | in,road,road | depart,turn left,arrive |
| a,d | road,road | depart,arrive |
| a,j | road,out,out | depart,turn slight right,arrive |
| waypoints | route | turns | locations |
| i,h | in,road,road | depart,turn left,arrive | i,f,h |
| a,d | road,road | depart,arrive | a,d |
| a,j | road,out,out | depart,turn slight right,arrive | a,b,j |
Scenario: Segregated Intersection into Very Slight Turn
Given the node map
"""
h
a
g
b
f
c
e
d
a.
.,
..
.g
b.
| f
| c .
| |. .
| | . .
| | . .
| | . e
| | d
j i
"""
@ -621,17 +622,17 @@ Feature: Collapse
| gbj | secondary | out | yes |
When I route I should get
| waypoints | route | turns |
| i,h | in,road,road | depart,turn slight left,arrive |
| a,d | road,road | depart,arrive |
| a,j | road,out,out | depart,turn slight right,arrive |
| waypoints | route | turns | locations |
| i,h | in,road,road | depart,turn slight left,arrive | i,f,h |
| a,d | road,road | depart,arrive | a,d |
| a,j | road,out,out | depart,turn slight right,arrive | a,b,j |
Scenario: Don't collapse everything to u-turn / too wide
Given the node map
"""
a b e
d c f
a---b---e
|
d---c---f
"""
And the ways
@ -641,18 +642,18 @@ Feature: Collapse
| cf | secondary | bottom |
When I route I should get
| waypoints | turns | route |
| a,d | depart,continue right,turn right,arrive | road,road,road,road |
| d,a | depart,continue left,turn left,arrive | road,road,road,road |
| waypoints | turns | route | locations |
| a,d | depart,continue right,turn right,arrive | road,road,road,road | a,b,c,d |
| d,a | depart,continue left,turn left,arrive | road,road,road,road | d,c,b,a |
Scenario: Forking before a turn
Given the node map
"""
g
c
a b d e
|
.c
a---b-d-e
|
f
"""
@ -672,18 +673,18 @@ Feature: Collapse
| restriction | bc | dc | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,g | road,cross,cross | depart,turn left,arrive |
| a,e | road,road | depart,arrive |
| waypoints | route | turns | locations |
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
| a,e | road,road | depart,arrive | a,e |
Scenario: Forking before a turn (narrow)
Given the node map
"""
g
c
a b d e
|
..c
a-b---d-e
|
f
"""
@ -703,9 +704,9 @@ Feature: Collapse
| restriction | bc | dc | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,g | road,cross,cross | depart,turn left,arrive |
| a,e | road,road | depart,arrive |
| waypoints | route | turns | locations |
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
| a,e | road,road | depart,arrive | a,e |
Scenario: Forking before a turn (forky)
Given the node map
@ -737,10 +738,10 @@ Feature: Collapse
| restriction | bc | dc | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,g | road,cross,cross | depart,fork left,arrive |
| a,e | road,road,road | depart,fork slight right,arrive |
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive |
| waypoints | route | turns | locations |
| a,g | road,cross,cross | depart,fork left,arrive | a,b,g |
| 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 |
Scenario: On-Off on Highway
Given the node map
@ -757,11 +758,11 @@ Feature: Collapse
| ce | off | motorway_link | yes |
When I route I should get
| waypoints | route | turns |
| a,d | Hwy,Hwy | depart,arrive |
| f,d | on,Hwy,Hwy | depart,merge slight right,arrive |
| f,e | on,Hwy,off,off | depart,merge slight right,off ramp right,arrive |
| a,e | Hwy,off,off | depart,off ramp right,arrive |
| waypoints | route | turns | locations |
| a,d | Hwy,Hwy | depart,arrive | a,d |
| f,d | on,Hwy,Hwy | depart,merge slight right,arrive | f,b,d |
| f,e | on,Hwy,off,off | depart,merge slight right,off ramp right,arrive | f,b,c,e |
| a,e | Hwy,off,off | depart,off ramp right,arrive | a,c,e |
@negative @straight
Scenario: Don't collapse going straight if actual turn
@ -808,8 +809,8 @@ Feature: Collapse
| ge | primary | second | no |
When I route I should get
| waypoints | route | turns |
| d,c | first,first,first | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
Scenario: Entering a segregated road slight turn
Given the node map
@ -830,8 +831,8 @@ Feature: Collapse
| ge | primary | second | no |
When I route I should get
| waypoints | route | turns |
| d,c | first,first,first | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
Scenario: Do not collapse UseLane step when lanes change
Given the node map
@ -855,8 +856,8 @@ Feature: Collapse
| di | | off |
When I route I should get
| waypoints | route | turns |
| a,e | main,main,main | depart,use lane straight,arrive |
| waypoints | route | turns | locations |
| a,e | main,main,main | depart,use lane straight,arrive | a,b,e |
Scenario: But _do_ collapse UseLane step when lanes stay the same
Given the node map
@ -912,10 +913,10 @@ Feature: Collapse
Given the node map
"""
i
j e d c h
k g a b f
j e ~ ~ ~ ~ d c h
|
|
k g ~ ~ ~ ~ a b f
"""
And the ways
@ -930,8 +931,8 @@ Feature: Collapse
| ej | primary | | off | yes |
When I route I should get
| waypoints | route | turns |
| k,j | on,ferry,road,road,ferry,off,off | depart,notification straight,notification straight,continue uturn,turn straight,notification straight,arrive |
| waypoints | route | turns | locations |
| k,j | on,ferry,road,road,ferry,off,off | depart,notification straight,notification straight,continue uturn,turn straight,notification straight,arrive | k,g,a,b,c,d,e,j |
# http://www.openstreetmap.org/#map=19/37.78090/-122.41251
Scenario: U-Turn onto unnamed-road
@ -954,8 +955,8 @@ Feature: Collapse
| ef | secondary | | down | yes |
When I route I should get
| waypoints | route | turns |
| a,1 | up,turn,, | depart,turn right,turn sharp right,arrive |
| waypoints | route | turns | locations |
| a,1 | up,turn,, | depart,turn right,turn sharp right,arrive | a,b,e,f,_ |
#http://www.openstreetmap.org/#map=19/52.48778/13.30024
Scenario: Hohenzollerdammbrücke

View File

@ -21,20 +21,22 @@ Feature: Slipways and Dedicated Turn Lanes
And the ways
| nodes | highway | name | oneway |
| abc | trunk | first | |
| ab | trunk | first | |
| bc | trunk | first | |
| cd | trunk | first | |
| bhf | trunk_link | | yes |
| cfg | primary | second | yes |
| ec | primary | second | |
| cf | primary | second | yes |
| fg | primary | second | yes |
| ec | primary | second | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | abc | cfg | c | no_right_turn |
| restriction | bc | cf | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,g | first,second,second | depart,turn right,arrive |
| a,1 | first,, | depart,turn right,arrive |
| waypoints | route | turns | locations |
| a,g | first,second,second | depart,turn right,arrive | a,b,g |
| a,1 | first,, | depart,turn right,arrive | a,b,_ |
Scenario: Turn Instead of Ramp
Given the node map
@ -117,20 +119,22 @@ Feature: Slipways and Dedicated Turn Lanes
And the ways
| nodes | highway | name | maxspeed | oneway |
| abc | trunk | first | 70 | |
| ab | trunk | first | 70 | |
| bc | trunk | first | 70 | |
| cd | trunk | first | 2 | |
| bhf | trunk_link | | 2 | yes |
| cfg | primary | second | 50 | yes |
| ec | primary | second | 50 | |
| cf | primary | second | 50 | yes |
| fg | primary | second | 50 | yes |
| ec | primary | second | 50 | yes |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | abc | cfg | c | no_right_turn |
| restriction | bc | cf | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,g | first,second,second | depart,turn right,arrive |
| a,1 | first,, | depart,turn right,arrive |
| waypoints | route | turns | locations |
| a,g | first,second,second | depart,turn right,arrive | a,b,g |
| a,1 | first,, | depart,turn right,arrive | a,b,_ |
Scenario: Turn Instead of Ramp
@ -161,8 +165,8 @@ Feature: Slipways and Dedicated Turn Lanes
| efg | primary | second |
When I route I should get
| waypoints | route | turns |
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive |
| waypoints | route | turns | locations |
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive | a,b,f,g |
Scenario: Turn Instead of Ramp
Given the node map
@ -188,8 +192,8 @@ Feature: Slipways and Dedicated Turn Lanes
| efg | primary | second |
When I route I should get
| waypoints | route | turns |
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive |
| waypoints | route | turns | locations |
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive | a,b,f,g |
Scenario: Inner city expressway with on road
Given the node map
@ -208,18 +212,20 @@ Feature: Slipways and Dedicated Turn Lanes
And the ways
| nodes | highway | name | oneway |
| abc | primary | road | |
| ab | primary | road | |
| bc | primary | road | |
| cg | primary | road | |
| bfd | trunk_link | | yes |
| cde | trunk | trunk | yes |
| cd | trunk | trunk | yes |
| de | trunk | trunk | yes |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | abc | cde | c | no_right_turn |
| restriction | bc | cd | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,e | road,trunk,trunk | depart,turn right,arrive |
| waypoints | route | turns | locations |
| a,e | road,trunk,trunk | depart,turn right,arrive | a,b,e |
Scenario: Slipway Round U-Turn
@ -242,8 +248,8 @@ Feature: Slipways and Dedicated Turn Lanes
| def | primary | road | yes |
When I route I should get
| waypoints | route | turns |
| a,f | road,road,road | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
Scenario: Slipway Steep U-Turn
Given the node map
@ -264,8 +270,8 @@ Feature: Slipways and Dedicated Turn Lanes
| def | primary | road | yes |
When I route I should get
| waypoints | route | turns |
| a,f | road,road,road | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
Scenario: Schwarzwaldstrasse Autobahn
Given the node map
@ -309,21 +315,21 @@ Feature: Slipways and Dedicated Turn Lanes
| qe | secondary_link | Ettlinger Allee | | yes |
When I route I should get
| waypoints | route | turns | ref |
| a,o | Schwarzwaldstrasse,Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | L561,L561, |
| waypoints | route | turns | ref | locations |
| a,o | Schwarzwaldstrasse,Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | L561,L561, | a,b,o |
Scenario: Traffic Lights everywhere
#http://map.project-osrm.org/?z=18&center=48.995336%2C8.383813&loc=48.995467%2C8.384548&loc=48.995115%2C8.382761&hl=en&alt=0
Given the node map
"""
a k l j
d b c i
a - - k-l-. j
''d'b-c-i
\ |
e g
1
\|
1\|
h
|
f
"""
@ -340,11 +346,11 @@ Feature: Slipways and Dedicated Turn Lanes
| jcghf | primary | Brauerstrasse | yes |
When I route I should get
| waypoints | route | turns |
| a,i | Ebertstrasse,Ebertstrasse | depart,arrive |
| a,l | Ebertstrasse,Ebertstrasse | depart,arrive |
| a,f | Ebertstrasse,Brauerstrasse,Brauerstrasse | depart,turn right,arrive |
| a,1 | Ebertstrasse,, | depart,turn slight right,arrive |
| waypoints | route | turns | locations |
| a,i | Ebertstrasse,Ebertstrasse | depart,arrive | a,i |
| a,l | Ebertstrasse,Ebertstrasse | depart,arrive | a,l |
| a,f | Ebertstrasse,Brauerstrasse,Brauerstrasse | depart,turn right,arrive | a,k,f |
| a,1 | Ebertstrasse,, | depart,turn slight right,arrive | a,k,_ |
#2839
Scenario: Self-Loop
@ -355,7 +361,7 @@ Feature: Slipways and Dedicated Turn Lanes
m \
/ i
/ \
| \
| \
| h
| |
n |
@ -390,7 +396,7 @@ Feature: Slipways and Dedicated Turn Lanes
m \
/ i
/ \
| \
| \
| h
| |
n |
@ -457,10 +463,10 @@ Feature: Slipways and Dedicated Turn Lanes
| g | traffic_signals |
When I route I should get
| waypoints | route | turns | # |
| a,d | new york,new york | depart,arrive | this is the sinatra route |
| a,j | new york,1st street,1st street | depart,turn left,arrive | |
| a,1 | new york,m street,1st street,1st street | depart,turn right,turn left,arrive | this can false be seen as a sliproad |
| waypoints | route | turns | locations | # |
| a,d | new york,new york | depart,arrive | a,d | this is the sinatra route |
| a,j | new york,1st street,1st street | depart,turn left,arrive | a,c,j | |
| a,1 | new york,m street,1st street,1st street | depart,turn right,turn left,arrive | a,b,g,_ | this can falsly be seen as a sliproad |
# Merging into degree two loop on dedicated turn detection / 2927
Scenario: Turn Instead of Ramp
@ -475,7 +481,7 @@ Feature: Slipways and Dedicated Turn Lanes
| |
| |
| |
\ /
\ /
\ /
\ /
b
@ -497,8 +503,8 @@ Feature: Slipways and Dedicated Turn Lanes
# We don't actually care about routes here, this is all about endless loops in turn discovery
When I route I should get
| waypoints | route | turns |
| a,i | road,road,road | depart,fork slight left,arrive |
| waypoints | route |
| a,i | road,road,road |
# The following tests are current false positives / false negatives #3199
@ -528,9 +534,9 @@ Feature: Slipways and Dedicated Turn Lanes
| hid | residential | Waldkauzsteig |
When I route I should get
| waypoints | route | turns |
| a,d | Nachtigallensteig,Kiebitzsteig,Kiebitzsteig | depart,turn left,arrive |
| a,h | Nachtigallensteig,Nachtigallensteig | depart,arrive |
| waypoints | route | turns | locations |
| a,d | Nachtigallensteig,Kiebitzsteig,Kiebitzsteig | depart,turn left,arrive | a,b,d |
| a,h | Nachtigallensteig,Nachtigallensteig | depart,arrive | a,h |
@sliproads
@ -554,8 +560,8 @@ Feature: Slipways and Dedicated Turn Lanes
| aeg | primary | aeg | yes |
When I route I should get
| waypoints | route | turns |
| s,f | sabc,aeg,dbef,dbef | depart,turn right,turn right,arrive |
| waypoints | route | turns | locations |
| s,f | sabc,aeg,dbef,dbef | depart,turn right,turn right,arrive | s,a,e,f |
@sliproads
Scenario: Through Street, not a Sliproad although obvious
@ -578,8 +584,8 @@ Feature: Slipways and Dedicated Turn Lanes
| aeg | primary | aeg | yes |
When I route I should get
| waypoints | route | turns |
| s,f | sabc,aeg,dbef,dbef | depart,turn right,turn right,arrive |
| waypoints | route | turns | locations |
| s,f | sabc,aeg,dbef,dbef | depart,turn right,turn right,arrive | s,a,e,f |
@sliproads
Scenario: Sliproad target turn is restricted
@ -614,9 +620,9 @@ Feature: Slipways and Dedicated Turn Lanes
| restriction | ae | ef | e | no_right_turn |
When I route I should get
| waypoints | route | turns |
| s,f | sabc,dbef,dbef | depart,turn right,arrive |
| s,g | sabc,aeg,aeg | depart,turn right,arrive |
| waypoints | route | turns | locations |
| s,f | sabc,dbef,dbef | depart,turn right,arrive | s,b,f |
| s,g | sabc,aeg,aeg | depart,turn right,arrive | s,a,g |
@sliproads
Scenario: Not a Sliproad, road not continuing straight
@ -636,9 +642,9 @@ Feature: Slipways and Dedicated Turn Lanes
| aeg | primary | aeg | yes |
When I route I should get
| waypoints | route | turns |
| s,c | sabc,sabc | depart,arrive |
| s,g | sabc,aeg,aeg | depart,turn right,arrive |
| waypoints | route | turns | locations |
| s,c | sabc,sabc | depart,arrive | s,c |
| s,g | sabc,aeg,aeg | depart,turn right,arrive | s,a,g |
@sliproads
Scenario: Intersection too far away with Traffic Light shortly after initial split
@ -671,8 +677,8 @@ Feature: Slipways and Dedicated Turn Lanes
| ae | primary | ae | yes |
When I route I should get
| waypoints | route | turns |
| s,f | sabc,ae,dbef,dbef | depart,turn slight right,turn right,arrive |
| waypoints | route | turns | locations |
| s,f | sabc,ae,dbef,dbef | depart,turn slight right,turn right,arrive | s,a,e,f |
@sliproads
Scenario: Traffic Signal on Sliproad
@ -704,8 +710,8 @@ Feature: Slipways and Dedicated Turn Lanes
| ate | primary | ate | yes |
When I route I should get
| waypoints | route | turns |
| s,f | sabc,ef,ef | depart,turn right,arrive |
| waypoints | route | turns | locations |
| s,f | sabc,ef,ef | depart,turn right,arrive | s,a,f |
@sliproads
Scenario: Sliproad tagged as link
@ -732,8 +738,8 @@ Feature: Slipways and Dedicated Turn Lanes
| ae | motorway_link | ae | yes |
When I route I should get
| waypoints | route | turns |
| s,f | sabc,dbef,dbef | depart,turn right,arrive |
| waypoints | route | turns | locations |
| s,f | sabc,dbef,dbef | depart,turn right,arrive | s,a,f |
@sliproads
Scenario: Sliproad with same-ish names
@ -759,8 +765,8 @@ Feature: Slipways and Dedicated Turn Lanes
| af | primary | sliproad | | yes |
When I route I should get
| waypoints | route | turns |
| s,t | main,crossing,crossing | depart,turn right,arrive |
| waypoints | route | turns | locations |
| s,t | main,crossing,crossing | depart,turn right,arrive | s,a,t |
@sliproads
Scenario: Not a Sliproad, name mismatch
@ -788,8 +794,8 @@ Feature: Slipways and Dedicated Turn Lanes
| af | primary | sliproad | yes |
When I route I should get
| waypoints | route | turns |
| s,t | main,away,away | depart,turn right,arrive |
| waypoints | route | turns | locations |
| s,t | main,away,away | depart,turn right,arrive | s,a,t |
@sliproads
Scenario: Not a Sliproad, low road priority
@ -818,8 +824,8 @@ Feature: Slipways and Dedicated Turn Lanes
| af | service | sliproad | 30 km/h | yes |
When I route I should get
| waypoints | route | turns |
| s,t | main,away,away | depart,turn right,arrive |
| waypoints | route | turns | locations |
| s,t | main,away,away | depart,turn right,arrive | s,a,t |
@sliproads
Scenario: Not a Sliproad, more than three roads at target intersection
@ -848,8 +854,8 @@ Feature: Slipways and Dedicated Turn Lanes
| af | primary | sliproad | yes |
When I route I should get
| waypoints | route | turns |
| s,g | main,sliproad,another,another | depart,turn right,turn left,arrive |
| waypoints | route | turns | locations |
| s,g | main,sliproad,another,another | depart,turn right,turn left,arrive | s,a,f,g |
@sliproads:
Scenario: Throughabout-Sliproad

View File

@ -25,20 +25,20 @@ Feature: Staggered Intersections
| jcdehi | residential | Cedar Dr |
When I route I should get
| waypoints | route | turns |
| a,g | Oak St,Oak St | depart,arrive |
| g,a | Oak St,Oak St | depart,arrive |
| waypoints | route | turns | locations |
| a,g | Oak St,Oak St | depart,arrive | a,g |
| g,a | Oak St,Oak St | depart,arrive | g,a |
Scenario: Staggered Intersection: do not collapse if long segment in between
Given the node map
"""
j
a b c
|
|
d
|
|
e f g
h
i
@ -51,16 +51,18 @@ Feature: Staggered Intersections
| jcdehi | residential | Cedar Dr |
When I route I should get
| waypoints | route | turns |
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
| g,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
| waypoints | route | turns | locations |
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | a,c,e,g |
| g,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | g,e,c,a |
Scenario: Staggered Intersection: do not collapse if not left-right or right-left
Given the node map
"""
j
a b c
|
d
|
g f e
h
i
@ -73,9 +75,9 @@ Feature: Staggered Intersections
| jcdehi | residential | Cedar Dr |
When I route I should get
| waypoints | route | turns |
| a,g | Oak St,Oak St,Oak St | depart,continue uturn,arrive |
| g,a | Oak St,Oak St,Oak St | depart,continue uturn,arrive |
| waypoints | route | turns | locations |
| a,g | Oak St,Oak St,Oak St | depart,continue uturn,arrive | a,c,g |
| g,a | Oak St,Oak St,Oak St | depart,continue uturn,arrive | g,e,a |
Scenario: Staggered Intersection: do not collapse if the names are not the same
Given the node map
@ -95,9 +97,9 @@ Feature: Staggered Intersections
| jcdehi | residential | Cedar Dr |
When I route I should get
| waypoints | route | turns |
| a,g | Oak St,Cedar Dr,Elm St,Elm St | depart,turn right,turn left,arrive |
| g,a | Elm St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
| waypoints | route | turns | locations |
| a,g | Oak St,Cedar Dr,Elm St,Elm St | depart,turn right,turn left,arrive | a,c,e,g |
| g,a | Elm St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | g,e,c,a |
Scenario: Staggered Intersection: do not collapse if a mode change is involved
Given the node map
@ -117,9 +119,9 @@ Feature: Staggered Intersections
| jcdeh | primary | road | |
When I route I should get
| waypoints | route | turns | modes |
| a,g | to_sea,road,to_sea,road,road | depart,turn right,turn left,notification straight,arrive | driving,driving,ferry,driving,driving |
| g,a | road,to_sea,road,to_sea,to_sea | depart,notification straight,turn right,turn left,arrive | driving,ferry,driving,driving,driving |
| waypoints | route | turns | modes | locations |
| a,g | to_sea,road,to_sea,road,road | depart,turn right,turn left,notification straight,arrive | driving,driving,ferry,driving,driving | a,c,e,f,g |
| g,a | road,to_sea,road,to_sea,to_sea | depart,notification straight,turn right,turn left,arrive | driving,ferry,driving,driving,driving | g,f,e,c,a |
Scenario: Staggered Intersection: do not collapse intermediary intersections
Given the node map
@ -127,7 +129,9 @@ Feature: Staggered Intersections
j
a b c
e f g
|
d
|
k l m
i
"""
@ -140,6 +144,6 @@ Feature: Staggered Intersections
| jcedki | residential | Cedar Dr |
When I route I should get
| waypoints | route | turns |
| a,m | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
| m,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
| waypoints | route | turns | locations |
| a,m | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | a,c,k,m |
| m,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | m,k,c,a |

View File

@ -3,6 +3,7 @@ Feature: Handling of UTF characters
Background:
Given the profile "testbot"
Given a grid size of 1000 meters
Scenario: Streetnames with UTF characters
Given the node map