osrm-backend/features/car/oneway.feature

113 lines
5.4 KiB
Gherkin
Raw Normal View History

@routing @car @oneway
2012-10-01 07:27:08 -04:00
Feature: Car - Oneway streets
# Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
2013-08-29 13:29:13 -04:00
Background:
Given the profile "car"
2013-08-29 13:29:13 -04:00
Scenario: Car - Simple oneway
Then routability should be
| highway | oneway | forw | backw |
| primary | yes | x | |
2013-08-29 13:29:13 -04:00
Scenario: Car - Simple reverse oneway
Then routability should be
| highway | oneway | forw | backw |
| primary | -1 | | x |
2017-01-30 07:53:04 -05:00
Scenario: Car - Mode specific oneway
Then routability should be
| highway | oneway:motorcar | oneway:motor_vehicle | oneway:vehicle | oneway | forw | backw |
| primary | | | | | x | x |
| primary | yes | | | | x | |
| primary | | yes | | | x | |
| primary | | | yes | | x | |
| primary | | | | yes | x | |
| primary | yes | no | | | x | |
| primary | | yes | no | | x | |
| primary | | | yes | no | x | |
| primary | | | | yes | x | |
| primary | no | yes | | | x | x |
| primary | | no | yes | | x | x |
| primary | | | no | yes | x | x |
2013-08-29 13:29:13 -04:00
Scenario: Car - Implied oneways
Then routability should be
| highway | junction | forw | backw | # |
| motorway | | x | | |
| motorway_link | | x | x | does not imply oneway |
| primary | | x | x | |
| motorway | roundabout | x | | |
| motorway_link | roundabout | x | | |
| primary | roundabout | x | | |
2013-08-29 13:29:13 -04:00
Scenario: Car - Overrule implied oneway
Then routability should be
| highway | oneway | forw | backw | # |
| motorway | no | x | x | |
| motorway_link | no | x | x | |
| motorway_link | yes | x | | |
| motorway_link | | x | x | does not imply onway |
2013-08-29 13:29:13 -04:00
Scenario: Car - Around the Block
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b
f d c e
"""
2013-08-29 13:29:13 -04:00
And the ways
| nodes | oneway |
| ab | yes |
| bc | |
| cd | |
| da | |
2016-05-13 13:18:00 -04:00
| ce | |
| df | |
2013-08-29 13:29:13 -04:00
When I route I should get
| from | to | route |
| a | b | ab,ab |
| b | a | bc,cd,da,da |
2013-08-29 13:29:13 -04:00
Scenario: Car - Cars should not be affected by bicycle tags
Then routability should be
| highway | junction | oneway | oneway:bicycle | forw | backw |
| primary | | yes | yes | x | |
| primary | | yes | no | x | |
| primary | | yes | -1 | x | |
| primary | | no | yes | x | x |
| primary | | no | no | x | x |
| primary | | no | -1 | x | x |
| primary | | -1 | yes | | x |
| primary | | -1 | no | | x |
| primary | | -1 | -1 | | x |
| primary | roundabout | | yes | x | |
| primary | roundabout | | no | x | |
| primary | roundabout | | -1 | x | |
Scenario: Car - Two consecutive oneways
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b c
"""
2013-08-29 13:29:13 -04:00
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
When I route I should get
| from | to | route |
| a | c | ab,bc,bc |
# Reversible oneways (low frequency) vs alternating oneways (high frequency).
# See: https://github.com/Project-OSRM/osrm-backend/issues/2837
Scenario: Car - Route over alternating but not reversible oneways
Then routability should be
| highway | oneway | forw | backw |
| primary | reversible | | |
| primary | alternating | x | x |