osrm-backend/features/bicycle/maxspeed.feature

91 lines
4.5 KiB
Gherkin
Raw Normal View History

@routing @maxspeed @bicycle
Feature: Bike - Max speed restrictions
2013-08-29 13:29:13 -04:00
Background: Use specific speeds
Given the profile "bicycle"
And a grid size of 1000 meters
2013-08-29 13:29:13 -04:00
Scenario: Bicycle - Respect maxspeeds when lower that way type speed
Then routability should be
| highway | maxspeed | bothw |
| residential | | 15 km/h +- 1 |
| residential | 10 | 10 km/h +- 1 |
2013-08-29 13:29:13 -04:00
Scenario: Bicycle - Ignore maxspeed when higher than way speed
Then routability should be
| highway | maxspeed | bothw |
| residential | | 15 km/h +- 1 |
| residential | 80 | 15 km/h |
2013-08-12 12:00:56 -04:00
@todo
2013-08-29 13:29:13 -04:00
Scenario: Bicycle - Maxspeed formats
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | 5 | 144s ~10% |
| residential | 5mph | 90s ~10% |
| residential | 5 mph | 90s ~10% |
| residential | 5MPH | 90s ~10% |
| residential | 5 MPH | 90s ~10% |
| trunk | 5unknown | 49s ~10% |
| trunk | 5 unknown | 49s ~10% |
@todo
2013-08-29 13:29:13 -04:00
Scenario: Bicycle - Maxspeed special tags
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | none | 49s ~10% |
| residential | signals | 49s ~10% |
2013-08-29 13:29:13 -04:00
Scenario: Bike - Do not use maxspeed when higher that way type speed
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 | highway | maxspeed |
| ab | residential | |
| bc | residential | 80 |
2013-08-29 13:29:13 -04:00
When I route I should get
| from | to | route | speed |
| a | b | ab,ab | 15 km/h |
| b | c | bc,bc | 15 km/h |
2013-02-03 09:34:41 -05:00
2013-08-29 13:29:13 -04:00
Scenario: Bike - Forward/backward maxspeed
2013-02-03 12:13:57 -05:00
Given the shortcuts
2013-08-29 13:29:13 -04:00
| key | value |
| bike | 49s ~10% |
| run | 73s ~10% |
| walk | 145s ~10% |
| snail | 720s ~10% |
2013-02-03 09:34:41 -05:00
2013-08-29 13:29:13 -04:00
Then routability should be
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | 15 km/h +- 1 | 15 km/h +- 1 |
| 10 | | | 10 km/h +- 1 | 10 km/h +- 1 |
| | 10 | | 10 km/h +- 1 | 15 km/h +- 1 |
| | | 10 | 15 km/h | 10 km/h +- 1 |
| 2 | 10 | | 10 km/h +- 1 | 2 km/h |
| 2 | | 10 | 2 km/h | 10 km/h +- 1 |
| 2 | 5 | 10 | 5 km/h | 10 km/h +- 1 |
2013-08-12 12:00:56 -04:00
2013-08-29 13:29:13 -04:00
Scenario: Bike - Maxspeed should not allow routing on unroutable ways
Then routability should be
| highway | railway | access | maxspeed | maxspeed:forward | maxspeed:backward | bothw |
| primary | | | | | | x |
| secondary | | no | | | | |
| secondary | | no | 100 | | | |
| secondary | | no | | 100 | | |
| secondary | | no | | | 100 | |
| (nil) | train | | | | | |
| (nil) | train | | 100 | | | |
| (nil) | train | | | 100 | | |
| (nil) | train | | | | 100 | |
| runway | | | | | | |
| runway | | | 100 | | | |
| runway | | | | 100 | | |
| runway | | | | | 100 | |