2016-05-25 09:24:11 -04:00
|
|
|
@routing @guidance
|
|
|
|
Feature: Slipways and Dedicated Turn Lanes
|
|
|
|
|
|
|
|
Background:
|
|
|
|
Given the profile "car"
|
|
|
|
Given a grid size of 5 meters
|
|
|
|
|
|
|
|
Scenario: Turn Instead of Ramp
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
e
|
|
|
|
a b c d
|
|
|
|
h
|
|
|
|
|
|
|
|
1
|
|
|
|
|
|
|
|
f
|
|
|
|
|
|
|
|
g
|
|
|
|
"""
|
2016-05-25 09:24:11 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name |
|
|
|
|
| abcd | trunk | first |
|
|
|
|
| bhf | trunk_link | |
|
|
|
|
| ecfg | primary | second |
|
|
|
|
|
2016-05-26 09:21:09 -04:00
|
|
|
And the relations
|
|
|
|
| type | way:from | way:to | node:via | restriction |
|
|
|
|
| restriction | abcd | ecfg | c | no_right_turn |
|
|
|
|
|
2016-05-25 09:24:11 -04:00
|
|
|
When I route I should get
|
|
|
|
| waypoints | route | turns |
|
|
|
|
| a,g | first,second,second | depart,turn right,arrive |
|
|
|
|
| a,1 | first,, | depart,turn slight right,arrive |
|
|
|
|
|
2016-10-20 06:15:36 -04:00
|
|
|
Scenario: Turn Instead of Ramp - Max-Speed
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
e
|
|
|
|
a-b-----c-d
|
|
|
|
`h |
|
|
|
|
||
|
|
|
|
1||
|
|
|
|
`|
|
|
|
|
f
|
|
|
|
|
|
|
|
|
g
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name | maxspeed |
|
|
|
|
| abcd | trunk | first | 70 |
|
|
|
|
| bhf | trunk_link | | 2 |
|
|
|
|
| ecfg | primary | second | 50 |
|
|
|
|
|
|
|
|
And the relations
|
|
|
|
| type | way:from | way:to | node:via | restriction |
|
|
|
|
| restriction | abcd | ecfg | 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 slight right,arrive |
|
|
|
|
|
|
|
|
|
2016-05-25 09:24:11 -04:00
|
|
|
Scenario: Turn Instead of Ramp
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
e
|
|
|
|
a b c d
|
|
|
|
h
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-17 03:49:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-30 03:33:08 -04:00
|
|
|
f
|
|
|
|
|
|
|
|
|
|
|
|
g
|
|
|
|
"""
|
2016-05-25 09:24:11 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name |
|
|
|
|
| abcd | motorway | first |
|
|
|
|
| bhf | motorway_link | |
|
|
|
|
| efg | primary | second |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-07-14 09:05:46 -04:00
|
|
|
| waypoints | route | turns |
|
|
|
|
| a,g | first,,second,second | depart,off ramp slight right,turn straight,arrive |
|
2016-05-25 09:24:11 -04:00
|
|
|
|
2016-08-17 03:49:19 -04:00
|
|
|
Scenario: Turn Instead of Ramp
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
e
|
|
|
|
a b c d
|
|
|
|
h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f
|
|
|
|
|
|
|
|
|
|
|
|
g
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name |
|
|
|
|
| abcd | motorway | first |
|
|
|
|
| bhf | motorway_link | |
|
|
|
|
| efg | primary | second |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| waypoints | route | turns |
|
|
|
|
| a,g | first,,second,second | depart,off ramp slight right,turn straight,arrive |
|
|
|
|
|
2016-05-25 09:24:11 -04:00
|
|
|
Scenario: Inner city expressway with on road
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c g
|
|
|
|
f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e
|
|
|
|
"""
|
2016-05-25 09:24:11 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name |
|
|
|
|
| abc | primary | road |
|
2016-06-27 11:05:13 -04:00
|
|
|
| cg | primary | road |
|
2016-05-25 09:24:11 -04:00
|
|
|
| bfd | trunk_link | |
|
|
|
|
| cde | trunk | trunk |
|
|
|
|
|
2016-05-26 09:21:09 -04:00
|
|
|
And the relations
|
|
|
|
| type | way:from | way:to | node:via | restriction |
|
|
|
|
| restriction | abc | cde | c | no_right_turn |
|
|
|
|
|
2016-05-25 09:24:11 -04:00
|
|
|
When I route I should get
|
|
|
|
| waypoints | route | turns |
|
|
|
|
| a,e | road,trunk,trunk | depart,turn right,arrive |
|
|
|
|
|
|
|
|
|
|
|
|
Scenario: Slipway Round U-Turn
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a f
|
|
|
|
|
|
|
|
b e
|
|
|
|
|
|
|
|
|
|
|
|
g
|
|
|
|
|
|
|
|
c d
|
|
|
|
"""
|
2016-05-25 09:24:11 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name | oneway |
|
|
|
|
| abc | primary | road | yes |
|
|
|
|
| bge | primary_link | | yes |
|
|
|
|
| def | primary | road | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| waypoints | route | turns |
|
|
|
|
| a,f | road,road,road | depart,continue uturn,arrive |
|
|
|
|
|
|
|
|
Scenario: Slipway Steep U-Turn
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a f
|
|
|
|
|
|
|
|
b e
|
|
|
|
g
|
|
|
|
|
|
|
|
|
|
|
|
c d
|
|
|
|
"""
|
2016-05-25 09:24:11 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name | oneway |
|
|
|
|
| abc | primary | road | yes |
|
|
|
|
| bge | primary_link | | yes |
|
|
|
|
| def | primary | road | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| waypoints | route | turns |
|
|
|
|
| a,f | road,road,road | depart,continue uturn,arrive |
|
2016-06-27 11:05:13 -04:00
|
|
|
|
|
|
|
Scenario: Schwarzwaldstrasse Autobahn
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
i h g
|
|
|
|
j
|
|
|
|
a k
|
|
|
|
b r c d e f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
l
|
|
|
|
m
|
|
|
|
n q
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
o p
|
|
|
|
"""
|
2016-06-27 11:05:13 -04:00
|
|
|
|
|
|
|
And the nodes
|
|
|
|
# the traffic light at `l` is not actually in the data, but necessary for the test to check everything
|
|
|
|
# http://www.openstreetmap.org/#map=19/48.99211/8.40336
|
|
|
|
| node | highway |
|
|
|
|
| r | traffic_signals |
|
|
|
|
| l | traffic_signals |
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name | ref | oneway |
|
|
|
|
| abrcd | secondary | Schwarzwaldstrasse | L561 | yes |
|
|
|
|
| hija | secondary | Schwarzwaldstrasse | L561 | yes |
|
|
|
|
| def | secondary | Ettlinger Strasse | | yes |
|
|
|
|
| gh | secondary | Ettlinger Strasse | | yes |
|
|
|
|
| blmn | secondary_link | | L561 | yes |
|
|
|
|
| hkc | secondary_link | Ettlinger Strasse | | yes |
|
|
|
|
| qdki | secondary_link | Ettlinger Allee | | yes |
|
|
|
|
| cn | secondary_link | Ettlinger Allee | | yes |
|
|
|
|
| no | primary | Ettlinger Allee | | yes |
|
|
|
|
| pq | primary | Ettlinger Allee | | yes |
|
|
|
|
| qe | secondary_link | Ettlinger Allee | | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-09-05 09:01:51 -04:00
|
|
|
| waypoints | route | turns | ref |
|
|
|
|
| a,o | Schwarzwaldstrasse,Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | L561,, |
|
2016-07-04 06:19:49 -04:00
|
|
|
|
|
|
|
Scenario: Traffic Lights everywhere
|
|
|
|
#http://map.project-osrm.org/?z=18¢er=48.995336%2C8.383813&loc=48.995467%2C8.384548&loc=48.995115%2C8.382761&hl=en&alt=0
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a k l j
|
|
|
|
d b c i
|
|
|
|
|
|
|
|
e g
|
|
|
|
|
|
|
|
1
|
|
|
|
h
|
|
|
|
|
|
|
|
f
|
|
|
|
"""
|
2016-07-04 06:19:49 -04:00
|
|
|
|
|
|
|
And the nodes
|
|
|
|
| node | highway |
|
|
|
|
| b | traffic_signals |
|
|
|
|
| e | traffic_signals |
|
|
|
|
| g | traffic_signals |
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name | oneway |
|
|
|
|
| aklbci | secondary | Ebertstrasse | yes |
|
|
|
|
| kdeh | secondary_link | | yes |
|
|
|
|
| jcghf | primary | Brauerstrasse | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-08-17 03:49:19 -04:00
|
|
|
| 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 right,arrive |
|
2016-09-02 08:06:38 -04:00
|
|
|
|
|
|
|
#2839
|
|
|
|
Scenario: Self-Loop
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
l k
|
|
|
|
j
|
|
|
|
m
|
|
|
|
i
|
|
|
|
|
|
|
|
|
|
|
|
h
|
|
|
|
|
|
|
|
n
|
|
|
|
|
|
|
|
g
|
|
|
|
o
|
|
|
|
|
|
|
|
f
|
|
|
|
p
|
|
|
|
e
|
|
|
|
a b c d
|
|
|
|
"""
|
2016-09-02 08:06:38 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | name | oneway | highway | lanes |
|
|
|
|
| abc | circled | no | residential | 1 |
|
|
|
|
| cdefghijklmnopc | circled | yes | residential | 1 |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| waypoints | bearings | route | turns |
|
|
|
|
| b,a | 90,10 270,10 | circled,circled | depart,arrive |
|
|
|
|
|
|
|
|
@todo
|
|
|
|
#due to the current turn function, the left turn bcp is exactly the same cost as pcb, a right turn. The right turn should be way faster,though
|
|
|
|
#for that reason we cannot distinguish between driving clockwise through the circle or counter-clockwise. Until this is improved, this case here
|
|
|
|
#has to remain as todo (see #https://github.com/Project-OSRM/osrm-backend/pull/2849)
|
|
|
|
Scenario: Self-Loop - Bidirectional
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
l k
|
|
|
|
j
|
|
|
|
m
|
|
|
|
i
|
|
|
|
|
|
|
|
|
|
|
|
h
|
|
|
|
|
|
|
|
n
|
|
|
|
|
|
|
|
g
|
|
|
|
o
|
|
|
|
|
|
|
|
f
|
|
|
|
p
|
|
|
|
e
|
|
|
|
a b c d
|
|
|
|
"""
|
2016-09-02 08:06:38 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | name | oneway | highway | lanes |
|
|
|
|
| abc | circled | no | residential | 1 |
|
|
|
|
| cdefghijklmnopc | circled | no | residential | 1 |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| waypoints | bearings | route | turns |
|
|
|
|
| b,a | 90,10 270,10 | circled,circled | depart,arrive |
|
2016-09-13 07:17:18 -04:00
|
|
|
|
|
|
|
#http://www.openstreetmap.org/#map=19/38.90597/-77.01276
|
|
|
|
Scenario: Don't falsly classify as sliproads
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
j
|
|
|
|
a b c d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
|
|
|
|
|
|
f g
|
|
|
|
|
|
|
|
i h
|
|
|
|
"""
|
2016-09-13 07:17:18 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | name | highway | oneway | maxspeed |
|
|
|
|
| abcd | new york | primary | yes | 35 |
|
|
|
|
| befgh | m street | secondary | yes | 35 |
|
|
|
|
| igcj | 1st street | tertiary | no | 20 |
|
|
|
|
|
|
|
|
And the nodes
|
|
|
|
| node | highway |
|
|
|
|
| c | traffic_signals |
|
|
|
|
| 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 |
|
2016-09-19 06:56:13 -04:00
|
|
|
|
|
|
|
# Merging into degree two loop on dedicated turn detection / 2927
|
|
|
|
Scenario: Turn Instead of Ramp
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
f
|
|
|
|
g h
|
|
|
|
d e
|
|
|
|
i c j
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b
|
|
|
|
|
|
|
|
a
|
|
|
|
"""
|
2016-09-19 06:56:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | name | oneway |
|
|
|
|
| abi | primary | road | yes |
|
|
|
|
| bcjd | primary | loop | yes |
|
|
|
|
| dhgf | primary | loop | yes |
|
|
|
|
| fed | primary | loop | yes |
|
|
|
|
|
|
|
|
And the nodes
|
|
|
|
| node | highway |
|
|
|
|
| g | traffic_signals |
|
|
|
|
| c | traffic_signals |
|
|
|
|
|
|
|
|
# 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 |
|