emit exit roundabout on turns only when mode changes
This commit is contained in:
parent
8319a96aed
commit
8ec3c83d82
@ -942,8 +942,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
|||||||
| restriction | bc | cd | c | only_straight |
|
| restriction | bc | cd | c | only_straight |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| a,k | road,,,, | depart,turn right,roundabout turn right exit-1,exit roundabout turn right,arrive | a,b,h,i,k |
|
| a,k | road,,, | depart,turn right,roundabout turn right exit-1,arrive | a,b,h,k |
|
||||||
|
|
||||||
@sliproads
|
@sliproads
|
||||||
Scenario: Sliproad with 4 roads at target
|
Scenario: Sliproad with 4 roads at target
|
||||||
|
@ -159,19 +159,19 @@ Feature: Rotary
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,rotary and exit right,arrive |
|
| a,c | abc,abc,abc | depart,exit rotary right,arrive |
|
||||||
| a,l | abc,jkl,jkl,jkl | depart,bkheb-exit-2,exit rotary straight,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,bkheb-exit-2,exit rotary straight,arrive |
|
||||||
| a,i | abc,ghi,ghi,ghi | depart,bkheb-exit-3,exit rotary straight,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,bkheb-exit-3,exit rotary straight,arrive |
|
||||||
| a,f | abc,def,def,def | depart,bkheb-exit-4,exit rotary straight,arrive |
|
| a,f | abc,def,def,def | depart,bkheb-exit-4,exit rotary straight,arrive |
|
||||||
| d,f | def,def,def | depart,rotary and exit right,arrive |
|
| d,f | def,def,def | depart,exit rotary right,arrive |
|
||||||
| d,c | def,abc,abc,abc | depart,bkheb-exit-2,exit rotary straight,arrive |
|
| d,c | def,abc,abc,abc | depart,bkheb-exit-2,exit rotary straight,arrive |
|
||||||
| d,l | def,jkl,jkl,jkl | depart,bkheb-exit-3,exit rotary straight,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,bkheb-exit-3,exit rotary straight,arrive |
|
||||||
| d,i | def,ghi,ghi,ghi | depart,bkheb-exit-4,exit rotary straight,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,bkheb-exit-4,exit rotary straight,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,rotary and exit right,arrive |
|
| g,i | ghi,ghi,ghi | depart,exit rotary right,arrive |
|
||||||
| g,f | ghi,def,def,def | depart,bkheb-exit-2,exit rotary straight,arrive |
|
| g,f | ghi,def,def,def | depart,bkheb-exit-2,exit rotary straight,arrive |
|
||||||
| g,c | ghi,abc,abc,abc | depart,bkheb-exit-3,exit rotary straight,arrive |
|
| g,c | ghi,abc,abc,abc | depart,bkheb-exit-3,exit rotary straight,arrive |
|
||||||
| g,l | ghi,jkl,jkl,jkl | depart,bkheb-exit-4,exit rotary straight,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,bkheb-exit-4,exit rotary straight,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,rotary and exit right,arrive |
|
| j,l | jkl,jkl,jkl | depart,exit rotary right,arrive |
|
||||||
| j,i | jkl,ghi,ghi,ghi | depart,bkheb-exit-2,exit rotary straight,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,bkheb-exit-2,exit rotary straight,arrive |
|
||||||
| j,f | jkl,def,def,def | depart,bkheb-exit-3,exit rotary straight,arrive |
|
| j,f | jkl,def,def,def | depart,bkheb-exit-3,exit rotary straight,arrive |
|
||||||
| j,c | jkl,abc,abc,abc | depart,bkheb-exit-4,exit rotary straight,arrive |
|
| j,c | jkl,abc,abc,abc | depart,bkheb-exit-4,exit rotary straight,arrive |
|
||||||
|
@ -5,39 +5,6 @@ Feature: Basic Roundabout
|
|||||||
Given the profile "bicycle"
|
Given the profile "bicycle"
|
||||||
Given a grid size of 10 meters
|
Given a grid size of 10 meters
|
||||||
|
|
||||||
Scenario: Only Enter
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a
|
|
||||||
b
|
|
||||||
d c g h
|
|
||||||
e
|
|
||||||
f
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | junction |
|
|
||||||
| ab | |
|
|
||||||
| cd | |
|
|
||||||
| ef | |
|
|
||||||
| gh | |
|
|
||||||
| bcegb | roundabout |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| waypoints | route | turns |
|
|
||||||
| a,c | ab,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| a,e | ab,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| a,g | ab,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| d,e | cd,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| d,g | cd,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| d,b | cd,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| f,g | ef,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| f,b | ef,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| f,c | ef,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| h,b | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| h,c | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
| h,e | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
|
||||||
|
|
||||||
Scenario: Only Exit
|
Scenario: Only Exit
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
@ -57,54 +24,21 @@ Feature: Basic Roundabout
|
|||||||
| bcegb | roundabout |
|
| bcegb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| b,d | bcegb,cd,cd | depart,exit roundabout turn right,arrive |
|
| b,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| b,f | bcegb,ef,ef | depart,exit roundabout turn right,arrive |
|
| b,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| b,h | bcegb,gh,gh | depart,exit roundabout turn right,arrive |
|
| b,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,f | bcegb,ef,ef | depart,exit roundabout turn right,arrive |
|
| c,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| c,h | bcegb,gh,gh | depart,exit roundabout turn right,arrive |
|
| c,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,a | bcegb,ab,ab | depart,exit roundabout turn right,arrive |
|
| c,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,h | bcegb,gh,gh | depart,exit roundabout turn right,arrive |
|
| e,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| e,a | bcegb,ab,ab | depart,exit roundabout turn right,arrive |
|
| e,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,d | bcegb,cd,cd | depart,exit roundabout turn right,arrive |
|
| e,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,a | bcegb,ab,ab | depart,exit roundabout turn right,arrive |
|
| g,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| g,d | bcegb,cd,cd | depart,exit roundabout turn right,arrive |
|
| g,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,f | bcegb,ef,ef | depart,exit roundabout turn right,arrive |
|
| g,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
||||||
|
|
||||||
Scenario: Drive Around
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a
|
|
||||||
b
|
|
||||||
d c g h
|
|
||||||
e
|
|
||||||
f
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | junction |
|
|
||||||
| ab | |
|
|
||||||
| cd | |
|
|
||||||
| ef | |
|
|
||||||
| gh | |
|
|
||||||
| bcegb | roundabout |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| waypoints | route | turns |
|
|
||||||
| b,c | bcegb,bcegb | depart,arrive |
|
|
||||||
| b,e | bcegb,bcegb | depart,arrive |
|
|
||||||
| b,g | bcegb,bcegb | depart,arrive |
|
|
||||||
| c,e | bcegb,bcegb | depart,arrive |
|
|
||||||
| c,g | bcegb,bcegb | depart,arrive |
|
|
||||||
| c,b | bcegb,bcegb | depart,arrive |
|
|
||||||
| e,g | bcegb,bcegb | depart,arrive |
|
|
||||||
| e,b | bcegb,bcegb | depart,arrive |
|
|
||||||
| e,c | bcegb,bcegb | depart,arrive |
|
|
||||||
| g,b | bcegb,bcegb | depart,arrive |
|
|
||||||
| g,c | bcegb,bcegb | depart,arrive |
|
|
||||||
| g,e | bcegb,bcegb | depart,arrive |
|
|
||||||
|
|
||||||
Scenario: Mixed Entry and Exit
|
Scenario: Mixed Entry and Exit
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
@ -125,19 +59,19 @@ Feature: Basic Roundabout
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,roundabout and exit right,arrive |
|
| a,c | abc,abc,abc | depart,exit roundabout right,arrive |
|
||||||
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| a,f | abc,def,def,def | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| a,f | abc,def,def,def | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| d,f | def,def,def | depart,roundabout and exit right,arrive |
|
| d,f | def,def,def | depart,exit roundabout right,arrive |
|
||||||
| d,c | def,abc,abc,abc | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| d,c | def,abc,abc,abc | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,roundabout and exit right,arrive |
|
| g,i | ghi,ghi,ghi | depart,exit roundabout right,arrive |
|
||||||
| g,f | ghi,def,def,def | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| g,f | ghi,def,def,def | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,roundabout and exit right,arrive |
|
| j,l | jkl,jkl,jkl | depart,exit roundabout right,arrive |
|
||||||
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| j,f | jkl,def,def,def | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| j,f | jkl,def,def,def | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
|
@ -27,10 +27,10 @@ Feature: Basic Roundabout
|
|||||||
| bcegb | roundabout |
|
| bcegb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd,cd | depart,roundabout turn left exit-1,exit roundabout turn left,arrive |
|
| a,d | ab,cd,cd | depart,roundabout turn left exit-1,arrive |
|
||||||
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-2,exit roundabout turn left,arrive |
|
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
|
||||||
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-3,exit roundabout turn left,arrive |
|
| a,h | ab,gh,gh | depart,roundabout turn right exit-3,arrive |
|
||||||
|
|
||||||
Scenario: Mixed Entry and Exit
|
Scenario: Mixed Entry and Exit
|
||||||
And a grid size of 10 meters
|
And a grid size of 10 meters
|
||||||
@ -53,6 +53,6 @@ Feature: Basic Roundabout
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| c,a | cba,cba,cba | depart,roundabout and exit left,arrive |
|
| c,a | cba,cba,cba | depart,exit roundabout left,arrive |
|
||||||
| l,a | lkj,cba,cba,cba | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| l,a | lkj,cba,cba,cba | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| i,a | ihg,cba,cba,cba | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| i,a | ihg,cba,cba,cba | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
|
@ -5,39 +5,6 @@ Feature: Basic Roundabout
|
|||||||
Given the profile "bicycle"
|
Given the profile "bicycle"
|
||||||
Given a grid size of 10 meters
|
Given a grid size of 10 meters
|
||||||
|
|
||||||
Scenario: Enter and Exit
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a
|
|
||||||
b
|
|
||||||
h g c d
|
|
||||||
e
|
|
||||||
f
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | junction |
|
|
||||||
| ab | |
|
|
||||||
| cd | |
|
|
||||||
| ef | |
|
|
||||||
| gh | |
|
|
||||||
| bgecb | roundabout |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| waypoints | route | turns |
|
|
||||||
| a,d | ab,cd,cd,cd | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
|
||||||
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
|
||||||
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
|
||||||
| d,f | cd,ef,ef,ef | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
|
||||||
| d,h | cd,gh,gh,gh | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
|
||||||
| d,a | cd,ab,ab,ab | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
|
||||||
| f,h | ef,gh,gh,gh | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
|
||||||
| f,a | ef,ab,ab,ab | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
|
||||||
| f,d | ef,cd,cd,cd | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
|
||||||
| h,a | gh,ab,ab,ab | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
|
||||||
| h,d | gh,cd,cd,cd | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
|
||||||
| h,f | gh,ef,ef,ef | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
|
||||||
|
|
||||||
# https://www.openstreetmap.org/way/223225602
|
# https://www.openstreetmap.org/way/223225602
|
||||||
Scenario: Enter and Exit with changing mode
|
Scenario: Enter and Exit with changing mode
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -58,16 +25,16 @@ Feature: Basic Roundabout
|
|||||||
| bgecb | roundabout | residential |
|
| bgecb | roundabout | residential |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd,cd | depart,roundabout turn left exit-1,exit roundabout turn right,arrive |
|
| a,d | ab,cd,cd | depart,roundabout turn left exit-1,arrive |
|
||||||
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-1,exit roundabout turn right,arrive |
|
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-1,exit roundabout right,arrive |
|
||||||
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-1,exit roundabout right,arrive |
|
||||||
| d,f | cd,ef,ef,ef | depart,roundabout turn left exit-2,exit roundabout turn right,arrive |
|
| d,f | cd,ef,ef,ef | depart,roundabout turn left exit-2,exit roundabout right,arrive |
|
||||||
| d,h | cd,gh,gh,gh | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| d,h | cd,gh,gh,gh | depart,roundabout turn straight exit-2,exit roundabout right,arrive |
|
||||||
| d,a | cd,ab,ab,ab | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
||||||
| f,h | ef,gh,gh,gh | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| f,h | ef,gh,gh,gh | depart,roundabout turn left exit-3,exit roundabout right,arrive |
|
||||||
| f,a | ef,ab,ab,ab | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
||||||
| f,d | ef,cd,cd,cd | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
||||||
| h,a | gh,ab,ab,ab | depart,roundabout turn left exit-2,exit roundabout turn right,arrive |
|
| h,a | gh,ab,ab | depart,roundabout turn left exit-2,arrive |
|
||||||
| h,d | gh,cd,cd,cd | depart,roundabout turn straight exit-1,exit roundabout turn right,arrive |
|
| h,d | gh,cd,cd | depart,roundabout turn straight exit-1,arrive |
|
||||||
| h,f | gh,ef,ef,ef | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| h,f | gh,ef,ef,ef | depart,roundabout turn right exit-1,exit roundabout right,arrive |
|
||||||
|
@ -24,19 +24,19 @@ Feature: Basic Roundabout
|
|||||||
| bgecb | roundabout |
|
| bgecb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd,cd | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive |
|
||||||
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
|
||||||
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive |
|
||||||
| d,f | cd,ef,ef,ef | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| d,f | cd,ef,ef | depart,roundabout turn left exit-3,arrive |
|
||||||
| d,h | cd,gh,gh,gh | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| d,h | cd,gh,gh | depart,roundabout turn straight exit-2,arrive |
|
||||||
| d,a | cd,ab,ab,ab | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
||||||
| f,h | ef,gh,gh,gh | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| f,h | ef,gh,gh | depart,roundabout turn left exit-3,arrive |
|
||||||
| f,a | ef,ab,ab,ab | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
||||||
| f,d | ef,cd,cd,cd | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
||||||
| h,a | gh,ab,ab,ab | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| h,a | gh,ab,ab | depart,roundabout turn left exit-3,arrive |
|
||||||
| h,d | gh,cd,cd,cd | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| h,d | gh,cd,cd | depart,roundabout turn straight exit-2,arrive |
|
||||||
| h,f | gh,ef,ef,ef | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| h,f | gh,ef,ef | depart,roundabout turn right exit-1,arrive |
|
||||||
|
|
||||||
Scenario: Enter and Exit - Rotated
|
Scenario: Enter and Exit - Rotated
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -56,19 +56,19 @@ Feature: Basic Roundabout
|
|||||||
| bgecb | roundabout |
|
| bgecb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd,cd | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive |
|
||||||
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
|
||||||
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive |
|
||||||
| d,f | cd,ef,ef,ef | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| d,f | cd,ef,ef | depart,roundabout turn left exit-3,arrive |
|
||||||
| d,h | cd,gh,gh,gh | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| d,h | cd,gh,gh | depart,roundabout turn straight exit-2,arrive |
|
||||||
| d,a | cd,ab,ab,ab | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
||||||
| f,h | ef,gh,gh,gh | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| f,h | ef,gh,gh | depart,roundabout turn left exit-3,arrive |
|
||||||
| f,a | ef,ab,ab,ab | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
||||||
| f,d | ef,cd,cd,cd | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
||||||
| h,a | gh,ab,ab,ab | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| h,a | gh,ab,ab | depart,roundabout turn left exit-3,arrive |
|
||||||
| h,d | gh,cd,cd,cd | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| h,d | gh,cd,cd | depart,roundabout turn straight exit-2,arrive |
|
||||||
| h,f | gh,ef,ef,ef | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| h,f | gh,ef,ef | depart,roundabout turn right exit-1,arrive |
|
||||||
|
|
||||||
Scenario: Only Enter
|
Scenario: Only Enter
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -122,19 +122,19 @@ Feature: Basic Roundabout
|
|||||||
| bcegb | roundabout |
|
| bcegb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| b,d | bcegb,cd,cd | depart,exit roundabout turn right,arrive |
|
| b,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| b,f | bcegb,ef,ef | depart,exit roundabout turn right,arrive |
|
| b,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| b,h | bcegb,gh,gh | depart,exit roundabout turn right,arrive |
|
| b,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,f | bcegb,ef,ef | depart,exit roundabout turn right,arrive |
|
| c,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| c,h | bcegb,gh,gh | depart,exit roundabout turn right,arrive |
|
| c,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,a | bcegb,ab,ab | depart,exit roundabout turn right,arrive |
|
| c,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,h | bcegb,gh,gh | depart,exit roundabout turn right,arrive |
|
| e,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| e,a | bcegb,ab,ab | depart,exit roundabout turn right,arrive |
|
| e,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,d | bcegb,cd,cd | depart,exit roundabout turn right,arrive |
|
| e,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,a | bcegb,ab,ab | depart,exit roundabout turn right,arrive |
|
| g,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| g,d | bcegb,cd,cd | depart,exit roundabout turn right,arrive |
|
| g,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,f | bcegb,ef,ef | depart,exit roundabout turn right,arrive |
|
| g,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
||||||
|
|
||||||
Scenario: Drive Around
|
Scenario: Drive Around
|
||||||
@ -190,19 +190,19 @@ Feature: Basic Roundabout
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,roundabout and exit right,arrive |
|
| a,c | abc,abc,abc | depart,exit roundabout right,arrive |
|
||||||
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| a,f | abc,def,def,def | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| a,f | abc,def,def,def | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| d,f | def,def,def | depart,roundabout and exit right,arrive |
|
| d,f | def,def,def | depart,exit roundabout right,arrive |
|
||||||
| d,c | def,abc,abc,abc | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| d,c | def,abc,abc,abc | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,roundabout and exit right,arrive |
|
| g,i | ghi,ghi,ghi | depart,exit roundabout right,arrive |
|
||||||
| g,f | ghi,def,def,def | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| g,f | ghi,def,def,def | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,roundabout and exit right,arrive |
|
| j,l | jkl,jkl,jkl | depart,exit roundabout right,arrive |
|
||||||
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| j,f | jkl,def,def,def | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| j,f | jkl,def,def,def | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
@ -259,9 +259,9 @@ Feature: Basic Roundabout
|
|||||||
| df | |
|
| df | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ab,ce,ce,ce | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| a,e | ab,ce,ce | depart,roundabout turn right exit-1,arrive |
|
||||||
| a,f | ab,df,df,df | depart,roundabout turn straight exit-2,exit roundabout turn straight,arrive |
|
| a,f | ab,df,df | depart,roundabout turn straight exit-2,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in Y
|
Scenario: Collinear in Y
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -281,9 +281,9 @@ Feature: Basic Roundabout
|
|||||||
| df | |
|
| df | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ab,ce,ce,ce | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| a,e | ab,ce,ce | depart,roundabout turn right exit-1,arrive |
|
||||||
| a,f | ab,df,df,df | depart,roundabout turn straight exit-2,exit roundabout turn straight,arrive |
|
| a,f | ab,df,df | depart,roundabout turn straight exit-2,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in X,Y
|
Scenario: Collinear in X,Y
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -302,9 +302,9 @@ Feature: Basic Roundabout
|
|||||||
| df | |
|
| df | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ab,ce,ce,ce | depart,roundabout turn straight exit-1,exit roundabout turn straight,arrive |
|
| a,e | ab,ce,ce | depart,roundabout turn straight exit-1,arrive |
|
||||||
| a,f | ab,df,df,df | depart,roundabout turn left exit-2,exit roundabout turn straight,arrive |
|
| a,f | ab,df,df | depart,roundabout turn left exit-2,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in X,Y
|
Scenario: Collinear in X,Y
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -323,9 +323,9 @@ Feature: Basic Roundabout
|
|||||||
| cf | |
|
| cf | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ad,be,be,be | depart,roundabout turn straight exit-1,exit roundabout turn straight,arrive |
|
| a,e | ad,be,be | depart,roundabout turn straight exit-1,arrive |
|
||||||
| a,f | ad,cf,cf,cf | depart,roundabout turn left exit-2,exit roundabout turn straight,arrive |
|
| a,f | ad,cf,cf | depart,roundabout turn left exit-2,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in X,Y
|
Scenario: Collinear in X,Y
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -344,9 +344,9 @@ Feature: Basic Roundabout
|
|||||||
| bf | |
|
| bf | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ac,de,de,de | depart,roundabout turn straight exit-1,exit roundabout turn straight,arrive |
|
| a,e | ac,de,de | depart,roundabout turn straight exit-1,arrive |
|
||||||
| a,f | ac,bf,bf,bf | depart,roundabout turn left exit-2,exit roundabout turn straight,arrive |
|
| a,f | ac,bf,bf | depart,roundabout turn left exit-2,arrive |
|
||||||
|
|
||||||
Scenario: Enter and Exit -- too complex
|
Scenario: Enter and Exit -- too complex
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -434,10 +434,10 @@ Feature: Basic Roundabout
|
|||||||
| bgecb | roundabout |
|
| bgecb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | bearing |
|
| waypoints | route | turns | bearing |
|
||||||
| a,d | ab,cd,cd,cd | depart,roundabout turn left exit-3,exit roundabout turn right,arrive | 0->180,180->225,45->90,90->0 |
|
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive | 0->180,180->225,90->0 |
|
||||||
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive | 0->180,180->225,135->180,180->0 |
|
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive | 0->180,180->225,180->0 |
|
||||||
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-1,exit roundabout turn right,arrive | 0->180,180->225,225->270,270->0 |
|
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive | 0->180,180->225,270->0 |
|
||||||
|
|
||||||
Scenario: Enter and Exit - Bearings
|
Scenario: Enter and Exit - Bearings
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -460,10 +460,10 @@ Feature: Basic Roundabout
|
|||||||
| bigjekclb | roundabout |
|
| bigjekclb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | bearing |
|
| waypoints | route | turns | bearing |
|
||||||
| a,d | ab,cd,cd,cd | depart,roundabout turn left exit-3,exit roundabout turn right,arrive | 0->180,180->270,0->90,90->0 |
|
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive | 0->180,180->270,90->0 |
|
||||||
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive | 0->180,180->270,90->180,180->0 |
|
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive | 0->180,180->270,180->0 |
|
||||||
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-1,exit roundabout turn right,arrive | 0->180,180->270,180->270,270->0 |
|
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive | 0->180,180->270,270->0 |
|
||||||
|
|
||||||
Scenario: Large radius Roundabout Intersection and ways modelled out: East Mission St, North 7th St
|
Scenario: Large radius Roundabout Intersection and ways modelled out: East Mission St, North 7th St
|
||||||
# http://www.openstreetmap.org/way/348812150
|
# http://www.openstreetmap.org/way/348812150
|
||||||
@ -494,19 +494,19 @@ Feature: Basic Roundabout
|
|||||||
| bcdfgijkmnb | roundabout | tertiary | Roundabout |
|
| bcdfgijkmnb | roundabout | tertiary | Roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | North 7th St,East Mission St,East Mission St,East Mission St | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| a,e | North 7th St,East Mission St,East Mission St | depart,roundabout turn right exit-1,arrive |
|
||||||
| a,h | North 7th St,North 7th St,North 7th St,North 7th St | depart,roundabout turn straight exit-2,exit roundabout turn slight right,arrive |
|
| a,h | North 7th St,North 7th St,North 7th St | depart,roundabout turn straight exit-2,arrive |
|
||||||
| a,l | North 7th St,East Mission St,East Mission St,East Mission St | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| a,l | North 7th St,East Mission St,East Mission St | depart,roundabout turn left exit-3,arrive |
|
||||||
| h,l | North 7th St,East Mission St,East Mission St,East Mission St | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| h,l | North 7th St,East Mission St,East Mission St | depart,roundabout turn right exit-1,arrive |
|
||||||
| h,a | North 7th St,North 7th St,North 7th St,North 7th St | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| h,a | North 7th St,North 7th St,North 7th St | depart,roundabout turn straight exit-2,arrive |
|
||||||
| h,e | North 7th St,East Mission St,East Mission St,East Mission St | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| h,e | North 7th St,East Mission St,East Mission St | depart,roundabout turn left exit-3,arrive |
|
||||||
| e,h | East Mission St,North 7th St,North 7th St,North 7th St | depart,roundabout turn right exit-1,exit roundabout turn slight right,arrive |
|
| e,h | East Mission St,North 7th St,North 7th St | depart,roundabout turn right exit-1,arrive |
|
||||||
| e,l | East Mission St,East Mission St,East Mission St,East Mission St | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| e,l | East Mission St,East Mission St,East Mission St | depart,roundabout turn straight exit-2,arrive |
|
||||||
| e,a | East Mission St,North 7th St,North 7th St,North 7th St | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| e,a | East Mission St,North 7th St,North 7th St | depart,roundabout turn left exit-3,arrive |
|
||||||
| l,a | East Mission St,North 7th St,North 7th St,North 7th St | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| l,a | East Mission St,North 7th St,North 7th St | depart,roundabout turn right exit-1,arrive |
|
||||||
| l,e | East Mission St,East Mission St,East Mission St,East Mission St | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| l,e | East Mission St,East Mission St,East Mission St | depart,roundabout turn straight exit-2,arrive |
|
||||||
| l,h | East Mission St,North 7th St,North 7th St,North 7th St | depart,roundabout turn left exit-3,exit roundabout turn slight right,arrive |
|
| l,h | East Mission St,North 7th St,North 7th St | depart,roundabout turn left exit-3,arrive |
|
||||||
|
|
||||||
Scenario: Enter and Exit - Traffic Signals
|
Scenario: Enter and Exit - Traffic Signals
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -534,19 +534,19 @@ Feature: Basic Roundabout
|
|||||||
| bigjekclb | roundabout |
|
| bigjekclb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd,cd | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive |
|
||||||
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
|
||||||
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive |
|
||||||
| d,f | cd,ef,ef,ef | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| d,f | cd,ef,ef | depart,roundabout turn left exit-3,arrive |
|
||||||
| d,h | cd,gh,gh,gh | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| d,h | cd,gh,gh | depart,roundabout turn straight exit-2,arrive |
|
||||||
| d,a | cd,ab,ab,ab | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
||||||
| f,h | ef,gh,gh,gh | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| f,h | ef,gh,gh | depart,roundabout turn left exit-3,arrive |
|
||||||
| f,a | ef,ab,ab,ab | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
||||||
| f,d | ef,cd,cd,cd | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
||||||
| h,a | gh,ab,ab,ab | depart,roundabout turn left exit-3,exit roundabout turn right,arrive |
|
| h,a | gh,ab,ab | depart,roundabout turn left exit-3,arrive |
|
||||||
| h,d | gh,cd,cd,cd | depart,roundabout turn straight exit-2,exit roundabout turn right,arrive |
|
| h,d | gh,cd,cd | depart,roundabout turn straight exit-2,arrive |
|
||||||
| h,f | gh,ef,ef,ef | depart,roundabout turn right exit-1,exit roundabout turn right,arrive |
|
| h,f | gh,ef,ef | depart,roundabout turn right exit-1,arrive |
|
||||||
|
|
||||||
#http://www.openstreetmap.org/#map=19/41.03275/-2.18990
|
#http://www.openstreetmap.org/#map=19/41.03275/-2.18990
|
||||||
#at some point we probably want to recognise these situations and don't mention the roundabout at all here
|
#at some point we probably want to recognise these situations and don't mention the roundabout at all here
|
||||||
|
@ -98,19 +98,19 @@ Feature: Basic Roundabout
|
|||||||
| bcegb | roundabout |
|
| bcegb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| b,d | bcegb,cd,cd | depart,exit roundabout turn right,arrive |
|
| b,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| b,f | bcegb,ef,ef | depart,exit roundabout turn right,arrive |
|
| b,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| b,h | bcegb,gh,gh | depart,exit roundabout turn right,arrive |
|
| b,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,f | bcegb,ef,ef | depart,exit roundabout turn right,arrive |
|
| c,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| c,h | bcegb,gh,gh | depart,exit roundabout turn right,arrive |
|
| c,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,a | bcegb,ab,ab | depart,exit roundabout turn right,arrive |
|
| c,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,h | bcegb,gh,gh | depart,exit roundabout turn right,arrive |
|
| e,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| e,a | bcegb,ab,ab | depart,exit roundabout turn right,arrive |
|
| e,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,d | bcegb,cd,cd | depart,exit roundabout turn right,arrive |
|
| e,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,a | bcegb,ab,ab | depart,exit roundabout turn right,arrive |
|
| g,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| g,d | bcegb,cd,cd | depart,exit roundabout turn right,arrive |
|
| g,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,f | bcegb,ef,ef | depart,exit roundabout turn right,arrive |
|
| g,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
||||||
|
|
||||||
Scenario: Drive Around
|
Scenario: Drive Around
|
||||||
@ -166,19 +166,19 @@ Feature: Basic Roundabout
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,roundabout and exit right,arrive |
|
| a,c | abc,abc,abc | depart,exit roundabout right,arrive |
|
||||||
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| a,f | abc,def,def,def | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| a,f | abc,def,def,def | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| d,f | def,def,def | depart,roundabout and exit right,arrive |
|
| d,f | def,def,def | depart,exit roundabout right,arrive |
|
||||||
| d,c | def,abc,abc,abc | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| d,c | def,abc,abc,abc | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,roundabout and exit right,arrive |
|
| g,i | ghi,ghi,ghi | depart,exit roundabout right,arrive |
|
||||||
| g,f | ghi,def,def,def | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| g,f | ghi,def,def,def | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,roundabout and exit right,arrive |
|
| j,l | jkl,jkl,jkl | depart,exit roundabout right,arrive |
|
||||||
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| j,f | jkl,def,def,def | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
| j,f | jkl,def,def,def | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
@ -764,7 +764,7 @@ Feature: Basic Roundabout
|
|||||||
| e,f | 90 90 | edf,edf | depart,arrive |
|
| e,f | 90 90 | edf,edf | depart,arrive |
|
||||||
| e,h | 90 135 | edf,gch,gch,gch | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
| e,h | 90 135 | edf,gch,gch,gch | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| g,f | 45 90 | gch,edf,edf,edf | depart,roundabout-exit-2,exit roundabout right,arrive |
|
| g,f | 45 90 | gch,edf,edf,edf | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| g,h | 45 135 | gch,gch,gch | depart,roundabout and exit right,arrive |
|
| g,h | 45 135 | gch,gch,gch | depart,exit roundabout right,arrive |
|
||||||
| e,e | 90 270 | edf,edf,edf,edf | depart,roundabout-exit-3,exit roundabout sharp left,arrive |
|
| e,e | 90 270 | edf,edf,edf,edf | depart,roundabout-exit-3,exit roundabout sharp left,arrive |
|
||||||
|
|
||||||
Scenario: CCW and CW roundabouts with overlaps
|
Scenario: CCW and CW roundabouts with overlaps
|
||||||
|
@ -248,8 +248,8 @@ Feature: Simple Turns
|
|||||||
| bcdefghijklmnob | residential | road | 1 | yes | roundabout |
|
| bcdefghijklmnob | residential | road | 1 | yes | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | intersections |
|
| waypoints | route | turns | intersections |
|
||||||
| a,p | road,road,road,road | depart,roundabout turn straight exit-1,exit roundabout turn right,arrive | true:90;true:165 false:270 false:345;true:90 false:180 true:345;true:270 |
|
| a,p | road,road,road | depart,roundabout turn straight exit-1,arrive | true:90;true:165 false:270 false:345,true:90 false:180 true:345;true:270 |
|
||||||
|
|
||||||
Scenario: Splitting Road with many lanes
|
Scenario: Splitting Road with many lanes
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -188,5 +188,5 @@ Feature: Approach parameter
|
|||||||
| restriction | bc | bc | c | no_u_turn |
|
| restriction | bc | bc | c | no_u_turn |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | approaches | route |
|
| from | to | approaches | route |
|
||||||
| s | e | unrestricted curb | ab,bc,bc,bc |
|
| s | e | unrestricted curb | ab,bc,bc |
|
||||||
|
@ -168,8 +168,7 @@ class RouteAPI : public BaseAPI
|
|||||||
*
|
*
|
||||||
* ⚠ CAUTION: order of post-processing steps is important
|
* ⚠ CAUTION: order of post-processing steps is important
|
||||||
* - handleRoundabouts must be called before collapseTurnInstructions that
|
* - handleRoundabouts must be called before collapseTurnInstructions that
|
||||||
*expects
|
* expects post-processed roundabouts
|
||||||
* post-processed roundabouts without Exit instructions
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
guidance::trimShortSegments(steps, leg_geometry);
|
guidance::trimShortSegments(steps, leg_geometry);
|
||||||
|
@ -54,11 +54,11 @@ const constexpr char *turn_type_names[] = {"invalid",
|
|||||||
"end of road",
|
"end of road",
|
||||||
"notification",
|
"notification",
|
||||||
"roundabout",
|
"roundabout",
|
||||||
"roundabout and exit",
|
"exit roundabout",
|
||||||
"rotary",
|
"rotary",
|
||||||
"rotary and exit",
|
"exit rotary",
|
||||||
|
"roundabout turn",
|
||||||
"roundabout turn",
|
"roundabout turn",
|
||||||
"roundabout turn and exit",
|
|
||||||
"use lane",
|
"use lane",
|
||||||
"invalid",
|
"invalid",
|
||||||
"invalid",
|
"invalid",
|
||||||
@ -67,7 +67,7 @@ const constexpr char *turn_type_names[] = {"invalid",
|
|||||||
"rotary",
|
"rotary",
|
||||||
"exit rotary",
|
"exit rotary",
|
||||||
"roundabout turn",
|
"roundabout turn",
|
||||||
"exit roundabout turn",
|
"exit roundabout",
|
||||||
"invalid",
|
"invalid",
|
||||||
"invalid"};
|
"invalid"};
|
||||||
|
|
||||||
|
@ -63,8 +63,9 @@ void compressRange(const RouteStepIterator begin, const RouteStepIterator end)
|
|||||||
// might be missing as well)
|
// might be missing as well)
|
||||||
void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterator end)
|
void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterator end)
|
||||||
{
|
{
|
||||||
|
auto const last = end-1;
|
||||||
// If we do not exit the roundabout, there is no exit to report. All good here
|
// If we do not exit the roundabout, there is no exit to report. All good here
|
||||||
if (!leavesRoundabout((end - 1)->maneuver.instruction))
|
if (!leavesRoundabout(last->maneuver.instruction))
|
||||||
{
|
{
|
||||||
// first we do some clean-up
|
// first we do some clean-up
|
||||||
if (begin->maneuver.instruction.type == TurnType::EnterRotary ||
|
if (begin->maneuver.instruction.type == TurnType::EnterRotary ||
|
||||||
@ -96,9 +97,9 @@ void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterat
|
|||||||
const auto exit = std::count_if(begin, end, passes_exit_or_leaves_roundabout);
|
const auto exit = std::count_if(begin, end, passes_exit_or_leaves_roundabout);
|
||||||
|
|
||||||
// removes all intermediate instructions, assigns names and exit numbers
|
// removes all intermediate instructions, assigns names and exit numbers
|
||||||
BOOST_ASSERT(leavesRoundabout((end - 1)->maneuver.instruction));
|
BOOST_ASSERT(leavesRoundabout(last->maneuver.instruction));
|
||||||
BOOST_ASSERT(std::distance(begin, end) >= 1);
|
BOOST_ASSERT(std::distance(begin, end) >= 1);
|
||||||
(end - 1)->maneuver.exit = exit;
|
last->maneuver.exit = exit;
|
||||||
|
|
||||||
// when we actually have an enter instruction, we can store all the information on it that we
|
// when we actually have an enter instruction, we can store all the information on it that we
|
||||||
// need, otherwise we only provide the exit instruciton. In case of re-routing on the
|
// need, otherwise we only provide the exit instruciton. In case of re-routing on the
|
||||||
@ -121,7 +122,7 @@ void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterat
|
|||||||
{
|
{
|
||||||
const auto entry_intersection = begin->intersections.front();
|
const auto entry_intersection = begin->intersections.front();
|
||||||
|
|
||||||
const auto exit_intersection = (end - 1)->intersections.front();
|
const auto exit_intersection = last->intersections.front();
|
||||||
const auto exit_bearing = exit_intersection.bearings[exit_intersection.out];
|
const auto exit_bearing = exit_intersection.bearings[exit_intersection.out];
|
||||||
|
|
||||||
BOOST_ASSERT(!begin->intersections.empty());
|
BOOST_ASSERT(!begin->intersections.empty());
|
||||||
@ -131,10 +132,21 @@ void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterat
|
|||||||
|
|
||||||
begin->maneuver.instruction.direction_modifier = getTurnDirection(angle);
|
begin->maneuver.instruction.direction_modifier = getTurnDirection(angle);
|
||||||
}
|
}
|
||||||
begin->AdaptStepSignage(*(end - 1));
|
begin->AdaptStepSignage(*last);
|
||||||
|
}
|
||||||
|
|
||||||
|
// in case of a roundabout turn, we do not emit an exit as long as the mode remains the same
|
||||||
|
if ((begin->maneuver.instruction.type == TurnType::EnterRoundaboutIntersection ||
|
||||||
|
begin->maneuver.instruction.type == TurnType::EnterRoundaboutIntersectionAtExit)
|
||||||
|
&& begin->mode == last->mode )
|
||||||
|
{
|
||||||
|
compressRange(begin,end);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// do not remove last (the exit instruction)
|
||||||
|
compressRange(begin, last);
|
||||||
}
|
}
|
||||||
// do not remove the exit instruction
|
|
||||||
compressRange(begin, end - 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// roundabout groups are a sequence of roundabout instructions. This can contain enter/exit
|
// roundabout groups are a sequence of roundabout instructions. This can contain enter/exit
|
||||||
@ -208,7 +220,6 @@ std::vector<RouteStep> handleRoundabouts(std::vector<RouteStep> steps)
|
|||||||
if (currently_on_roundabout)
|
if (currently_on_roundabout)
|
||||||
currently_on_roundabout = !leavesRoundabout(step.maneuver.instruction);
|
currently_on_roundabout = !leavesRoundabout(step.maneuver.instruction);
|
||||||
return result;
|
return result;
|
||||||
;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user