osrm-backend/features/guidance/ramp.feature

258 lines
7.5 KiB
Gherkin
Raw Normal View History

2016-03-23 08:04:23 -04:00
@routing @guidance
Feature: Ramp Guidance
Background:
Given the profile "car"
Given a grid size of 10 meters
Scenario: Ramp On Through Street Right
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b c
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | tertiary |
| bd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,on ramp right,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Ramp On Through Street Left
Given the node map
2016-09-30 03:33:08 -04:00
"""
d
a b c
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | tertiary |
| bd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,on ramp left,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Ramp On Through Street Left and Right
Given the node map
2016-09-30 03:33:08 -04:00
"""
e
a b c
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| be | motorway_link |
| abc | tertiary |
| bd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,on ramp right,arrive |
| a,e | abc,be,be | depart,on ramp left,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Ramp On Three Way Intersection Right
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b c
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| ab | tertiary |
| bc | tertiary |
| bd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,d | ab,bd,bd | depart,on ramp right,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Ramp On Three Way Intersection Right
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| ab | tertiary |
| bc | tertiary |
| bd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,d | ab,bd,bd | depart,on ramp right,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Ramp Off Though Street
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b
d
"""
2016-03-23 08:04:23 -04:00
And the ways
2016-08-15 06:43:26 -04:00
| nodes | highway | oneway |
| abc | tertiary | yes |
| bd | motorway_link | yes |
2016-03-23 08:04:23 -04:00
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,on ramp right,arrive |
| a,c | abc,abc | depart,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Straight Ramp Off Turning Though Street
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | tertiary |
| bd | motorway_link |
When I route I should get
2016-08-15 06:43:26 -04:00
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,on ramp straight,arrive |
| a,c | abc,abc | depart,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Fork Ramp Off Turning Though Street
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | tertiary |
| bd | motorway_link |
When I route I should get
2016-08-15 06:43:26 -04:00
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,on ramp right,arrive |
| a,c | abc,abc | depart,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Fork Ramp
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| ab | tertiary |
| bc | tertiary |
| bd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,d | ab,bd,bd | depart,on ramp right,arrive |
| a,c | ab,bc,bc | depart,turn left,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Fork Slight Ramp
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| ab | tertiary |
| bc | tertiary |
| bd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,d | ab,bd,bd | depart,on ramp slight right,arrive |
| a,c | ab,bc,bc | depart,turn slight left,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Fork Slight Ramp on Through Street
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | tertiary |
| bd | motorway_link |
When I route I should get
2016-08-15 06:43:26 -04:00
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,on ramp slight right,arrive |
| a,c | abc,abc | depart,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Fork Slight Ramp on Obvious Through Street
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | primary |
| bd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,on ramp slight right,arrive |
| a,c | abc,abc | depart,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Two Ramps Joining into common Motorway
Given the node map
2016-09-30 03:33:08 -04:00
"""
a
c d
b
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| ac | motorway_link |
| bc | motorway_link |
| cd | motorway |
When I route I should get
| waypoints | route | turns |
| a,d | ac,cd,cd | depart,new name slight left,arrive |
| b,d | bc,cd,cd | depart,new name slight right,arrive |
Scenario: Two Ramps Joining into common Motorway Unnamed
Given the node map
2016-09-30 03:33:08 -04:00
"""
a
c d
b
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway | name |
| ac | motorway_link | |
| bc | motorway_link | |
| cd | motorway | |
When I route I should get
| waypoints | route | turns |
| a,d | , | depart,arrive |
| b,d | , | depart,arrive |