cleanup indentation of cuke files

This commit is contained in:
Emil Tin 2013-08-29 19:29:13 +02:00
parent 58b7ef8431
commit b5bfdb56dc
63 changed files with 4486 additions and 4509 deletions

View File

@ -2,172 +2,172 @@
Feature: Bike - Access tags on ways Feature: Bike - Access tags on ways
Reference: http://wiki.openstreetmap.org/wiki/Key:access Reference: http://wiki.openstreetmap.org/wiki/Key:access
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Access tag hierachy on ways Scenario: Bike - Access tag hierachy on ways
Then routability should be Then routability should be
| highway | access | vehicle | bicycle | bothw | | highway | access | vehicle | bicycle | bothw |
| | | | | x | | | | | | x |
| | yes | | | x | | | yes | | | x |
| | no | | | | | | no | | | |
| | | yes | | x | | | | yes | | x |
| | | no | | | | | | no | | |
| | no | yes | | x | | | no | yes | | x |
| | yes | no | | | | | yes | no | | |
| | | | yes | x | | | | | yes | x |
| | | | no | | | | | | no | |
| | no | | yes | x | | | no | | yes | x |
| | yes | | no | | | | yes | | no | |
| | | no | yes | x | | | | no | yes | x |
| | | yes | no | | | | | yes | no | |
| runway | | | | | | runway | | | | |
| runway | yes | | | x | | runway | yes | | | x |
| runway | no | | | | | runway | no | | | |
| runway | | yes | | x | | runway | | yes | | x |
| runway | | no | | | | runway | | no | | |
| runway | no | yes | | x | | runway | no | yes | | x |
| runway | yes | no | | | | runway | yes | no | | |
| runway | | | yes | x | | runway | | | yes | x |
| runway | | | no | | | runway | | | no | |
| runway | no | | yes | x | | runway | no | | yes | x |
| runway | yes | | no | | | runway | yes | | no | |
| runway | | no | yes | x | | runway | | no | yes | x |
| runway | | yes | no | | | runway | | yes | no | |
@todo @todo
Scenario: Bike - Access tag in forward direction Scenario: Bike - Access tag in forward direction
Then routability should be Then routability should be
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw | | highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
| | | | | x | | | | | | | x | |
| | yes | | | x | | | | yes | | | x | |
| | no | | | | | | | no | | | | |
| | | yes | | x | | | | | yes | | x | |
| | | no | | | | | | | no | | | |
| | no | yes | | x | | | | no | yes | | x | |
| | yes | no | | | | | | yes | no | | | |
| | | | yes | x | | | | | | yes | x | |
| | | | no | | | | | | | no | | |
| | no | | yes | x | | | | no | | yes | x | |
| | yes | | no | | | | | yes | | no | | |
| | | no | yes | x | | | | | no | yes | x | |
| | | yes | no | | | | | | yes | no | | |
| runway | | | | x | | | runway | | | | x | |
| runway | yes | | | x | | | runway | yes | | | x | |
| runway | no | | | | | | runway | no | | | | |
| runway | | yes | | x | | | runway | | yes | | x | |
| runway | | no | | | | | runway | | no | | | |
| runway | no | yes | | x | | | runway | no | yes | | x | |
| runway | yes | no | | | | | runway | yes | no | | | |
| runway | | | yes | x | | | runway | | | yes | x | |
| runway | | | no | | | | runway | | | no | | |
| runway | no | | yes | x | | | runway | no | | yes | x | |
| runway | yes | | no | | | | runway | yes | | no | | |
| runway | | no | yes | x | | | runway | | no | yes | x | |
| runway | | yes | no | | | | runway | | yes | no | | |
@todo @todo
Scenario: Bike - Access tag in backward direction Scenario: Bike - Access tag in backward direction
Then routability should be Then routability should be
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw | | highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
| | | | | | x | | | | | | | x |
| | yes | | | | x | | | yes | | | | x |
| | no | | | | | | | no | | | | |
| | | yes | | | x | | | | yes | | | x |
| | | no | | | | | | | no | | | |
| | no | yes | | | x | | | no | yes | | | x |
| | yes | no | | | | | | yes | no | | | |
| | | | yes | | x | | | | | yes | | x |
| | | | no | | | | | | | no | | |
| | no | | yes | | x | | | no | | yes | | x |
| | yes | | no | | | | | yes | | no | | |
| | | no | yes | | x | | | | no | yes | | x |
| | | yes | no | | | | | | yes | no | | |
| runway | | | | | x | | runway | | | | | x |
| runway | yes | | | | x | | runway | yes | | | | x |
| runway | no | | | | | | runway | no | | | | |
| runway | | yes | | | x | | runway | | yes | | | x |
| runway | | no | | | | | runway | | no | | | |
| runway | no | yes | | | x | | runway | no | yes | | | x |
| runway | yes | no | | | | | runway | yes | no | | | |
| runway | | | yes | | x | | runway | | | yes | | x |
| runway | | | no | | | | runway | | | no | | |
| runway | no | | yes | | x | | runway | no | | yes | | x |
| runway | yes | | no | | | | runway | yes | | no | | |
| runway | | no | yes | | x | | runway | | no | yes | | x |
| runway | | yes | no | | | | runway | | yes | no | | |
Scenario: Bike - Overwriting implied acccess on ways Scenario: Bike - Overwriting implied acccess on ways
Then routability should be Then routability should be
| highway | access | vehicle | bicycle | bothw | | highway | access | vehicle | bicycle | bothw |
| cycleway | | | | x | | cycleway | | | | x |
| runway | | | | | | runway | | | | |
| cycleway | no | | | | | cycleway | no | | | |
| cycleway | | no | | | | cycleway | | no | | |
| cycleway | | | no | | | cycleway | | | no | |
| runway | yes | | | x | | runway | yes | | | x |
| runway | | yes | | x | | runway | | yes | | x |
| runway | | | yes | x | | runway | | | yes | x |
Scenario: Bike - Access tags on ways Scenario: Bike - Access tags on ways
Then routability should be Then routability should be
| access | vehicle | bicycle | bothw | | access | vehicle | bicycle | bothw |
| | | | x | | | | | x |
| yes | | | x | | yes | | | x |
| permissive | | | x | | permissive | | | x |
| designated | | | x | | designated | | | x |
| some_tag | | | x | | some_tag | | | x |
| no | | | | | no | | | |
| private | | | | | private | | | |
| agricultural | | | | | agricultural | | | |
| forestery | | | | | forestery | | | |
| | yes | | x | | | yes | | x |
| | permissive | | x | | | permissive | | x |
| | designated | | x | | | designated | | x |
| | some_tag | | x | | | some_tag | | x |
| | no | | | | | no | | |
| | private | | | | | private | | |
| | agricultural | | | | | agricultural | | |
| | forestery | | | | | forestery | | |
| | | yes | x | | | | yes | x |
| | | permissive | x | | | | permissive | x |
| | | designated | x | | | | designated | x |
| | | some_tag | x | | | | some_tag | x |
| | | no | | | | | no | |
| | | private | | | | | private | |
| | | agricultural | | | | | agricultural | |
| | | forestery | | | | | forestery | |
Scenario: Bike - Access tags on both node and way Scenario: Bike - Access tags on both node and way
Then routability should be Then routability should be
| access | node/access | bothw | | access | node/access | bothw |
| yes | yes | x | | yes | yes | x |
| yes | no | | | yes | no | |
| yes | some_tag | x | | yes | some_tag | x |
| no | yes | | | no | yes | |
| no | no | | | no | no | |
| no | some_tag | | | no | some_tag | |
| some_tag | yes | x | | some_tag | yes | x |
| some_tag | no | | | some_tag | no | |
| some_tag | some_tag | x | | some_tag | some_tag | x |
Scenario: Bike - Access combinations Scenario: Bike - Access combinations
Then routability should be Then routability should be
| highway | access | vehicle | bicycle | bothw | | highway | access | vehicle | bicycle | bothw |
| runway | private | | yes | x | | runway | private | | yes | x |
| footway | | no | permissive | x | | footway | | no | permissive | x |
| motorway | | | yes | x | | motorway | | | yes | x |
| track | forestry | | permissive | x | | track | forestry | | permissive | x |
| cycleway | yes | designated | no | | | cycleway | yes | designated | no | |
| primary | | yes | private | | | primary | | yes | private | |
| residential | permissive | | no | | | residential | permissive | | no | |
Scenario: Bike - Ignore access tags for other modes Scenario: Bike - Ignore access tags for other modes
Then routability should be Then routability should be
| highway | boat | motor_vehicle | moped | bothw | | highway | boat | motor_vehicle | moped | bothw |
| river | yes | | | | | river | yes | | | |
| cycleway | no | | | x | | cycleway | no | | | x |
| runway | | yes | | | | runway | | yes | | |
| cycleway | | no | | x | | cycleway | | no | | x |
| runway | | | yes | | | runway | | | yes | |
| cycleway | | | no | x | | cycleway | | | no | x |

View File

@ -2,63 +2,63 @@
Feature: Bike - Access tags on nodes Feature: Bike - Access tags on nodes
Reference: http://wiki.openstreetmap.org/wiki/Key:access Reference: http://wiki.openstreetmap.org/wiki/Key:access
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Access tag hierachy on nodes Scenario: Bike - Access tag hierachy on nodes
Then routability should be Then routability should be
| node/access | node/vehicle | node/bicycle | bothw | | node/access | node/vehicle | node/bicycle | bothw |
| | | | x | | | | | x |
| yes | | | x | | yes | | | x |
| no | | | | | no | | | |
| | yes | | x | | | yes | | x |
| | no | | | | | no | | |
| no | yes | | x | | no | yes | | x |
| yes | no | | | | yes | no | | |
| | | yes | x | | | | yes | x |
| | | no | | | | | no | |
| no | | yes | x | | no | | yes | x |
| yes | | no | | | yes | | no | |
| | no | yes | x | | | no | yes | x |
| | yes | no | | | | yes | no | |
Scenario: Bike - Overwriting implied acccess on nodes Scenario: Bike - Overwriting implied acccess on nodes
Then routability should be Then routability should be
| highway | node/access | node/vehicle | node/bicycle | bothw | | highway | node/access | node/vehicle | node/bicycle | bothw |
| cycleway | | | | x | | cycleway | | | | x |
| runway | | | | | | runway | | | | |
| cycleway | no | | | | | cycleway | no | | | |
| cycleway | | no | | | | cycleway | | no | | |
| cycleway | | | no | | | cycleway | | | no | |
| runway | yes | | | | | runway | yes | | | |
| runway | | yes | | | | runway | | yes | | |
| runway | | | yes | | | runway | | | yes | |
Scenario: Bike - Access tags on nodes Scenario: Bike - Access tags on nodes
Then routability should be Then routability should be
| node/access | node/vehicle | node/bicycle | bothw | | node/access | node/vehicle | node/bicycle | bothw |
| | | | x | | | | | x |
| yes | | | x | | yes | | | x |
| permissive | | | x | | permissive | | | x |
| designated | | | x | | designated | | | x |
| some_tag | | | x | | some_tag | | | x |
| no | | | | | no | | | |
| private | | | | | private | | | |
| agricultural | | | | | agricultural | | | |
| forestery | | | | | forestery | | | |
| | yes | | x | | | yes | | x |
| | permissive | | x | | | permissive | | x |
| | designated | | x | | | designated | | x |
| | some_tag | | x | | | some_tag | | x |
| | no | | | | | no | | |
| | private | | | | | private | | |
| | agricultural | | | | | agricultural | | |
| | forestery | | | | | forestery | | |
| | | yes | x | | | | yes | x |
| | | permissive | x | | | | permissive | x |
| | | designated | x | | | | designated | x |
| | | some_tag | x | | | | some_tag | x |
| | | no | | | | | no | |
| | | private | | | | | private | |
| | | agricultural | | | | | agricultural | |
| | | forestery | | | | | forestery | |

View File

@ -1,103 +1,103 @@
@routing @bicycle @area @routing @bicycle @area
Feature: Bike - Squares and other areas Feature: Bike - Squares and other areas
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
@square
Scenario: Bike - Route along edge of a squares
Given the node map
| x | |
| a | b |
| d | c |
And the ways @square
| nodes | area | highway | Scenario: Bike - Route along edge of a squares
| xa | | primary | Given the node map
| abcda | yes | residential | | x | |
| a | b |
When I route I should get | d | c |
| from | to | route |
| a | b | abcda |
| a | d | abcda |
| b | c | abcda |
| c | b | abcda |
| c | d | abcda |
| d | c | abcda |
| d | a | abcda |
| a | d | abcda |
@building
Scenario: Bike - Don't route on buildings
Given the node map
| x | |
| a | b |
| d | c |
And the ways And the ways
| nodes | highway | area | building | access | | nodes | area | highway |
| xa | primary | | | | | xa | | primary |
| abcda | (nil) | yes | yes | yes | | abcda | yes | residential |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | xa | | a | b | abcda |
| a | d | xa | | a | d | abcda |
| b | c | xa | | b | c | abcda |
| c | b | xa | | c | b | abcda |
| c | d | xa | | c | d | abcda |
| d | c | xa | | d | c | abcda |
| d | a | xa | | d | a | abcda |
| a | d | xa | | a | d | abcda |
@parking
Scenario: Bike - parking areas
Given the node map
| e | | | f |
| x | a | b | y |
| | d | c | |
And the ways @building
| nodes | highway | amenity | Scenario: Bike - Don't route on buildings
| xa | primary | | Given the node map
| by | primary | | | x | |
| xefy | primary | | | a | b |
| abcda | (nil) | parking | | d | c |
When I route I should get And the ways
| from | to | route | | nodes | highway | area | building | access |
| x | y | xa,abcda,by | | xa | primary | | | |
| y | x | by,abcda,xa | | abcda | (nil) | yes | yes | yes |
| a | b | abcda |
| a | d | abcda |
| b | c | abcda |
| c | b | abcda |
| c | d | abcda |
| d | c | abcda |
| d | a | abcda |
| a | d | abcda |
@train @platform
Scenario: Bike - railway platforms
Given the node map
| x | a | b | y |
| | d | c | |
And the ways When I route I should get
| nodes | highway | railway | | from | to | route |
| xa | primary | | | a | b | xa |
| by | primary | | | a | d | xa |
| abcda | (nil) | platform | | b | c | xa |
| c | b | xa |
| c | d | xa |
| d | c | xa |
| d | a | xa |
| a | d | xa |
When I route I should get @parking
| from | to | route | Scenario: Bike - parking areas
| x | y | xa,abcda,by | Given the node map
| y | x | by,abcda,xa | | e | | | f |
| a | b | abcda | | x | a | b | y |
| a | d | abcda | | | d | c | |
| b | c | abcda |
| c | b | abcda | And the ways
| c | d | abcda | | nodes | highway | amenity |
| d | c | abcda | | xa | primary | |
| d | a | abcda | | by | primary | |
| a | d | abcda | | xefy | primary | |
| abcda | (nil) | parking |
When I route I should get
| from | to | route |
| x | y | xa,abcda,by |
| y | x | by,abcda,xa |
| a | b | abcda |
| a | d | abcda |
| b | c | abcda |
| c | b | abcda |
| c | d | abcda |
| d | c | abcda |
| d | a | abcda |
| a | d | abcda |
@train @platform
Scenario: Bike - railway platforms
Given the node map
| x | a | b | y |
| | d | c | |
And the ways
| nodes | highway | railway |
| xa | primary | |
| by | primary | |
| abcda | (nil) | platform |
When I route I should get
| from | to | route |
| x | y | xa,abcda,by |
| y | x | by,abcda,xa |
| a | b | abcda |
| a | d | abcda |
| b | c | abcda |
| c | b | abcda |
| c | d | abcda |
| d | c | abcda |
| d | a | abcda |
| a | d | abcda |

View File

@ -1,39 +1,39 @@
@routing @bicycle @barrier @routing @bicycle @barrier
Feature: Barriers Feature: Barriers
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Barriers Scenario: Bike - Barriers
Then routability should be Then routability should be
| node/barrier | bothw | | node/barrier | bothw |
| | x | | | x |
| bollard | x | | bollard | x |
| gate | x | | gate | x |
| cycle_barrier | x | | cycle_barrier | x |
| cattle_grid | x | | cattle_grid | x |
| border_control | x | | border_control | x |
| toll_booth | x | | toll_booth | x |
| sally_port | x | | sally_port | x |
| entrance | x | | entrance | x |
| wall | | | wall | |
| fence | | | fence | |
| some_tag | | | some_tag | |
Scenario: Bike - Access tag trumphs barriers Scenario: Bike - Access tag trumphs barriers
Then routability should be Then routability should be
| node/barrier | node/access | bothw | | node/barrier | node/access | bothw |
| bollard | | x | | bollard | | x |
| bollard | yes | x | | bollard | yes | x |
| bollard | permissive | x | | bollard | permissive | x |
| bollard | designated | x | | bollard | designated | x |
| bollard | no | | | bollard | no | |
| bollard | private | | | bollard | private | |
| bollard | agricultural | | | bollard | agricultural | |
| wall | | | | wall | | |
| wall | yes | x | | wall | yes | x |
| wall | permissive | x | | wall | permissive | x |
| wall | designated | x | | wall | designated | x |
| wall | no | | | wall | no | |
| wall | private | | | wall | private | |
| wall | agricultural | | | wall | agricultural | |

View File

@ -2,80 +2,80 @@
Feature: Bike - Cycle tracks/lanes Feature: Bike - Cycle tracks/lanes
Reference: http://wiki.openstreetmap.org/wiki/Key:cycleway Reference: http://wiki.openstreetmap.org/wiki/Key:cycleway
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Cycle tracks/lanes should enable biking
Then routability should be
| highway | cycleway | bothw |
| motorway | | |
| motorway | track | x |
| motorway | lane | x |
| motorway | shared | x |
| motorway | share_busway | x |
| motorway | sharrow | x |
| some_tag | track | x |
| some_tag | lane | x |
| some_tag | shared | x |
| some_tag | share_busway | x |
| some_tag | sharrow | x |
| residential | track | x |
| residential | lane | x |
| residential | shared | x |
| residential | share_busway | x |
| residential | sharrow | x |
Scenario: Bike - Left/right side cycleways on implied bidirectionals Scenario: Bike - Cycle tracks/lanes should enable biking
Then routability should be Then routability should be
| highway | cycleway | cycleway:left | cycleway:right | forw | backw | | highway | cycleway | bothw |
| primary | | | | x | x | | motorway | | |
| primary | track | | | x | x | | motorway | track | x |
| primary | opposite | | | x | x | | motorway | lane | x |
| primary | | track | | x | x | | motorway | shared | x |
| primary | | opposite | | x | x | | motorway | share_busway | x |
| primary | | | track | x | x | | motorway | sharrow | x |
| primary | | | opposite | x | x | | some_tag | track | x |
| primary | | track | track | x | x | | some_tag | lane | x |
| primary | | opposite | opposite | x | x | | some_tag | shared | x |
| primary | | track | opposite | x | x | | some_tag | share_busway | x |
| primary | | opposite | track | x | x | | some_tag | sharrow | x |
| residential | track | x |
| residential | lane | x |
| residential | shared | x |
| residential | share_busway | x |
| residential | sharrow | x |
Scenario: Bike - Left/right side cycleways on implied oneways Scenario: Bike - Left/right side cycleways on implied bidirectionals
Then routability should be Then routability should be
| highway | cycleway | cycleway:left | cycleway:right | forw | backw | | highway | cycleway | cycleway:left | cycleway:right | forw | backw |
| primary | | | | x | x | | primary | | | | x | x |
| motorway | | | | | | | primary | track | | | x | x |
| motorway | track | | | x | | | primary | opposite | | | x | x |
| motorway | opposite | | | | x | | primary | | track | | x | x |
| motorway | | track | | | x | | primary | | opposite | | x | x |
| motorway | | opposite | | | x | | primary | | | track | x | x |
| motorway | | | track | x | | | primary | | | opposite | x | x |
| motorway | | | opposite | x | | | primary | | track | track | x | x |
| motorway | | track | track | x | x | | primary | | opposite | opposite | x | x |
| motorway | | opposite | opposite | x | x | | primary | | track | opposite | x | x |
| motorway | | track | opposite | x | x | | primary | | opposite | track | x | x |
| motorway | | opposite | track | x | x |
Scenario: Bike - Invalid cycleway tags Scenario: Bike - Left/right side cycleways on implied oneways
Then routability should be Then routability should be
| highway | cycleway | bothw | | highway | cycleway | cycleway:left | cycleway:right | forw | backw |
| primary | | x | | primary | | | | x | x |
| primary | yes | x | | motorway | | | | | |
| primary | no | x | | motorway | track | | | x | |
| primary | some_track | x | | motorway | opposite | | | | x |
| motorway | | | | motorway | | track | | | x |
| motorway | yes | | | motorway | | opposite | | | x |
| motorway | no | | | motorway | | | track | x | |
| motorway | some_track | | | motorway | | | opposite | x | |
| motorway | | track | track | x | x |
Scenario: Bike - Access tags should overwrite cycleway access | motorway | | opposite | opposite | x | x |
Then routability should be | motorway | | track | opposite | x | x |
| highway | cycleway | access | bothw | | motorway | | opposite | track | x | x |
| motorway | track | no | |
| residential | track | no | | Scenario: Bike - Invalid cycleway tags
| footway | track | no | | Then routability should be
| cycleway | track | no | | | highway | cycleway | bothw |
| motorway | lane | yes | x | | primary | | x |
| residential | lane | yes | x | | primary | yes | x |
| footway | lane | yes | x | | primary | no | x |
| cycleway | lane | yes | x | | primary | some_track | x |
| motorway | | |
| motorway | yes | |
| motorway | no | |
| motorway | some_track | |
Scenario: Bike - Access tags should overwrite cycleway access
Then routability should be
| highway | cycleway | access | bothw |
| motorway | track | no | |
| residential | track | no | |
| footway | track | no | |
| cycleway | track | no | |
| motorway | lane | yes | x |
| residential | lane | yes | x |
| footway | lane | yes | x |
| cycleway | lane | yes | x |

View File

@ -1,77 +1,77 @@
@routing @bicycle @destination @todo @routing @bicycle @destination @todo
Feature: Bike - Destination only, no passing through Feature: Bike - Destination only, no passing through
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Destination only street
Given the node map
| a | | | | e |
| | b | c | d | |
| | | | | |
| x | | | | y |
And the ways Scenario: Bike - Destination only street
| nodes | access | Given the node map
| ab | | | a | | | | e |
| bcd | destination | | | b | c | d | |
| de | | | | | | | |
| axye | | | x | | | | y |
When I route I should get And the ways
| from | to | route | | nodes | access |
| a | b | ab | | ab | |
| a | c | ab,bcd | | bcd | destination |
| a | d | ab,bcd | | de | |
| a | e | axye | | axye | |
| e | d | de |
| e | c | de,bcd |
| e | b | de,bcd |
| e | a | axye |
Scenario: Bike - Destination only street
Given the node map
| a | | | | e |
| | b | c | d | |
| | | | | |
| x | | | | y |
And the ways When I route I should get
| nodes | access | | from | to | route |
| ab | | | a | b | ab |
| bc | destination | | a | c | ab,bcd |
| cd | destination | | a | d | ab,bcd |
| de | | | a | e | axye |
| axye | | | e | d | de |
| e | c | de,bcd |
| e | b | de,bcd |
| e | a | axye |
When I route I should get Scenario: Bike - Destination only street
| from | to | route | Given the node map
| a | b | ab | | a | | | | e |
| a | c | ab,bc | | | b | c | d | |
| a | d | ab,bc,cd | | | | | | |
| a | e | axye | | x | | | | y |
| e | d | de |
| e | c | de,dc |
| e | b | de,dc,bc |
| e | a | axye |
Scenario: Bike - Routing inside a destination only area And the ways
Given the node map | nodes | access |
| a | | c | | e | | ab | |
| | b | | d | | | bc | destination |
| x | | | | y | | cd | destination |
| de | |
| axye | |
And the ways When I route I should get
| nodes | access | | from | to | route |
| ab | destination | | a | b | ab |
| bc | destination | | a | c | ab,bc |
| cd | destination | | a | d | ab,bc,cd |
| de | destination | | a | e | axye |
| axye | | | e | d | de |
| e | c | de,dc |
| e | b | de,dc,bc |
| e | a | axye |
When I route I should get Scenario: Bike - Routing inside a destination only area
| from | to | route | Given the node map
| a | e | ab,bc,cd,de | | a | | c | | e |
| e | a | de,cd,bc,ab | | | b | | d | |
| b | d | bc,cd | | x | | | | y |
| d | b | cd,bc |
And the ways
| nodes | access |
| ab | destination |
| bc | destination |
| cd | destination |
| de | destination |
| axye | |
When I route I should get
| from | to | route |
| a | e | ab,bc,cd,de |
| e | a | de,cd,bc,ab |
| b | d | bc,cd |
| d | b | cd,bc |

View File

@ -1,63 +1,63 @@
@routing @bicycle @ferry @routing @bicycle @ferry
Feature: Bike - Handle ferry routes Feature: Bike - Handle ferry routes
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Ferry route
Given the node map
| a | b | c | | |
| | | d | | |
| | | e | f | g |
And the ways
| nodes | highway | route | bicycle |
| abc | primary | | |
| cde | | ferry | yes |
| efg | primary | | |
When I route I should get
| from | to | route |
| a | g | abc,cde,efg |
| b | f | abc,cde,efg |
| e | c | cde |
| e | b | cde,abc |
| e | a | cde,abc |
| c | e | cde |
| c | f | cde,efg |
| c | g | cde,efg |
Scenario: Bike - Ferry duration, single node Scenario: Bike - Ferry route
Given the node map Given the node map
| a | b | c | d | | a | b | c | | |
| | | e | f | | | | d | | |
| | | g | h | | | | e | f | g |
| | | i | j |
And the ways
| nodes | highway | route | bicycle | duration |
| ab | primary | | | |
| cd | primary | | | |
| ef | primary | | | |
| gh | primary | | | |
| ij | primary | | | |
| bc | | ferry | yes | 0:01 |
| be | | ferry | yes | 0:10 |
| bg | | ferry | yes | 1:00 |
| bi | | ferry | yes | 10:00 |
Scenario: Bike - Ferry duration, multiple nodes And the ways
Given the node map | nodes | highway | route | bicycle |
| x | | | | | y | | abc | primary | | |
| | a | b | c | d | | | cde | | ferry | yes |
| efg | primary | | |
And the ways When I route I should get
| nodes | highway | route | bicycle | duration | | from | to | route |
| xa | primary | | | | | a | g | abc,cde,efg |
| yd | primary | | | | | b | f | abc,cde,efg |
| abcd | | ferry | yes | 1:00 | | e | c | cde |
| e | b | cde,abc |
| e | a | cde,abc |
| c | e | cde |
| c | f | cde,efg |
| c | g | cde,efg |
When I route I should get Scenario: Bike - Ferry duration, single node
| from | to | route | time | Given the node map
| a | d | abcd | 3600s +-10 | | a | b | c | d |
| d | a | abcd | 3600s +-10 | | | | e | f |
| | | g | h |
| | | i | j |
And the ways
| nodes | highway | route | bicycle | duration |
| ab | primary | | | |
| cd | primary | | | |
| ef | primary | | | |
| gh | primary | | | |
| ij | primary | | | |
| bc | | ferry | yes | 0:01 |
| be | | ferry | yes | 0:10 |
| bg | | ferry | yes | 1:00 |
| bi | | ferry | yes | 10:00 |
Scenario: Bike - Ferry duration, multiple nodes
Given the node map
| x | | | | | y |
| | a | b | c | d | |
And the ways
| nodes | highway | route | bicycle | duration |
| xa | primary | | | |
| yd | primary | | | |
| abcd | | ferry | yes | 1:00 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 3600s +-10 |
| d | a | abcd | 3600s +-10 |

View File

@ -1,87 +1,87 @@
@routing @maxspeed @bicycle @routing @maxspeed @bicycle
Feature: Bike - Max speed restrictions Feature: Bike - Max speed restrictions
Background: Use specific speeds Background: Use specific speeds
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bicycle - Respect maxspeeds when lower that way type speed Scenario: Bicycle - Respect maxspeeds when lower that way type speed
Then routability should be Then routability should be
| highway | maxspeed | bothw | | highway | maxspeed | bothw |
| residential | | 49s ~10% | | residential | | 49s ~10% |
| residential | 10 | 72s ~10% | | residential | 10 | 72s ~10% |
Scenario: Bicycle - Ignore maxspeed when higher than way speed Scenario: Bicycle - Ignore maxspeed when higher than way speed
Then routability should be Then routability should be
| highway | maxspeed | bothw | | highway | maxspeed | bothw |
| residential | | 49s ~10% | | residential | | 49s ~10% |
| residential | 80 | 49s ~10% | | residential | 80 | 49s ~10% |
@todo @todo
Scenario: Bicycle - Maxspeed formats Scenario: Bicycle - Maxspeed formats
Then routability should be Then routability should be
| highway | maxspeed | bothw | | highway | maxspeed | bothw |
| residential | | 49s ~10% | | residential | | 49s ~10% |
| residential | 5 | 144s ~10% | | residential | 5 | 144s ~10% |
| residential | 5mph | 90s ~10% | | residential | 5mph | 90s ~10% |
| residential | 5 mph | 90s ~10% | | residential | 5 mph | 90s ~10% |
| residential | 5MPH | 90s ~10% | | residential | 5MPH | 90s ~10% |
| residential | 5 MPH | 90s ~10% | | residential | 5 MPH | 90s ~10% |
| trunk | 5unknown | 49s ~10% | | trunk | 5unknown | 49s ~10% |
| trunk | 5 unknown | 49s ~10% | | trunk | 5 unknown | 49s ~10% |
@todo @todo
Scenario: Bicycle - Maxspeed special tags Scenario: Bicycle - Maxspeed special tags
Then routability should be Then routability should be
| highway | maxspeed | bothw | | highway | maxspeed | bothw |
| residential | | 49s ~10% | | residential | | 49s ~10% |
| residential | none | 49s ~10% | | residential | none | 49s ~10% |
| residential | signals | 49s ~10% | | residential | signals | 49s ~10% |
Scenario: Bike - Do not use maxspeed when higher that way type speed Scenario: Bike - Do not use maxspeed when higher that way type speed
Given the node map Given the node map
| a | b | c | | a | b | c |
And the ways And the ways
| nodes | highway | maxspeed | | nodes | highway | maxspeed |
| ab | residential | | | ab | residential | |
| bc | residential | 80 | | bc | residential | 80 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | ab | 24s ~5% | | a | b | ab | 24s ~5% |
| b | c | bc | 24s ~5% | | b | c | bc | 24s ~5% |
Scenario: Bike - Forward/backward maxspeed Scenario: Bike - Forward/backward maxspeed
Given the shortcuts Given the shortcuts
| key | value | | key | value |
| bike | 49s ~10% | | bike | 49s ~10% |
| run | 73s ~10% | | run | 73s ~10% |
| walk | 145s ~10% | | walk | 145s ~10% |
| snail | 720s ~10% | | snail | 720s ~10% |
Then routability should be Then routability should be
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw | | maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | bike | bike | | | | | bike | bike |
| 10 | | | run | run | | 10 | | | run | run |
| | 10 | | run | bike | | | 10 | | run | bike |
| | | 10 | bike | run | | | | 10 | bike | run |
| 1 | 10 | | run | snail | | 1 | 10 | | run | snail |
| 1 | | 10 | snail | run | | 1 | | 10 | snail | run |
| 1 | 5 | 10 | walk | run | | 1 | 5 | 10 | walk | run |
Scenario: Bike - Maxspeed should not allow routing on unroutable ways Scenario: Bike - Maxspeed should not allow routing on unroutable ways
Then routability should be Then routability should be
| highway | railway | access | maxspeed | maxspeed:forward | maxspeed:backward | bothw | | highway | railway | access | maxspeed | maxspeed:forward | maxspeed:backward | bothw |
| primary | | | | | | x | | primary | | | | | | x |
| secondary | | no | | | | | | secondary | | no | | | | |
| secondary | | no | 100 | | | | | secondary | | no | 100 | | | |
| secondary | | no | | 100 | | | | secondary | | no | | 100 | | |
| secondary | | no | | | 100 | | | secondary | | no | | | 100 | |
| (nil) | train | | | | | | | (nil) | train | | | | | |
| (nil) | train | | 100 | | | | | (nil) | train | | 100 | | | |
| (nil) | train | | | 100 | | | | (nil) | train | | | 100 | | |
| (nil) | train | | | | 100 | | | (nil) | train | | | | 100 | |
| runway | | | | | | | | runway | | | | | | |
| runway | | | 100 | | | | | runway | | | 100 | | | |
| runway | | | | 100 | | | | runway | | | | 100 | | |
| runway | | | | | 100 | | | runway | | | | | 100 | |

View File

@ -1,89 +1,89 @@
@routing @bicycle @mode @routing @bicycle @mode
Feature: Bike - Mode flag Feature: Bike - Mode flag
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
@todo @todo
Scenario: Bike - Mode when using a ferry Scenario: Bike - Mode when using a ferry
Given the node map Given the node map
| a | b | | | a | b | |
| | c | d | | | c | d |
And the ways And the ways
| nodes | highway | route | duration | | nodes | highway | route | duration |
| ab | primary | | | | ab | primary | | |
| bc | | ferry | 0:01 | | bc | | ferry | 0:01 |
| cd | primary | | | | cd | primary | | |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left, destination | bike,ferry,bike | | a | d | ab,bc,cd | head,right,left, destination | bike,ferry,bike |
| d | a | cd,bc,ab | head,right,left, destination | bike,ferry,bike | | d | a | cd,bc,ab | head,right,left, destination | bike,ferry,bike |
| c | a | bc,ab | head,left,destination | ferry,bike | | c | a | bc,ab | head,left,destination | ferry,bike |
| d | b | cd,bc | head,right,destination | bike,ferry | | d | b | cd,bc | head,right,destination | bike,ferry |
| a | c | ab,bc | head,right,destination | bike,ferry | | a | c | ab,bc | head,right,destination | bike,ferry |
| b | d | bc,cd | head,left,destination | ferry,bike | | b | d | bc,cd | head,left,destination | ferry,bike |
@todo @todo
Scenario: Bike - Mode when pushing bike against oneways Scenario: Bike - Mode when pushing bike against oneways
Given the node map Given the node map
| a | b | | | a | b | |
| | c | d | | | c | d |
And the ways And the ways
| nodes | highway | oneway | | nodes | highway | oneway |
| ab | primary | | | ab | primary | |
| bc | primary | yes | | bc | primary | yes |
| cd | primary | | | cd | primary | |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | bike,push,bike | | a | d | ab,bc,cd | head,right,left,destination | bike,push,bike |
| d | a | cd,bc,ab | head,right,left,destination | bike,push,bike | | d | a | cd,bc,ab | head,right,left,destination | bike,push,bike |
| c | a | bc,ab | head,left,destination | push,bike | | c | a | bc,ab | head,left,destination | push,bike |
| d | b | cd,bc | head,right,destination | bike,push | | d | b | cd,bc | head,right,destination | bike,push |
| a | c | ab,bc | head,right,destination | bike,push | | a | c | ab,bc | head,right,destination | bike,push |
| b | d | bc,cd | head,left,destination | push,bike | | b | d | bc,cd | head,left,destination | push,bike |
@todo @todo
Scenario: Bike - Mode when pushing on pedestrain streets Scenario: Bike - Mode when pushing on pedestrain streets
Given the node map Given the node map
| a | b | | | a | b | |
| | c | d | | | c | d |
And the ways And the ways
| nodes | highway | | nodes | highway |
| ab | primary | | ab | primary |
| bc | pedestrian | | bc | pedestrian |
| cd | primary | | cd | primary |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | bike,push,bike | | a | d | ab,bc,cd | head,right,left,destination | bike,push,bike |
| d | a | cd,bc,ab | head,right,left,destination | bike,push,bike | | d | a | cd,bc,ab | head,right,left,destination | bike,push,bike |
| c | a | bc,ab | head,left,destination | push,bike | | c | a | bc,ab | head,left,destination | push,bike |
| d | b | cd,bc | head,right,destination | bike,push | | d | b | cd,bc | head,right,destination | bike,push |
| a | c | ab,bc | head,right,destination | bike,push | | a | c | ab,bc | head,right,destination | bike,push |
| b | d | bc,cd | head,left,destination | push,bike | | b | d | bc,cd | head,left,destination | push,bike |
@todo @todo
Scenario: Bike - Mode when pushing on pedestrain areas Scenario: Bike - Mode when pushing on pedestrain areas
Given the node map Given the node map
| a | b | | | | a | b | | |
| | c | d | f | | | c | d | f |
And the ways And the ways
| nodes | highway | area | | nodes | highway | area |
| ab | primary | | | ab | primary | |
| bcd | pedestrian | yes | | bcd | pedestrian | yes |
| df | primary | | | df | primary | |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | f | ab,bcd,df | bike,push,bike | | a | f | ab,bcd,df | bike,push,bike |
| f | a | df,bcd,ab | bike,push,bike | | f | a | df,bcd,ab | bike,push,bike |
| d | a | bcd,ab | push,bike | | d | a | bcd,ab | push,bike |
| f | b | df,bcd | bike,push | | f | b | df,bcd | bike,push |
| a | d | ab,bcd | bike,push | | a | d | ab,bcd | bike,push |
| b | f | bcd,df | push,bike | | b | f | bcd,df | push,bike |

View File

@ -1,49 +1,49 @@
@routing @bicycle @names @routing @bicycle @names
Feature: Bike - Street names in instructions Feature: Bike - Street names in instructions
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - A named street
Given the node map
| a | b |
| | c |
And the ways
| nodes | name |
| ab | My Way |
| bc | Your Way |
When I route I should get
| from | to | route |
| a | c | My Way,Your Way |
@unnamed
Scenario: Bike - Use way type to describe unnamed ways
Given the node map
| a | b | c | d |
And the ways Scenario: Bike - A named street
| nodes | highway | name | Given the node map
| ab | cycleway | | | a | b |
| bcd | track | | | | c |
When I route I should get And the ways
| from | to | route | | nodes | name |
| a | d | {highway:cycleway},{highway:track} | | ab | My Way |
| bc | Your Way |
@area @names @todo When I route I should get
Scenario: Bike - name on streets overlapping an area | from | to | route |
Given the node map | a | c | My Way,Your Way |
| x | a | b | y |
| | d | c | |
And the ways @unnamed
| nodes | highway | area | Scenario: Bike - Use way type to describe unnamed ways
| xaby | residential | | Given the node map
| abcda | residential | yes | | a | b | c | d |
When I route I should get And the ways
| from | to | route | | nodes | highway | name |
| x | y | xaby | | ab | cycleway | |
| y | x | xaby | | bcd | track | |
When I route I should get
| from | to | route |
| a | d | {highway:cycleway},{highway:track} |
@area @names @todo
Scenario: Bike - name on streets overlapping an area
Given the node map
| x | a | b | y |
| | d | c | |
And the ways
| nodes | highway | area |
| xaby | residential | |
| abcda | residential | yes |
When I route I should get
| from | to | route |
| x | y | xaby |
| y | x | xaby |

View File

@ -3,126 +3,126 @@ Feature: Bike - Oneway streets
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
Usually we can push bikes against oneways, but we use foot=no to prevent this in these tests Usually we can push bikes against oneways, but we use foot=no to prevent this in these tests
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Simple oneway
Then routability should be
| highway | foot | oneway | forw | backw |
| primary | no | yes | x | |
Scenario: Simple reverse oneway Scenario: Bike - Simple oneway
Then routability should be Then routability should be
| highway | foot | oneway | forw | backw | | highway | foot | oneway | forw | backw |
| primary | no | -1 | | x | | primary | no | yes | x | |
Scenario: Bike - Around the Block Scenario: Simple reverse oneway
Given the node map Then routability should be
| a | b | | highway | foot | oneway | forw | backw |
| d | c | | primary | no | -1 | | x |
And the ways
| nodes | oneway | foot |
| ab | yes | no |
| bc | | no |
| cd | | no |
| da | | no |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | bc,cd,da |
Scenario: Bike - Handle various oneway tag values
Then routability should be
| foot | oneway | forw | backw |
| no | | x | x |
| no | nonsense | x | x |
| no | no | x | x |
| no | false | x | x |
| no | 0 | x | x |
| no | yes | x | |
| no | true | x | |
| no | 1 | x | |
| no | -1 | | x |
Scenario: Bike - Implied oneways
Then routability should be
| highway | foot | bicycle | junction | forw | backw |
| | no | | | x | x |
| | no | | roundabout | x | |
| motorway | no | yes | | x | |
| motorway_link | no | yes | | x | |
| motorway | no | yes | roundabout | x | |
| motorway_link | no | yes | roundabout | x | |
Scenario: Bike - Overriding implied oneways Scenario: Bike - Around the Block
Then routability should be Given the node map
| highway | foot | junction | oneway | forw | backw | | a | b |
| primary | no | roundabout | no | x | x | | d | c |
| primary | no | roundabout | yes | x | |
| motorway_link | no | | -1 | | |
| trunk_link | no | | -1 | | |
| primary | no | roundabout | -1 | | x |
Scenario: Bike - Oneway:bicycle should override normal oneways tags
Then routability should be
| foot | oneway:bicycle | oneway | junction | forw | backw |
| no | yes | | | x | |
| no | yes | yes | | x | |
| no | yes | no | | x | |
| no | yes | -1 | | x | |
| no | yes | | roundabout | x | |
| no | no | | | x | x |
| no | no | yes | | x | x |
| no | no | no | | x | x |
| no | no | -1 | | x | x |
| no | no | | roundabout | x | x |
| no | -1 | | | | x |
| no | -1 | yes | | | x |
| no | -1 | no | | | x |
| no | -1 | -1 | | | x |
| no | -1 | | roundabout | | x |
Scenario: Bike - Contra flow
Then routability should be
| foot | oneway | cycleway | forw | backw |
| no | yes | opposite | x | x |
| no | yes | opposite_track | x | x |
| no | yes | opposite_lane | x | x |
| no | -1 | opposite | x | x |
| no | -1 | opposite_track | x | x |
| no | -1 | opposite_lane | x | x |
| no | no | opposite | x | x |
| no | no | opposite_track | x | x |
| no | no | opposite_lane | x | x |
Scenario: Bike - Should not be affected by car tags And the ways
Then routability should be | nodes | oneway | foot |
| foot | junction | oneway | oneway:car | forw | backw | | ab | yes | no |
| no | | yes | yes | x | | | bc | | no |
| no | | yes | no | x | | | cd | | no |
| no | | yes | -1 | x | | | da | | no |
| no | | no | yes | x | x |
| no | | no | no | x | x |
| no | | no | -1 | x | x |
| no | | -1 | yes | | x |
| no | | -1 | no | | x |
| no | | -1 | -1 | | x |
| no | roundabout | | yes | x | |
| no | roundabout | | no | x | |
| no | roundabout | | -1 | x | |
Scenario: Bike - Two consecutive oneways When I route I should get
Given the node map | from | to | route |
| a | b | c | | a | b | ab |
| b | a | bc,cd,da |
And the ways Scenario: Bike - Handle various oneway tag values
| nodes | oneway | Then routability should be
| ab | yes | | foot | oneway | forw | backw |
| bc | yes | | no | | x | x |
| no | nonsense | x | x |
| no | no | x | x |
| no | false | x | x |
| no | 0 | x | x |
| no | yes | x | |
| no | true | x | |
| no | 1 | x | |
| no | -1 | | x |
Scenario: Bike - Implied oneways
Then routability should be
| highway | foot | bicycle | junction | forw | backw |
| | no | | | x | x |
| | no | | roundabout | x | |
| motorway | no | yes | | x | |
| motorway_link | no | yes | | x | |
| motorway | no | yes | roundabout | x | |
| motorway_link | no | yes | roundabout | x | |
Scenario: Bike - Overriding implied oneways
Then routability should be
| highway | foot | junction | oneway | forw | backw |
| primary | no | roundabout | no | x | x |
| primary | no | roundabout | yes | x | |
| motorway_link | no | | -1 | | |
| trunk_link | no | | -1 | | |
| primary | no | roundabout | -1 | | x |
Scenario: Bike - Oneway:bicycle should override normal oneways tags
Then routability should be
| foot | oneway:bicycle | oneway | junction | forw | backw |
| no | yes | | | x | |
| no | yes | yes | | x | |
| no | yes | no | | x | |
| no | yes | -1 | | x | |
| no | yes | | roundabout | x | |
| no | no | | | x | x |
| no | no | yes | | x | x |
| no | no | no | | x | x |
| no | no | -1 | | x | x |
| no | no | | roundabout | x | x |
| no | -1 | | | | x |
| no | -1 | yes | | | x |
| no | -1 | no | | | x |
| no | -1 | -1 | | | x |
| no | -1 | | roundabout | | x |
Scenario: Bike - Contra flow
Then routability should be
| foot | oneway | cycleway | forw | backw |
| no | yes | opposite | x | x |
| no | yes | opposite_track | x | x |
| no | yes | opposite_lane | x | x |
| no | -1 | opposite | x | x |
| no | -1 | opposite_track | x | x |
| no | -1 | opposite_lane | x | x |
| no | no | opposite | x | x |
| no | no | opposite_track | x | x |
| no | no | opposite_lane | x | x |
Scenario: Bike - Should not be affected by car tags
Then routability should be
| foot | junction | oneway | oneway:car | forw | backw |
| no | | yes | yes | x | |
| no | | yes | no | x | |
| no | | yes | -1 | x | |
| no | | no | yes | x | x |
| no | | no | no | x | x |
| no | | no | -1 | x | x |
| no | | -1 | yes | | x |
| no | | -1 | no | | x |
| no | | -1 | -1 | | x |
| no | roundabout | | yes | x | |
| no | roundabout | | no | x | |
| no | roundabout | | -1 | x | |
Scenario: Bike - Two consecutive oneways
Given the node map
| a | b | c |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | ab,bc | | a | c | ab,bc |

View File

@ -1,124 +1,124 @@
@routing @bicycle @pushing @routing @bicycle @pushing
Feature: Bike - Accessability of different way types Feature: Bike - Accessability of different way types
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Given the shortcuts Given the shortcuts
| key | value | | key | value |
| bike | 49s ~20% | | bike | 49s ~20% |
| foot | 121s ~20% | | foot | 121s ~20% |
Scenario: Bike - Pushing bikes on pedestrian-only ways Scenario: Bike - Pushing bikes on pedestrian-only ways
Then routability should be Then routability should be
| highway | oneway | forw | backw | | highway | oneway | forw | backw |
| (nil) | | | | | (nil) | | | |
| cycleway | | bike | bike | | cycleway | | bike | bike |
| primary | | bike | bike | | primary | | bike | bike |
| pedestrian | | foot | foot | | pedestrian | | foot | foot |
| footway | | foot | foot | | footway | | foot | foot |
| primary | yes | bike | foot | | primary | yes | bike | foot |
Scenario: Bike - Pushing bikes against normal oneways Scenario: Bike - Pushing bikes against normal oneways
Then routability should be Then routability should be
| highway | oneway | forw | backw | | highway | oneway | forw | backw |
| (nil) | | | | | (nil) | | | |
| primary | yes | bike | foot | | primary | yes | bike | foot |
| pedestrian | yes | foot | foot | | pedestrian | yes | foot | foot |
Scenario: Bike - Pushing bikes against reverse oneways Scenario: Bike - Pushing bikes against reverse oneways
Then routability should be Then routability should be
| highway | oneway | forw | backw | | highway | oneway | forw | backw |
| (nil) | | | | | (nil) | | | |
| primary | -1 | foot | bike | | primary | -1 | foot | bike |
| pedestrian | -1 | foot | foot | | pedestrian | -1 | foot | foot |
@square @square
Scenario: Bike - Push bikes on pedestrian areas Scenario: Bike - Push bikes on pedestrian areas
Given the node map Given the node map
| x | | | x | |
| a | b | | a | b |
| d | c | | d | c |
And the ways And the ways
| nodes | area | highway | | nodes | area | highway |
| xa | | primary | | xa | | primary |
| abcda | yes | pedestrian | | abcda | yes | pedestrian |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abcda | | a | b | abcda |
| a | d | abcda | | a | d | abcda |
| b | c | abcda | | b | c | abcda |
| c | b | abcda | | c | b | abcda |
| c | d | abcda | | c | d | abcda |
| d | c | abcda | | d | c | abcda |
| d | a | abcda | | d | a | abcda |
| a | d | abcda | | a | d | abcda |
Scenario: Bike - Pushing bikes on ways with foot=yes Scenario: Bike - Pushing bikes on ways with foot=yes
Then routability should be Then routability should be
| highway | foot | bothw | | highway | foot | bothw |
| motorway | | | | motorway | | |
| motorway | yes | foot | | motorway | yes | foot |
| runway | | | | runway | | |
| runway | yes | foot | | runway | yes | foot |
@todo @todo
Scenario: Bike - Pushing bikes on ways with foot=yes in one direction Scenario: Bike - Pushing bikes on ways with foot=yes in one direction
Then routability should be Then routability should be
| highway | foot:forward | foot:backward | forw | backw | | highway | foot:forward | foot:backward | forw | backw |
| motorway | | | | | | motorway | | | | |
| motorway | yes | | foot | | | motorway | yes | | foot | |
| motorway | | yes | | foot | | motorway | | yes | | foot |
@construction @construction
Scenario: Bike - Don't allow routing on ways still under construction Scenario: Bike - Don't allow routing on ways still under construction
Then routability should be Then routability should be
| highway | foot | bicycle | bothw | | highway | foot | bicycle | bothw |
| primary | | | x | | primary | | | x |
| construction | | | | | construction | | | |
| construction | yes | | | | construction | yes | | |
| construction | | yes | | | construction | | yes | |
@roundabout @roundabout
Scenario: Bike - Don't push bikes against oneway flow on roundabouts Scenario: Bike - Don't push bikes against oneway flow on roundabouts
Then routability should be Then routability should be
| junction | forw | backw | | junction | forw | backw |
| roundabout | x | | | roundabout | x | |
Scenario: Bike - Instructions when pushing bike on oneways Scenario: Bike - Instructions when pushing bike on oneways
Given the node map Given the node map
| a | b | | | a | b | |
| | c | d | | | c | d |
And the ways And the ways
| nodes | highway | oneway | | nodes | highway | oneway |
| ab | primary | | | ab | primary | |
| bc | primary | yes | | bc | primary | yes |
| cd | primary | | | cd | primary | |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| a | d | ab,bc,cd | head,right,left,destination | | a | d | ab,bc,cd | head,right,left,destination |
| d | a | cd,bc,ab | head,enter_contraflow,leave_contraflow,destination | | d | a | cd,bc,ab | head,enter_contraflow,leave_contraflow,destination |
| c | a | bc,ab | head,leave_contraflow,destination | | c | a | bc,ab | head,leave_contraflow,destination |
| d | b | cd,bc | head,enter_contraflow,destination | | d | b | cd,bc | head,enter_contraflow,destination |
@todo @todo
Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc. Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc.
Given the node map Given the node map
| a | b | | | a | b | |
| | c | d | | | c | d |
And the ways And the ways
| nodes | highway | | nodes | highway |
| ab | primary | | ab | primary |
| bc | footway | | bc | footway |
| cd | primary | | cd | primary |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| a | d | ab,bc,cd | head,right,left,destination | | a | d | ab,bc,cd | head,right,left,destination |
| d | a | cd,bc,ab | head,enter_contraflow,leave_contraflow,destination | | d | a | cd,bc,ab | head,enter_contraflow,leave_contraflow,destination |
| c | a | bc,ab | head,leave_contraflow,destination | | c | a | bc,ab | head,leave_contraflow,destination |
| d | b | cd,bc | head,enter_contraflow,destination | | d | b | cd,bc | head,enter_contraflow,destination |

View File

@ -1,41 +1,41 @@
@routing @bicycle @ref @name @routing @bicycle @ref @name
Feature: Bike - Way ref Feature: Bike - Way ref
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Way with both name and ref
Given the node map
| a | b |
And the ways
| nodes | name | ref |
| ab | Utopia Drive | E7 |
When I route I should get
| from | to | route |
| a | b | Utopia Drive / E7 |
Scenario: Bike - Way with only ref Scenario: Bike - Way with both name and ref
Given the node map Given the node map
| a | b | | a | b |
And the ways And the ways
| nodes | name | ref | | nodes | name | ref |
| ab | | E7 | | ab | Utopia Drive | E7 |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | E7 | | a | b | Utopia Drive / E7 |
Scenario: Bike - Way with only name Scenario: Bike - Way with only ref
Given the node map Given the node map
| a | b | | a | b |
And the ways And the ways
| nodes | name | | nodes | name | ref |
| ab | Utopia Drive | | ab | | E7 |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | Utopia Drive | | a | b | E7 |
Scenario: Bike - Way with only name
Given the node map
| a | b |
And the ways
| nodes | name |
| ab | Utopia Drive |
When I route I should get
| from | to | route |
| a | b | Utopia Drive |

View File

@ -1,289 +1,289 @@
@routing @bicycle @restrictions @routing @bicycle @restrictions
Feature: Bike - Turn restrictions Feature: Bike - Turn restrictions
Ignore turn restrictions on bicycle, since you always become a temporary pedestrian. Ignore turn restrictions on bicycle, since you always become a temporary pedestrian.
Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes. Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
Background:
Given the profile "bicycle"
@no_turning
Scenario: Bike - No left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways Background:
| nodes | oneway | foot | Given the profile "bicycle"
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations @no_turning
| type | way:from | way:to | node:via | restriction | Scenario: Bike - No left turn
| restriction | sj | wj | j | no_left_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway | foot |
| s | w | sj,wj | | sj | yes | no |
| s | n | sj,nj | | nj | -1 | no |
| s | e | sj,ej | | wj | -1 | no |
| ej | -1 | no |
@no_turning And the relations
Scenario: Bike - No right turn | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | wj | j | no_left_turn |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | foot | | from | to | route |
| sj | yes | no | | s | w | sj,wj |
| nj | -1 | no | | s | n | sj,nj |
| wj | -1 | no | | s | e | sj,ej |
| ej | -1 | no |
And the relations @no_turning
| type | way:from | way:to | node:via | restriction | Scenario: Bike - No right turn
| restriction | sj | ej | j | no_right_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway | foot |
| s | w | sj,wj | | sj | yes | no |
| s | n | sj,nj | | nj | -1 | no |
| s | e | sj,ej | | wj | -1 | no |
| ej | -1 | no |
@no_turning And the relations
Scenario: Bike - No u-turn | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | ej | j | no_right_turn |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | foot | | from | to | route |
| sj | yes | no | | s | w | sj,wj |
| nj | -1 | no | | s | n | sj,nj |
| wj | -1 | no | | s | e | sj,ej |
| ej | -1 | no |
And the relations @no_turning
| type | way:from | way:to | node:via | restriction | Scenario: Bike - No u-turn
| restriction | sj | wj | j | no_u_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway | foot |
| s | w | sj,wj | | sj | yes | no |
| s | n | sj,nj | | nj | -1 | no |
| s | e | sj,ej | | wj | -1 | no |
| ej | -1 | no |
@no_turning And the relations
Scenario: Bike - Handle any no_* relation | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | wj | j | no_u_turn |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | foot | | from | to | route |
| sj | yes | no | | s | w | sj,wj |
| nj | -1 | no | | s | n | sj,nj |
| wj | -1 | no | | s | e | sj,ej |
| ej | -1 | no |
And the relations @no_turning
| type | way:from | way:to | node:via | restriction | Scenario: Bike - Handle any no_* relation
| restriction | sj | wj | j | no_weird_zigzags | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway | foot |
| s | w | sj,wj | | sj | yes | no |
| s | n | sj,nj | | nj | -1 | no |
| s | e | sj,ej | | wj | -1 | no |
| ej | -1 | no |
@only_turning And the relations
Scenario: Bike - Only left turn | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | wj | j | no_weird_zigzags |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | foot | | from | to | route |
| sj | yes | no | | s | w | sj,wj |
| nj | -1 | no | | s | n | sj,nj |
| wj | -1 | no | | s | e | sj,ej |
| ej | -1 | no |
And the relations @only_turning
| type | way:from | way:to | node:via | restriction | Scenario: Bike - Only left turn
| restriction | sj | wj | j | only_left_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway | foot |
| s | w | sj,wj | | sj | yes | no |
| s | n | sj,nj | | nj | -1 | no |
| s | e | sj,ej | | wj | -1 | no |
| ej | -1 | no |
@only_turning And the relations
Scenario: Bike - Only right turn | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | wj | j | only_left_turn |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | foot | | from | to | route |
| sj | yes | no | | s | w | sj,wj |
| nj | -1 | no | | s | n | sj,nj |
| wj | -1 | no | | s | e | sj,ej |
| ej | -1 | no |
And the relations @only_turning
| type | way:from | way:to | node:via | restriction | Scenario: Bike - Only right turn
| restriction | sj | ej | j | only_right_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway | foot |
| s | w | sj,wj | | sj | yes | no |
| s | n | sj,nj | | nj | -1 | no |
| s | e | sj,ej | | wj | -1 | no |
| ej | -1 | no |
@only_turning
Scenario: Bike - Only straight on
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways And the relations
| nodes | oneway | foot | | type | way:from | way:to | node:via | restriction |
| sj | yes | no | | restriction | sj | ej | j | only_right_turn |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations When I route I should get
| type | way:from | way:to | node:via | restriction | | from | to | route |
| restriction | sj | nj | j | only_straight_on | | s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
When I route I should get @only_turning
| from | to | route | Scenario: Bike - Only straight on
| s | w | sj,wj | Given the node map
| s | n | sj,nj | | | n | |
| s | e | sj,ej | | w | j | e |
| | s | |
@no_turning And the ways
Scenario: Bike - Handle any only_* restriction | nodes | oneway | foot |
Given the node map | sj | yes | no |
| | n | | | nj | -1 | no |
| w | j | e | | wj | -1 | no |
| | s | | | ej | -1 | no |
And the ways And the relations
| nodes | oneway | foot | | type | way:from | way:to | node:via | restriction |
| sj | yes | no | | restriction | sj | nj | j | only_straight_on |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations When I route I should get
| type | way:from | way:to | node:via | restriction | | from | to | route |
| restriction | sj | nj | j | only_weird_zigzags | | s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
When I route I should get @no_turning
| from | to | route | Scenario: Bike - Handle any only_* restriction
| s | w | sj,wj | Given the node map
| s | n | sj,nj | | | n | |
| s | e | sj,ej | | w | j | e |
| | s | |
@except And the ways
Scenario: Bike - Except tag and on no_ restrictions | nodes | oneway | foot |
Given the node map | sj | yes | no |
| b | x | c | | nj | -1 | no |
| a | j | d | | wj | -1 | no |
| | s | | | ej | -1 | no |
And the ways And the relations
| nodes | oneway | foot | | type | way:from | way:to | node:via | restriction |
| sj | no | no | | restriction | sj | nj | j | only_weird_zigzags |
| xj | -1 | no |
| aj | -1 | no |
| bj | no | no |
| cj | -1 | no |
| dj | -1 | no |
And the relations When I route I should get
| type | way:from | way:to | node:via | restriction | except | | from | to | route |
| restriction | sj | aj | j | no_left_turn | bicycle | | s | w | sj,wj |
| restriction | sj | bj | j | no_left_turn | | | s | n | sj,nj |
| restriction | sj | cj | j | no_right_turn | | | s | e | sj,ej |
| restriction | sj | dj | j | no_right_turn | bicycle |
When I route I should get @except
| from | to | route | Scenario: Bike - Except tag and on no_ restrictions
| s | a | sj,aj | Given the node map
| s | b | sj,bj | | b | x | c |
| s | c | sj,cj | | a | j | d |
| s | d | sj,dj | | | s | |
@except And the ways
Scenario: Bike - Except tag and on only_ restrictions | nodes | oneway | foot |
Given the node map | sj | no | no |
| a | | b | | xj | -1 | no |
| | j | | | aj | -1 | no |
| | s | | | bj | no | no |
| cj | -1 | no |
| dj | -1 | no |
And the ways And the relations
| nodes | oneway | foot | | type | way:from | way:to | node:via | restriction | except |
| sj | yes | no | | restriction | sj | aj | j | no_left_turn | bicycle |
| aj | no | no | | restriction | sj | bj | j | no_left_turn | |
| bj | no | no | | restriction | sj | cj | j | no_right_turn | |
| restriction | sj | dj | j | no_right_turn | bicycle |
And the relations When I route I should get
| type | way:from | way:to | node:via | restriction | except | | from | to | route |
| restriction | sj | aj | j | only_straight_on | bicycle | | s | a | sj,aj |
| s | b | sj,bj |
| s | c | sj,cj |
| s | d | sj,dj |
When I route I should get @except
| from | to | route | Scenario: Bike - Except tag and on only_ restrictions
| s | a | sj,aj | Given the node map
| s | b | sj,bj | | a | | b |
| | j | |
| | s | |
@except And the ways
Scenario: Bike - Multiple except tag values | nodes | oneway | foot |
Given the node map | sj | yes | no |
| s | j | a | | aj | no | no |
| | | b | | bj | no | no |
| | | c |
| | | d |
| | | e |
| | | f |
And the ways And the relations
| nodes | oneway | foot | | type | way:from | way:to | node:via | restriction | except |
| sj | yes | no | | restriction | sj | aj | j | only_straight_on | bicycle |
| ja | yes | no |
| jb | yes | no |
| jc | yes | no |
| jd | yes | no |
| je | yes | no |
| jf | yes | no |
And the relations When I route I should get
| type | way:from | way:to | node:via | restriction | except | | from | to | route |
| restriction | sj | ja | j | no_straight_on | | | s | a | sj,aj |
| restriction | sj | jb | j | no_straight_on | bicycle | | s | b | sj,bj |
| restriction | sj | jc | j | no_straight_on | bus; bicycle |
| restriction | sj | jd | j | no_straight_on | bicycle; motocar |
| restriction | sj | je | j | no_straight_on | bus, bicycle |
| restriction | sj | jf | j | no_straight_on | bicycle, bus |
When I route I should get @except
| from | to | route | Scenario: Bike - Multiple except tag values
| s | a | sj,ja | Given the node map
| s | b | sj,jb | | s | j | a |
| s | c | sj,jc | | | | b |
| s | d | sj,jd | | | | c |
| s | e | sj,je | | | | d |
| s | f | sj,jf | | | | e |
| | | f |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| ja | yes | no |
| jb | yes | no |
| jc | yes | no |
| jd | yes | no |
| je | yes | no |
| jf | yes | no |
And the relations
| type | way:from | way:to | node:via | restriction | except |
| restriction | sj | ja | j | no_straight_on | |
| restriction | sj | jb | j | no_straight_on | bicycle |
| restriction | sj | jc | j | no_straight_on | bus; bicycle |
| restriction | sj | jd | j | no_straight_on | bicycle; motocar |
| restriction | sj | je | j | no_straight_on | bus, bicycle |
| restriction | sj | jf | j | no_straight_on | bicycle, bus |
When I route I should get
| from | to | route |
| s | a | sj,ja |
| s | b | sj,jb |
| s | c | sj,jc |
| s | d | sj,jd |
| s | e | sj,je |
| s | f | sj,jf |

View File

@ -1,30 +1,30 @@
@routing @bicycle @roundabout @instruction @routing @bicycle @roundabout @instruction
Feature: Roundabout Instructions Feature: Roundabout Instructions
Background:
Given the profile "bicycle"
Scenario: Bicycle - Roundabout instructions
Given the node map
| | | v | | |
| | | d | | |
| s | a | | c | u |
| | | b | | |
| | | t | | |
And the ways Background:
| nodes | junction | Given the profile "bicycle"
| sa | |
| tb | | Scenario: Bicycle - Roundabout instructions
| uc | | Given the node map
| vd | | | | | v | | |
| abcda | roundabout | | | | d | | |
| s | a | | c | u |
When I route I should get | | | b | | |
| from | to | route | turns | | | | t | | |
| s | t | sa,tb | head,enter_roundabout-1,destination |
| s | u | sa,uc | head,enter_roundabout-2,destination | And the ways
| s | v | sa,vd | head,enter_roundabout-3,destination | | nodes | junction |
| u | v | uc,vd | head,enter_roundabout-1,destination | | sa | |
| u | s | uc,sa | head,enter_roundabout-2,destination | | tb | |
| u | t | uc,tb | head,enter_roundabout-3,destination | | uc | |
| vd | |
| abcda | roundabout |
When I route I should get
| from | to | route | turns |
| s | t | sa,tb | head,enter_roundabout-1,destination |
| s | u | sa,uc | head,enter_roundabout-2,destination |
| s | v | sa,vd | head,enter_roundabout-3,destination |
| u | v | uc,vd | head,enter_roundabout-1,destination |
| u | s | uc,sa | head,enter_roundabout-2,destination |
| u | t | uc,tb | head,enter_roundabout-3,destination |

View File

@ -3,35 +3,35 @@ Feature: Bike - Stop areas for public transport
Platforms and railway/bus lines are connected using a relation rather that a way, as specified in: Platforms and railway/bus lines are connected using a relation rather that a way, as specified in:
http://wiki.openstreetmap.org/wiki/Tag:public_transport%3Dstop_area http://wiki.openstreetmap.org/wiki/Tag:public_transport%3Dstop_area
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Platforms tagged using public_transport
Then routability should be
| highway | public_transport | bicycle | bothw |
| primary | | | x |
| (nil) | platform | | x |
Scenario: Bike - railway platforms Scenario: Bike - Platforms tagged using public_transport
Given the node map Then routability should be
| a | b | c | d | | highway | public_transport | bicycle | bothw |
| | s | t | | | primary | | | x |
| (nil) | platform | | x |
Scenario: Bike - railway platforms
Given the node map
| a | b | c | d |
| | s | t | |
And the nodes And the nodes
| node | public_transport | | node | public_transport |
| c | stop_position | | c | stop_position |
And the ways
| nodes | highway | railway | bicycle | public_transport |
| abcd | (nil) | train | yes | |
| st | (nil) | (nil) | | platform |
And the relations And the ways
| type | public_transport | node:stop | way:platform | | nodes | highway | railway | bicycle | public_transport |
| public_transport | stop_area | c | st | | abcd | (nil) | train | yes | |
| st | (nil) | (nil) | | platform |
When I route I should get And the relations
| from | to | route | | type | public_transport | node:stop | way:platform |
| a | d | abcd | | public_transport | stop_area | c | st |
| s | t | st |
| s | d | /st,.+,abcd/ | When I route I should get
| from | to | route |
| a | d | abcd |
| s | t | st |
| s | d | /st,.+,abcd/ |

View File

@ -2,38 +2,38 @@
Feature: Bike - Handle ferry routes Feature: Bike - Handle ferry routes
Bringing bikes on trains and subways Bringing bikes on trains and subways
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Bringing bikes on trains
Then routability should be
| highway | railway | bicycle | bothw |
| primary | | | x |
| (nil) | train | | |
| (nil) | train | no | |
| (nil) | train | yes | x |
| (nil) | railway | | |
| (nil) | railway | no | |
| (nil) | railway | yes | x |
| (nil) | subway | | |
| (nil) | subway | no | |
| (nil) | subway | yes | x |
| (nil) | tram | | |
| (nil) | tram | no | |
| (nil) | tram | yes | x |
| (nil) | light_rail | | |
| (nil) | light_rail | no | |
| (nil) | light_rail | yes | x |
| (nil) | monorail | | |
| (nil) | monorail | no | |
| (nil) | monorail | yes | x |
| (nil) | some_tag | | |
| (nil) | some_tag | no | |
| (nil) | some_tag | yes | x |
@construction Scenario: Bike - Bringing bikes on trains
Scenario: Bike - Don't route on railways under construction Then routability should be
Then routability should be | highway | railway | bicycle | bothw |
| highway | railway | bicycle | bothw | | primary | | | x |
| primary | | | x | | (nil) | train | | |
| (nil) | construction | yes | | | (nil) | train | no | |
| (nil) | train | yes | x |
| (nil) | railway | | |
| (nil) | railway | no | |
| (nil) | railway | yes | x |
| (nil) | subway | | |
| (nil) | subway | no | |
| (nil) | subway | yes | x |
| (nil) | tram | | |
| (nil) | tram | no | |
| (nil) | tram | yes | x |
| (nil) | light_rail | | |
| (nil) | light_rail | no | |
| (nil) | light_rail | yes | x |
| (nil) | monorail | | |
| (nil) | monorail | no | |
| (nil) | monorail | yes | x |
| (nil) | some_tag | | |
| (nil) | some_tag | no | |
| (nil) | some_tag | yes | x |
@construction
Scenario: Bike - Don't route on railways under construction
Then routability should be
| highway | railway | bicycle | bothw |
| primary | | | x |
| (nil) | construction | yes | |

View File

@ -2,32 +2,32 @@
Feature: Turn Penalties Feature: Turn Penalties
Background: Background:
Given the profile "turnbot" Given the profile "turnbot"
Scenario: Bike - turns should incur a delay that depend on the angle Scenario: Bike - turns should incur a delay that depend on the angle
Given the node map Given the node map
| c | d | e | | c | d | e |
| b | j | f | | b | j | f |
| a | s | g | | a | s | g |
And the ways And the ways
| nodes | | nodes |
| sj | | sj |
| ja | | ja |
| jb | | jb |
| jc | | jc |
| jd | | jd |
| je | | je |
| jf | | jf |
| jg | | jg |
When I route I should get When I route I should get
| from | to | route | time | distance | | from | to | route | time | distance |
| s | a | sj,ja | 39s +-1 | 242m +-1 | | s | a | sj,ja | 39s +-1 | 242m +-1 |
| s | b | sj,jb | 30s +-1 | 200m +-1 | | s | b | sj,jb | 30s +-1 | 200m +-1 |
| s | c | sj,jc | 29s +-1 | 242m +-1 | | s | c | sj,jc | 29s +-1 | 242m +-1 |
| s | d | sj,jd | 20s +-1 | 200m +-1 | | s | d | sj,jd | 20s +-1 | 200m +-1 |
| s | e | sj,je | 29s +-1 | 242m +-1 | | s | e | sj,je | 29s +-1 | 242m +-1 |
| s | f | sj,jf | 30s +-1 | 200m +-1 | | s | f | sj,jf | 30s +-1 | 200m +-1 |
| s | g | sj,jg | 39s +-1 | 242m +-1 | | s | g | sj,jg | 39s +-1 | 242m +-1 |

View File

@ -1,41 +1,41 @@
@routing @bicycle @way @routing @bicycle @way
Feature: Bike - Accessability of different way types Feature: Bike - Accessability of different way types
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
Scenario: Bike - Routability of way types Scenario: Bike - Routability of way types
Bikes are allowed on footways etc because you can pull your bike at a lower speed. Bikes are allowed on footways etc because you can pull your bike at a lower speed.
Pier is not allowed, since it's tagged using man_made=pier. Pier is not allowed, since it's tagged using man_made=pier.
Then routability should be Then routability should be
| highway | bothw | | highway | bothw |
| (nil) | | | (nil) | |
| motorway | | | motorway | |
| motorway_link | | | motorway_link | |
| trunk | | | trunk | |
| trunk_link | | | trunk_link | |
| primary | x | | primary | x |
| primary_link | x | | primary_link | x |
| secondary | x | | secondary | x |
| secondary_link | x | | secondary_link | x |
| tertiary | x | | tertiary | x |
| tertiary_link | x | | tertiary_link | x |
| residential | x | | residential | x |
| service | x | | service | x |
| unclassified | x | | unclassified | x |
| living_street | x | | living_street | x |
| road | x | | road | x |
| track | x | | track | x |
| path | x | | path | x |
| footway | x | | footway | x |
| pedestrian | x | | pedestrian | x |
| steps | x | | steps | x |
| cycleway | x | | cycleway | x |
| bridleway | | | bridleway | |
| pier | | | pier | |
Scenario: Bike - Routability of man_made structures Scenario: Bike - Routability of man_made structures
Then routability should be Then routability should be
| highway | man_made | bothw | | highway | man_made | bothw |
| (nil) | (nil) | | | (nil) | (nil) | |
| (nil) | pier | x | | (nil) | pier | x |

View File

@ -2,143 +2,143 @@
Feature: Car - Restricted access Feature: Car - Restricted access
Reference: http://wiki.openstreetmap.org/wiki/Key:access Reference: http://wiki.openstreetmap.org/wiki/Key:access
Background: Background:
Given the profile "car" Given the profile "car"
Scenario: Car - Access tag hierachy on ways
Then routability should be
| access | vehicle | motor_vehicle | motorcar | bothw |
| | | | | x |
| yes | | | | x |
| no | | | | |
| | yes | | | x |
| | no | | | |
| no | yes | | | x |
| yes | no | | | |
| | | yes | | x |
| | | no | | |
| no | | yes | | x |
| yes | | no | | |
| | no | yes | | x |
| | yes | no | | |
| | | | yes | x |
| | | | no | |
| no | | | yes | x |
| yes | | | no | |
| | no | | yes | x |
| | yes | | no | |
| | | no | yes | x |
| | | yes | no | |
Scenario: Car - Access tag hierachy on nodes Scenario: Car - Access tag hierachy on ways
Then routability should be Then routability should be
| node/access | node/vehicle | node/motor_vehicle | node/motorcar | bothw | | access | vehicle | motor_vehicle | motorcar | bothw |
| | | | | x | | | | | | x |
| yes | | | | x | | yes | | | | x |
| no | | | | | | no | | | | |
| | yes | | | x | | | yes | | | x |
| | no | | | | | | no | | | |
| no | yes | | | x | | no | yes | | | x |
| yes | no | | | | | yes | no | | | |
| | | yes | | x | | | | yes | | x |
| | | no | | | | | | no | | |
| no | | yes | | x | | no | | yes | | x |
| yes | | no | | | | yes | | no | | |
| | no | yes | | x | | | no | yes | | x |
| | yes | no | | | | | yes | no | | |
| | | | yes | x | | | | | yes | x |
| | | | no | | | | | | no | |
| no | | | yes | x | | no | | | yes | x |
| yes | | | no | | | yes | | | no | |
| | no | | yes | x | | | no | | yes | x |
| | yes | | no | | | | yes | | no | |
| | | no | yes | x | | | | no | yes | x |
| | | yes | no | | | | | yes | no | |
Scenario: Car - Overwriting implied acccess on ways Scenario: Car - Access tag hierachy on nodes
Then routability should be Then routability should be
| highway | access | vehicle | motor_vehicle | motorcar | bothw | | node/access | node/vehicle | node/motor_vehicle | node/motorcar | bothw |
| primary | | | | | x | | | | | | x |
| runway | | | | | | | yes | | | | x |
| primary | no | | | | | | no | | | | |
| primary | | no | | | | | | yes | | | x |
| primary | | | no | | | | | no | | | |
| primary | | | | no | | | no | yes | | | x |
| runway | yes | | | | x | | yes | no | | | |
| runway | | yes | | | x | | | | yes | | x |
| runway | | | yes | | x | | | | no | | |
| runway | | | | yes | x | | no | | yes | | x |
| yes | | no | | |
| | no | yes | | x |
| | yes | no | | |
| | | | yes | x |
| | | | no | |
| no | | | yes | x |
| yes | | | no | |
| | no | | yes | x |
| | yes | | no | |
| | | no | yes | x |
| | | yes | no | |
Scenario: Car - Overwriting implied acccess on nodes Scenario: Car - Overwriting implied acccess on ways
Then routability should be Then routability should be
| highway | node/access | node/vehicle | node/motor_vehicle | node/motorcar | bothw | | highway | access | vehicle | motor_vehicle | motorcar | bothw |
| primary | | | | | x | | primary | | | | | x |
| runway | | | | | | | runway | | | | | |
| primary | no | | | | | | primary | no | | | | |
| primary | | no | | | | | primary | | no | | | |
| primary | | | no | | | | primary | | | no | | |
| primary | | | | no | | | primary | | | | no | |
| runway | yes | | | | | | runway | yes | | | | x |
| runway | | yes | | | | | runway | | yes | | | x |
| runway | | | yes | | | | runway | | | yes | | x |
| runway | | | | yes | | | runway | | | | yes | x |
Scenario: Car - Access tags on ways Scenario: Car - Overwriting implied acccess on nodes
Then routability should be Then routability should be
| access | bothw | | highway | node/access | node/vehicle | node/motor_vehicle | node/motorcar | bothw |
| yes | x | | primary | | | | | x |
| permissive | x | | runway | | | | | |
| designated | x | | primary | no | | | | |
| no | | | primary | | no | | | |
| private | | | primary | | | no | | |
| agricultural | | | primary | | | | no | |
| forestry | | | runway | yes | | | | |
| some_tag | x | | runway | | yes | | | |
| runway | | | yes | | |
| runway | | | | yes | |
Scenario: Car - Access tags on ways
Then routability should be
| access | bothw |
| yes | x |
| permissive | x |
| designated | x |
| no | |
| private | |
| agricultural | |
| forestry | |
| some_tag | x |
Scenario: Car - Access tags on nodes Scenario: Car - Access tags on nodes
Then routability should be Then routability should be
| node/access | bothw | | node/access | bothw |
| yes | x | | yes | x |
| permissive | x | | permissive | x |
| designated | x | | designated | x |
| no | | | no | |
| private | | | private | |
| agricultural | | | agricultural | |
| forestry | | | forestry | |
| some_tag | x | | some_tag | x |
Scenario: Car - Access tags on both node and way Scenario: Car - Access tags on both node and way
Then routability should be Then routability should be
| access | node/access | bothw | | access | node/access | bothw |
| yes | yes | x | | yes | yes | x |
| yes | no | | | yes | no | |
| yes | some_tag | x | | yes | some_tag | x |
| no | yes | | | no | yes | |
| no | no | | | no | no | |
| no | some_tag | | | no | some_tag | |
| some_tag | yes | x | | some_tag | yes | x |
| some_tag | no | | | some_tag | no | |
| some_tag | some_tag | x | | some_tag | some_tag | x |
Scenario: Car - Access combinations Scenario: Car - Access combinations
Then routability should be Then routability should be
| highway | accesss | vehicle | motor_vehicle | motorcar | bothw | | highway | accesss | vehicle | motor_vehicle | motorcar | bothw |
| runway | private | | | permissive | x | | runway | private | | | permissive | x |
| primary | forestry | | yes | | x | | primary | forestry | | yes | | x |
| cycleway | | | designated | | x | | cycleway | | | designated | | x |
| residential | | yes | no | | | | residential | | yes | no | | |
| motorway | yes | permissive | | private | | | motorway | yes | permissive | | private | |
| trunk | agricultural | designated | permissive | no | | | trunk | agricultural | designated | permissive | no | |
Scenario: Car - Ignore access tags for other modes Scenario: Car - Ignore access tags for other modes
Then routability should be Then routability should be
| highway | foot | bicycle | psv | motorhome | bothw | | highway | foot | bicycle | psv | motorhome | bothw |
| runway | yes | | | | | | runway | yes | | | | |
| primary | no | | | | x | | primary | no | | | | x |
| runway | | yes | | | | | runway | | yes | | | |
| primary | | no | | | x | | primary | | no | | | x |
| runway | | | yes | | | | runway | | | yes | | |
| primary | | | no | | x | | primary | | | no | | x |
| runway | | | | yes | | | runway | | | | yes | |
| primary | | | | no | x | | primary | | | | no | x |

View File

@ -1,38 +1,38 @@
@routing @car @barrier @routing @car @barrier
Feature: Car - Barriers Feature: Car - Barriers
Background: Background:
Given the profile "car" Given the profile "car"
Scenario: Car - Barriers Scenario: Car - Barriers
Then routability should be Then routability should be
| node/barrier | bothw | | node/barrier | bothw |
| | x | | | x |
| bollard | | | bollard | |
| gate | x | | gate | x |
| cattle_grid | x | | cattle_grid | x |
| border_control | x | | border_control | x |
| toll_booth | x | | toll_booth | x |
| sally_port | x | | sally_port | x |
| entrance | x | | entrance | x |
| wall | | | wall | |
| fence | | | fence | |
| some_tag | | | some_tag | |
Scenario: Car - Access tag trumphs barriers Scenario: Car - Access tag trumphs barriers
Then routability should be Then routability should be
| node/barrier | node/access | bothw | | node/barrier | node/access | bothw |
| gate | | x | | gate | | x |
| gate | yes | x | | gate | yes | x |
| gate | permissive | x | | gate | permissive | x |
| gate | designated | x | | gate | designated | x |
| gate | no | | | gate | no | |
| gate | private | | | gate | private | |
| gate | agricultural | | | gate | agricultural | |
| wall | | | | wall | | |
| wall | yes | x | | wall | yes | x |
| wall | permissive | x | | wall | permissive | x |
| wall | designated | x | | wall | designated | x |
| wall | no | | | wall | no | |
| wall | private | | | wall | private | |
| wall | agricultural | | | wall | agricultural | |

View File

@ -1,77 +1,77 @@
@routing @car @destination @todo @routing @car @destination @todo
Feature: Car - Destination only, no passing through Feature: Car - Destination only, no passing through
Background: Background:
Given the profile "car" Given the profile "car"
Scenario: Car - Destination only street
Given the node map
| a | | | | e |
| | b | c | d | |
| | | | | |
| x | | | | y |
And the ways Scenario: Car - Destination only street
| nodes | access | Given the node map
| ab | | | a | | | | e |
| bcd | destination | | | b | c | d | |
| de | | | | | | | |
| axye | | | x | | | | y |
When I route I should get And the ways
| from | to | route | | nodes | access |
| a | b | ab | | ab | |
| a | c | ab,bcd | | bcd | destination |
| a | d | ab,bcd | | de | |
| a | e | axye | | axye | |
| e | d | de |
| e | c | de,bcd |
| e | b | de,bcd |
| e | a | axye |
Scenario: Car - Destination only street
Given the node map
| a | | | | e |
| | b | c | d | |
| | | | | |
| x | | | | y |
And the ways When I route I should get
| nodes | access | | from | to | route |
| ab | | | a | b | ab |
| bc | destination | | a | c | ab,bcd |
| cd | destination | | a | d | ab,bcd |
| de | | | a | e | axye |
| axye | | | e | d | de |
| e | c | de,bcd |
| e | b | de,bcd |
| e | a | axye |
When I route I should get Scenario: Car - Destination only street
| from | to | route | Given the node map
| a | b | ab | | a | | | | e |
| a | c | ab,bc | | | b | c | d | |
| a | d | ab,bc,cd | | | | | | |
| a | e | axye | | x | | | | y |
| e | d | de |
| e | c | de,dc |
| e | b | de,dc,bc |
| e | a | axye |
Scenario: Car - Routing inside a destination only area And the ways
Given the node map | nodes | access |
| a | | c | | e | | ab | |
| | b | | d | | | bc | destination |
| x | | | | y | | cd | destination |
| de | |
| axye | |
And the ways When I route I should get
| nodes | access | | from | to | route |
| ab | destination | | a | b | ab |
| bc | destination | | a | c | ab,bc |
| cd | destination | | a | d | ab,bc,cd |
| de | destination | | a | e | axye |
| axye | | | e | d | de |
| e | c | de,dc |
| e | b | de,dc,bc |
| e | a | axye |
When I route I should get Scenario: Car - Routing inside a destination only area
| from | to | route | Given the node map
| a | e | ab,bc,cd,de | | a | | c | | e |
| e | a | de,cd,bc,ab | | | b | | d | |
| b | d | bc,cd | | x | | | | y |
| d | b | cd,bc |
And the ways
| nodes | access |
| ab | destination |
| bc | destination |
| cd | destination |
| de | destination |
| axye | |
When I route I should get
| from | to | route |
| a | e | ab,bc,cd,de |
| e | a | de,cd,bc,ab |
| b | d | bc,cd |
| d | b | cd,bc |

View File

@ -1,30 +1,28 @@
@routing @car @ferry @routing @car @ferry
Feature: Car - Handle ferry routes Feature: Car - Handle ferry routes
Background: Background:
Given the profile "car" Given the profile "car"
Scenario: Car - Use a ferry route
Given the node map
| a | b | c | | |
| | | d | | |
| | | e | f | g |
And the ways
| nodes | highway | route | bicycle |
| abc | primary | | |
| cde | | ferry | yes |
| efg | primary | | |
When I route I should get
| from | to | route |
| a | g | abc,cde,efg |
| b | f | abc,cde,efg |
| e | c | cde |
| e | b | cde,abc |
| e | a | cde,abc |
| c | e | cde |
| c | f | cde,efg |
| c | g | cde,efg |
Scenario: Car - Use a ferry route
Given the node map
| a | b | c | | |
| | | d | | |
| | | e | f | g |
And the ways
| nodes | highway | route | bicycle |
| abc | primary | | |
| cde | | ferry | yes |
| efg | primary | | |
When I route I should get
| from | to | route |
| a | g | abc,cde,efg |
| b | f | abc,cde,efg |
| e | c | cde |
| e | b | cde,abc |
| e | a | cde,abc |
| c | e | cde |
| c | f | cde,efg |
| c | g | cde,efg |

View File

@ -1,71 +1,71 @@
@routing @maxspeed @car @routing @maxspeed @car
Feature: Car - Max speed restrictions Feature: Car - Max speed restrictions
Background: Use specific speeds Background: Use specific speeds
Given the profile "car" Given the profile "car"
Given a grid size of 1000 meters Given a grid size of 1000 meters
Scenario: Car - Respect maxspeeds when lower that way type speed
Given the node map
| a | b | c |
And the ways Scenario: Car - Respect maxspeeds when lower that way type speed
| nodes | highway | maxspeed | Given the node map
| ab | trunk | | | a | b | c |
| bc | trunk | 10 |
When I route I should get And the ways
| from | to | route | time | | nodes | highway | maxspeed |
| a | b | ab | 42s ~10% | | ab | trunk | |
| b | c | bc | 360s ~10% | | bc | trunk | 10 |
Scenario: Car - Do not ignore maxspeed when higher than way speed When I route I should get
Given the node map | from | to | route | time |
| a | b | c | | a | b | ab | 42s ~10% |
| b | c | bc | 360s ~10% |
And the ways Scenario: Car - Do not ignore maxspeed when higher than way speed
| nodes | highway | maxspeed | Given the node map
| ab | residential | | | a | b | c |
| bc | residential | 85 |
When I route I should get And the ways
| from | to | route | time | | nodes | highway | maxspeed |
| a | b | ab | 144s ~10% | | ab | residential | |
| b | c | bc | 42s ~10% | | bc | residential | 85 |
Scenario: Car - Forward/backward maxspeed When I route I should get
| from | to | route | time |
| a | b | ab | 144s ~10% |
| b | c | bc | 42s ~10% |
Scenario: Car - Forward/backward maxspeed
Given the shortcuts Given the shortcuts
| key | value | | key | value |
| car | 12s ~10% | | car | 12s ~10% |
| run | 73s ~10% | | run | 73s ~10% |
| walk | 146s ~10% | | walk | 146s ~10% |
| snail | 720s ~10% | | snail | 720s ~10% |
And a grid size of 100 meters
Then routability should be And a grid size of 100 meters
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | car | car | Then routability should be
| 10 | | | run | run | | maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | 10 | | run | car | | | | | car | car |
| | | 10 | car | run | | 10 | | | run | run |
| 1 | 10 | | run | snail | | | 10 | | run | car |
| 1 | | 10 | snail | run | | | | 10 | car | run |
| 1 | 5 | 10 | walk | run | | 1 | 10 | | run | snail |
| 1 | | 10 | snail | run |
Scenario: Car - Maxspeed should not allow routing on unroutable ways | 1 | 5 | 10 | walk | run |
Then routability should be
| highway | railway | access | maxspeed | maxspeed:forward | maxspeed:backward | bothw | Scenario: Car - Maxspeed should not allow routing on unroutable ways
| primary | | | | | | x | Then routability should be
| secondary | | no | | | | | | highway | railway | access | maxspeed | maxspeed:forward | maxspeed:backward | bothw |
| secondary | | no | 100 | | | | | primary | | | | | | x |
| secondary | | no | | 100 | | | | secondary | | no | | | | |
| secondary | | no | | | 100 | | | secondary | | no | 100 | | | |
| (nil) | train | | | | | | | secondary | | no | | 100 | | |
| (nil) | train | | 100 | | | | | secondary | | no | | | 100 | |
| (nil) | train | | | 100 | | | | (nil) | train | | | | | |
| (nil) | train | | | | 100 | | | (nil) | train | | 100 | | | |
| runway | | | | | | | | (nil) | train | | | 100 | | |
| runway | | | 100 | | | | | (nil) | train | | | | 100 | |
| runway | | | | 100 | | | | runway | | | | | | |
| runway | | | | | 100 | | | runway | | | 100 | | | |
| runway | | | | 100 | | |
| runway | | | | | 100 | |

View File

@ -1,33 +1,33 @@
@routing @car @names @routing @car @names
Feature: Car - Street names in instructions Feature: Car - Street names in instructions
Background: Background:
Given the profile "car" Given the profile "car"
Scenario: Car - A named street
Given the node map
| a | b |
| | c |
And the ways
| nodes | name |
| ab | My Way |
| bc | Your Way |
When I route I should get
| from | to | route |
| a | c | My Way,Your Way |
@todo
Scenario: Car - Use way type to describe unnamed ways
Given the node map
| a | b | c | d |
And the ways Scenario: Car - A named street
| nodes | highway | name | Given the node map
| ab | tertiary | | | a | b |
| bcd | residential | | | | c |
When I route I should get And the ways
| from | to | route | | nodes | name |
| a | c | tertiary,residential | | ab | My Way |
| bc | Your Way |
When I route I should get
| from | to | route |
| a | c | My Way,Your Way |
@todo
Scenario: Car - Use way type to describe unnamed ways
Given the node map
| a | b | c | d |
And the ways
| nodes | highway | name |
| ab | tertiary | |
| bcd | residential | |
When I route I should get
| from | to | route |
| a | c | tertiary,residential |

View File

@ -2,78 +2,78 @@
Feature: Car - Oneway streets Feature: Car - Oneway streets
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
Background: Background:
Given the profile "car" Given the profile "car"
Scenario: Car - Simple oneway
Then routability should be
| highway | oneway | forw | backw |
| primary | yes | x | |
Scenario: Car - Simple reverse oneway Scenario: Car - Simple oneway
Then routability should be Then routability should be
| highway | oneway | forw | backw | | highway | oneway | forw | backw |
| primary | -1 | | x | | primary | yes | x | |
Scenario: Car - Implied oneways Scenario: Car - Simple reverse oneway
Then routability should be Then routability should be
| highway | junction | forw | backw | | highway | oneway | forw | backw |
| motorway | | x | | | primary | -1 | | x |
| motorway_link | | x | |
| primary | | x | x |
| motorway | roundabout | x | |
| motorway_link | roundabout | x | |
| primary | roundabout | x | |
Scenario: Car - Overrule implied oneway Scenario: Car - Implied oneways
Then routability should be Then routability should be
| highway | oneway | forw | backw | | highway | junction | forw | backw |
| motorway | no | x | x | | motorway | | x | |
| motorway_link | no | x | x | | motorway_link | | x | |
| primary | | x | x |
| motorway | roundabout | x | |
| motorway_link | roundabout | x | |
| primary | roundabout | x | |
Scenario: Car - Around the Block Scenario: Car - Overrule implied oneway
Given the node map Then routability should be
| a | b | | highway | oneway | forw | backw |
| d | c | | motorway | no | x | x |
| motorway_link | no | x | x |
And the ways
| nodes | oneway |
| ab | yes |
| bc | |
| cd | |
| da | |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | bc,cd,da |
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 Scenario: Car - Around the Block
Given the node map Given the node map
| a | b | c | | a | b |
| d | c |
And the ways And the ways
| nodes | oneway | | nodes | oneway |
| ab | yes | | ab | yes |
| bc | yes | | bc | |
| cd | |
| da | |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | bc,cd,da |
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
| a | b | c |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | ab,bc | | a | c | ab,bc |

View File

@ -1,251 +1,251 @@
@routing @car @restrictions @routing @car @restrictions
Feature: Car - Turn restrictions Feature: Car - Turn restrictions
Handle turn restrictions as defined by http://wiki.openstreetmap.org/wiki/Relation:restriction Handle turn restrictions as defined by http://wiki.openstreetmap.org/wiki/Relation:restriction
Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes. Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
Background: Use car routing
Given the profile "car"
@no_turning
Scenario: Car - No left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways Background: Use car routing
| nodes | oneway | Given the profile "car"
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the relations @no_turning
| type | way:from | way:to | node:via | restriction | Scenario: Car - No left turn
| restriction | sj | wj | j | no_left_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway |
| s | w | | | sj | yes |
| s | n | sj,nj | | nj | -1 |
| s | e | sj,ej | | wj | -1 |
| ej | -1 |
@no_turning And the relations
Scenario: Car - No right turn | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | wj | j | no_left_turn |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | | from | to | route |
| sj | yes | | s | w | |
| nj | -1 | | s | n | sj,nj |
| wj | -1 | | s | e | sj,ej |
| ej | -1 |
And the relations @no_turning
| type | way:from | way:to | node:via | restriction | Scenario: Car - No right turn
| restriction | sj | ej | j | no_right_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway |
| s | w | sj,wj | | sj | yes |
| s | n | sj,nj | | nj | -1 |
| s | e | | | wj | -1 |
| ej | -1 |
@no_turning And the relations
Scenario: Car - No u-turn | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | ej | j | no_right_turn |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | | from | to | route |
| sj | yes | | s | w | sj,wj |
| nj | -1 | | s | n | sj,nj |
| wj | -1 | | s | e | |
| ej | -1 |
And the relations @no_turning
| type | way:from | way:to | node:via | restriction | Scenario: Car - No u-turn
| restriction | sj | wj | j | no_u_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway |
| s | w | | | sj | yes |
| s | n | sj,nj | | nj | -1 |
| s | e | sj,ej | | wj | -1 |
| ej | -1 |
@no_turning And the relations
Scenario: Car - Handle any no_* relation | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | wj | j | no_u_turn |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | | from | to | route |
| sj | yes | | s | w | |
| nj | -1 | | s | n | sj,nj |
| wj | -1 | | s | e | sj,ej |
| ej | -1 |
And the relations @no_turning
| type | way:from | way:to | node:via | restriction | Scenario: Car - Handle any no_* relation
| restriction | sj | wj | j | no_weird_zigzags | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway |
| s | w | | | sj | yes |
| s | n | sj,nj | | nj | -1 |
| s | e | sj,ej | | wj | -1 |
| ej | -1 |
@only_turning And the relations
Scenario: Car - Only left turn | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | wj | j | no_weird_zigzags |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | | from | to | route |
| sj | yes | | s | w | |
| nj | -1 | | s | n | sj,nj |
| wj | -1 | | s | e | sj,ej |
| ej | -1 |
And the relations @only_turning
| type | way:from | way:to | node:via | restriction | Scenario: Car - Only left turn
| restriction | sj | wj | j | only_left_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway |
| s | w | sj,wj | | sj | yes |
| s | n | | | nj | -1 |
| s | e | | | wj | -1 |
| ej | -1 |
@only_turning And the relations
Scenario: Car - Only right turn | type | way:from | way:to | node:via | restriction |
Given the node map | restriction | sj | wj | j | only_left_turn |
| | n | |
| w | j | e |
| | s | |
And the ways When I route I should get
| nodes | oneway | | from | to | route |
| sj | yes | | s | w | sj,wj |
| nj | -1 | | s | n | |
| wj | -1 | | s | e | |
| ej | -1 |
And the relations @only_turning
| type | way:from | way:to | node:via | restriction | Scenario: Car - Only right turn
| restriction | sj | ej | j | only_right_turn | Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get And the ways
| from | to | route | | nodes | oneway |
| s | w | | | sj | yes |
| s | n | | | nj | -1 |
| s | e | sj,ej | | wj | -1 |
| ej | -1 |
@only_turning
Scenario: Car - Only straight on
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways And the relations
| nodes | oneway | | type | way:from | way:to | node:via | restriction |
| sj | yes | | restriction | sj | ej | j | only_right_turn |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the relations When I route I should get
| type | way:from | way:to | node:via | restriction | | from | to | route |
| restriction | sj | nj | j | only_straight_on | | s | w | |
| s | n | |
| s | e | sj,ej |
When I route I should get @only_turning
| from | to | route | Scenario: Car - Only straight on
| s | w | | Given the node map
| s | n | sj,nj | | | n | |
| s | e | | | w | j | e |
| | s | |
@no_turning And the ways
Scenario: Car - Handle any only_* restriction | nodes | oneway |
Given the node map | sj | yes |
| | n | | | nj | -1 |
| w | j | e | | wj | -1 |
| | s | | | ej | -1 |
And the ways And the relations
| nodes | oneway | | type | way:from | way:to | node:via | restriction |
| sj | yes | | restriction | sj | nj | j | only_straight_on |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the relations When I route I should get
| type | way:from | way:to | node:via | restriction | | from | to | route |
| restriction | sj | nj | j | only_weird_zigzags | | s | w | |
| s | n | sj,nj |
| s | e | |
When I route I should get @no_turning
| from | to | route | Scenario: Car - Handle any only_* restriction
| s | w | | Given the node map
| s | n | sj,nj | | | n | |
| s | e | | | w | j | e |
| | s | |
@except And the ways
Scenario: Car - Except tag and on no_ restrictions | nodes | oneway |
Given the node map | sj | yes |
| b | x | c | | nj | -1 |
| a | j | d | | wj | -1 |
| | s | | | ej | -1 |
And the ways And the relations
| nodes | oneway | | type | way:from | way:to | node:via | restriction |
| sj | no | | restriction | sj | nj | j | only_weird_zigzags |
| xj | -1 |
| aj | -1 |
| bj | no |
| cj | no |
| dj | -1 |
And the relations When I route I should get
| type | way:from | way:to | node:via | restriction | except | | from | to | route |
| restriction | sj | aj | j | no_left_turn | motorcar | | s | w | |
| restriction | sj | bj | j | no_left_turn | | | s | n | sj,nj |
| restriction | sj | cj | j | no_right_turn | | | s | e | |
| restriction | sj | dj | j | no_right_turn | motorcar |
When I route I should get @except
| from | to | route | Scenario: Car - Except tag and on no_ restrictions
| s | a | sj,aj | Given the node map
| s | b | | | b | x | c |
| s | c | | | a | j | d |
| s | d | sj,dj | | | s | |
@except And the ways
Scenario: Car - Except tag and on only_ restrictions | nodes | oneway |
Given the node map | sj | no |
| a | | b | | xj | -1 |
| | j | | | aj | -1 |
| | s | | | bj | no |
| cj | no |
| dj | -1 |
And the ways And the relations
| nodes | oneway | | type | way:from | way:to | node:via | restriction | except |
| sj | yes | | restriction | sj | aj | j | no_left_turn | motorcar |
| aj | no | | restriction | sj | bj | j | no_left_turn | |
| bj | no | | restriction | sj | cj | j | no_right_turn | |
| restriction | sj | dj | j | no_right_turn | motorcar |
And the relations When I route I should get
| type | way:from | way:to | node:via | restriction | except | | from | to | route |
| restriction | sj | aj | j | only_straight_on | motorcar | | s | a | sj,aj |
| s | b | |
| s | c | |
| s | d | sj,dj |
When I route I should get @except
| from | to | route | Scenario: Car - Except tag and on only_ restrictions
| s | a | sj,aj | Given the node map
| s | b | sj,bj | | a | | b |
| | j | |
| | s | |
And the ways
| nodes | oneway |
| sj | yes |
| aj | no |
| bj | no |
And the relations
| type | way:from | way:to | node:via | restriction | except |
| restriction | sj | aj | j | only_straight_on | motorcar |
When I route I should get
| from | to | route |
| s | a | sj,aj |
| s | b | sj,bj |

View File

@ -1,30 +1,30 @@
@routing @car @roundabout @instruction @routing @car @roundabout @instruction
Feature: Roundabout Instructions Feature: Roundabout Instructions
Background:
Given the profile "car"
Scenario: Car - Roundabout instructions
Given the node map
| | | v | | |
| | | d | | |
| s | a | | c | u |
| | | b | | |
| | | t | | |
And the ways Background:
| nodes | junction | Given the profile "car"
| sa | |
| tb | | Scenario: Car - Roundabout instructions
| uc | | Given the node map
| vd | | | | | v | | |
| abcda | roundabout | | | | d | | |
| s | a | | c | u |
When I route I should get | | | b | | |
| from | to | route | turns | | | | t | | |
| s | t | sa,tb | head,enter_roundabout-1,destination |
| s | u | sa,uc | head,enter_roundabout-2,destination | And the ways
| s | v | sa,vd | head,enter_roundabout-3,destination | | nodes | junction |
| u | v | uc,vd | head,enter_roundabout-1,destination | | sa | |
| u | s | uc,sa | head,enter_roundabout-2,destination | | tb | |
| u | t | uc,tb | head,enter_roundabout-3,destination | | uc | |
| vd | |
| abcda | roundabout |
When I route I should get
| from | to | route | turns |
| s | t | sa,tb | head,enter_roundabout-1,destination |
| s | u | sa,uc | head,enter_roundabout-2,destination |
| s | v | sa,vd | head,enter_roundabout-3,destination |
| u | v | uc,vd | head,enter_roundabout-1,destination |
| u | s | uc,sa | head,enter_roundabout-2,destination |
| u | t | uc,tb | head,enter_roundabout-3,destination |

View File

@ -1,33 +1,31 @@
@routing @car @shuttle_train @routing @car @shuttle_train
Feature: Car - Handle ferryshuttle train routes Feature: Car - Handle ferryshuttle train routes
Background: Background:
Given the profile "car" Given the profile "car"
Scenario: Car - Use a ferry route Scenario: Car - Use a ferry route
Given the node map Given the node map
| a | b | c | | | | | a | b | c | | | |
| | | d | | | | | | | d | | | |
| | | e | f | g | h | | | | e | f | g | h |
And the ways
| nodes | highway | route | bicycle |
| abc | primary | | |
| cde | | shuttle_train | yes |
| ef | primary | | |
| fg | | ferry_man | |
| gh | primary | | no |
When I route I should get
| from | to | route |
| a | f | abc,cde,ef |
| b | f | abc,cde,ef |
| e | c | cde |
| e | b | cde,abc |
| e | a | cde,abc |
| c | e | cde |
| c | f | cde,ef |
| f | g | |
| g | h | gh |
And the ways
| nodes | highway | route | bicycle |
| abc | primary | | |
| cde | | shuttle_train | yes |
| ef | primary | | |
| fg | | ferry_man | |
| gh | primary | | no |
When I route I should get
| from | to | route |
| a | f | abc,cde,ef |
| b | f | abc,cde,ef |
| e | c | cde |
| e | b | cde,abc |
| e | a | cde,abc |
| c | e | cde |
| c | f | cde,ef |
| f | g | |
| g | h | gh |

View File

@ -1,33 +1,33 @@
@routing @car @way @routing @car @way
Feature: Car - Accessability of different way types Feature: Car - Accessability of different way types
Background: Background:
Given the profile "car" Given the profile "car"
Scenario: Car - Basic access Scenario: Car - Basic access
Then routability should be Then routability should be
| highway | forw | | highway | forw |
| (nil) | | | (nil) | |
| motorway | x | | motorway | x |
| motorway_link | x | | motorway_link | x |
| trunk | x | | trunk | x |
| trunk_link | x | | trunk_link | x |
| primary | x | | primary | x |
| primary_link | x | | primary_link | x |
| secondary | x | | secondary | x |
| secondary_link | x | | secondary_link | x |
| tertiary | x | | tertiary | x |
| tertiary_link | x | | tertiary_link | x |
| residential | x | | residential | x |
| service | x | | service | x |
| unclassified | x | | unclassified | x |
| living_street | x | | living_street | x |
| road | | | road | |
| track | | | track | |
| path | | | path | |
| footway | | | footway | |
| pedestrian | | | pedestrian | |
| steps | | | steps | |
| pier | | | pier | |
| cycleway | | | cycleway | |
| bridleway | | | bridleway | |

View File

@ -2,19 +2,19 @@
Feature: Foot - Ignore max speed restrictions Feature: Foot - Ignore max speed restrictions
Background: Use specific speeds Background: Use specific speeds
Given the profile "foot" Given the profile "foot"
@todo @todo
Scenario: Foot - Ignore maxspeed Scenario: Foot - Ignore maxspeed
Then routability should be Then routability should be
| highway | maxspeed | bothw | | highway | maxspeed | bothw |
| residential | | 145s ~10% | | residential | | 145s ~10% |
| residential | 1 | 145s ~10% | | residential | 1 | 145s ~10% |
| residential | 100 | 145s ~10% | | residential | 100 | 145s ~10% |
| residential | 1 | 145s ~10% | | residential | 1 | 145s ~10% |
| residential | 1mph | 145s ~10% | | residential | 1mph | 145s ~10% |
| residential | 1 mph | 145s ~10% | | residential | 1 mph | 145s ~10% |
| residential | 1unknown | 145s ~10% | | residential | 1unknown | 145s ~10% |
| residential | 1 unknown | 145s ~10% | | residential | 1 unknown | 145s ~10% |
| residential | none | 145s ~10% | | residential | none | 145s ~10% |
| residential | signals | 145s ~10% | | residential | signals | 145s ~10% |

View File

@ -2,59 +2,59 @@
Feature: Foot - Oneway streets Feature: Foot - Oneway streets
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
Background: Background:
Given the profile "foot" Given the profile "foot"
Scenario: Foot - Walking should not be affected by oneways
Then routability should be
| oneway | bothw |
| | x |
| nonsense | x |
| no | x |
| false | x |
| 0 | x |
| yes | x |
| true | x |
| 1 | x |
| -1 | x |
Scenario: Foot - Walking and roundabouts Scenario: Foot - Walking should not be affected by oneways
Then routability should be Then routability should be
| junction | bothw | | oneway | bothw |
| roundarout | x | | | x |
| nonsense | x |
| no | x |
| false | x |
| 0 | x |
| yes | x |
| true | x |
| 1 | x |
| -1 | x |
Scenario: Foot - Oneway:foot tag should not cause walking on big roads Scenario: Foot - Walking and roundabouts
Then routability should be Then routability should be
| highway | oneway:foot | bothw | | junction | bothw |
| footway | | x | | roundarout | x |
| motorway | yes | |
| motorway_link | yes | | Scenario: Foot - Oneway:foot tag should not cause walking on big roads
| trunk | yes | | Then routability should be
| trunk_link | yes | | | highway | oneway:foot | bothw |
| motorway | no | | | footway | | x |
| motorway_link | no | | | motorway | yes | |
| trunk | no | | | motorway_link | yes | |
| trunk_link | no | | | trunk | yes | |
| motorway | -1 | | | trunk_link | yes | |
| motorway_link | -1 | | | motorway | no | |
| trunk | -1 | | | motorway_link | no | |
| trunk_link | -1 | | | trunk | no | |
| trunk_link | no | |
Scenario: Foot - Walking should respect oneway:foot | motorway | -1 | |
Then routability should be | motorway_link | -1 | |
| oneway:foot | oneway | junction | forw | backw | | trunk | -1 | |
| yes | | | x | | | trunk_link | -1 | |
| yes | yes | | x | |
| yes | no | | x | | Scenario: Foot - Walking should respect oneway:foot
| yes | -1 | | x | | Then routability should be
| yes | | roundabout | x | | | oneway:foot | oneway | junction | forw | backw |
| no | | | x | x | | yes | | | x | |
| no | yes | | x | x | | yes | yes | | x | |
| no | no | | x | x | | yes | no | | x | |
| no | -1 | | x | x | | yes | -1 | | x | |
| no | | roundabout | x | x | | yes | | roundabout | x | |
| -1 | | | | x | | no | | | x | x |
| -1 | yes | | | x | | no | yes | | x | x |
| -1 | no | | | x | | no | no | | x | x |
| -1 | -1 | | | x | | no | -1 | | x | x |
| -1 | | roundabout | | x | | no | | roundabout | x | x |
| -1 | | | | x |
| -1 | yes | | | x |
| -1 | no | | | x |
| -1 | -1 | | | x |
| -1 | | roundabout | | x |

View File

@ -1,32 +1,32 @@
@routing @foot @way @routing @foot @way
Feature: Foot - Accessability of different way types Feature: Foot - Accessability of different way types
Background: Background:
Given the profile "foot" Given the profile "foot"
Scenario: Foot - Basic access Scenario: Foot - Basic access
Then routability should be Then routability should be
| highway | forw | | highway | forw |
| motorway | | | motorway | |
| motorway_link | | | motorway_link | |
| trunk | | | trunk | |
| trunk_link | | | trunk_link | |
| primary | x | | primary | x |
| primary_link | x | | primary_link | x |
| secondary | x | | secondary | x |
| secondary_link | x | | secondary_link | x |
| tertiary | x | | tertiary | x |
| tertiary_link | x | | tertiary_link | x |
| residential | x | | residential | x |
| service | x | | service | x |
| unclassified | x | | unclassified | x |
| living_street | x | | living_street | x |
| road | x | | road | x |
| track | x | | track | x |
| path | x | | path | x |
| footway | x | | footway | x |
| pedestrian | x | | pedestrian | x |
| steps | x | | steps | x |
| pier | x | | pier | x |
| cycleway | | | cycleway | |
| bridleway | | | bridleway | |

View File

@ -1,79 +1,79 @@
@routing @weird @todo @routing @weird @todo
Feature: Weird routings discovered Feature: Weird routings discovered
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Routing on a oneway roundabout Scenario: Routing on a oneway roundabout
Given the node map Given the node map
| | d | c | | | | d | c | |
| e | | | b | | e | | | b |
| f | | | a | | f | | | a |
| | g | h | | | | g | h | |
And the ways And the ways
| nodes | oneway | | nodes | oneway |
| ab | yes | | ab | yes |
| bc | yes | | bc | yes |
| cd | yes | | cd | yes |
| de | yes | | de | yes |
| ef | yes | | ef | yes |
| fg | yes | | fg | yes |
| gh | yes | | gh | yes |
| ha | yes | | ha | yes |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab |
| b | c | bc | | b | c | bc |
| c | d | cd | | c | d | cd |
| d | e | de | | d | e | de |
| e | f | ef | | e | f | ef |
| f | g | fg | | f | g | fg |
| g | h | gh | | g | h | gh |
| h | a | ha | | h | a | ha |
| b | a | bc,cd,de,ef,fg,gh,ha | | b | a | bc,cd,de,ef,fg,gh,ha |
| c | b | cd,de,ef,fg,gh,ha,ab | | c | b | cd,de,ef,fg,gh,ha,ab |
| d | c | de,ef,fg,gh,ha,ab,bc | | d | c | de,ef,fg,gh,ha,ab,bc |
| e | d | ef,fg,gh,ha,ab,bc,cd | | e | d | ef,fg,gh,ha,ab,bc,cd |
| f | e | fg,gh,ha,ab,bc,cd,de | | f | e | fg,gh,ha,ab,bc,cd,de |
| g | f | gh,ha,ab,bc,cd,de,ef | | g | f | gh,ha,ab,bc,cd,de,ef |
| h | g | ha,ab,bc,cd,de,ef,fg | | h | g | ha,ab,bc,cd,de,ef,fg |
| a | h | ab,bc,cd,de,ef,fg,gh | | a | h | ab,bc,cd,de,ef,fg,gh |
Scenario: Routing on a oneway roundabout Scenario: Routing on a oneway roundabout
Given the node map Given the node map
| | d | c | | | | d | c | |
| e | | | b | | e | | | b |
| f | | | a | | f | | | a |
| | g | h | | | | g | h | |
And the ways And the ways
| nodes | oneway | | nodes | oneway |
| ab | yes | | ab | yes |
| bc | yes | | bc | yes |
| cd | yes | | cd | yes |
| de | yes | | de | yes |
| ef | yes | | ef | yes |
| fg | yes | | fg | yes |
| gh | yes | | gh | yes |
| ha | yes | | ha | yes |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab |
| b | c | bc | | b | c | bc |
| c | d | cd | | c | d | cd |
| d | e | de | | d | e | de |
| e | f | ef | | e | f | ef |
| f | g | fg | | f | g | fg |
| g | h | gh | | g | h | gh |
| h | a | ha | | h | a | ha |
| b | a | bc,cd,de,ef,fg,gh,ha | | b | a | bc,cd,de,ef,fg,gh,ha |
| c | b | cd,de,ef,fg,gh,ha,ab | | c | b | cd,de,ef,fg,gh,ha,ab |
| d | c | de,ef,fg,gh,ha,ab,bc | | d | c | de,ef,fg,gh,ha,ab,bc |
| e | d | ef,fg,gh,ha,ab,bc,cd | | e | d | ef,fg,gh,ha,ab,bc,cd |
| f | e | fg,gh,ha,ab,bc,cd,de | | f | e | fg,gh,ha,ab,bc,cd,de |
| g | f | gh,ha,ab,bc,cd,de,ef | | g | f | gh,ha,ab,bc,cd,de,ef |
| h | g | ha,ab,bc,cd,de,ef,fg | | h | g | ha,ab,bc,cd,de,ef,fg |
| a | h | ab,bc,cd,de,ef,fg,gh | | a | h | ab,bc,cd,de,ef,fg,gh |

View File

@ -6,192 +6,192 @@ Feature: Locate - return nearest node
Scenario: Locate - two ways crossing Scenario: Locate - two ways crossing
Given the node map Given the node map
| | | 0 | c | 1 | | | | | | 0 | c | 1 | | |
| | | | | | | | | | | | | | | |
| 7 | | | n | | | 2 | | 7 | | | n | | | 2 |
| a | | k | x | m | | b | | a | | k | x | m | | b |
| 6 | | | l | | | 3 | | 6 | | | l | | | 3 |
| | | | | | | | | | | | | | | |
| | | 5 | d | 4 | | | | | | 5 | d | 4 | | |
And the ways And the ways
| nodes | | nodes |
| axb | | axb |
| cxd | | cxd |
When I request locate I should get When I request locate I should get
| in | out | | in | out |
| 0 | c | | 0 | c |
| 1 | c | | 1 | c |
| 2 | b | | 2 | b |
| 3 | b | | 3 | b |
| 4 | d | | 4 | d |
| 5 | d | | 5 | d |
| 6 | a | | 6 | a |
| 7 | a | | 7 | a |
| a | a | | a | a |
| b | b | | b | b |
| c | c | | c | c |
| d | d | | d | d |
| k | x | | k | x |
| l | x | | l | x |
| m | x | | m | x |
| n | x | | n | x |
Scenario: Locate - inside a triangle Scenario: Locate - inside a triangle
Given the node map Given the node map
| | | | | | c | | | | | | | | | | | | c | | | | | |
| | | | | | 7 | | | | | | | | | | | | 7 | | | | | |
| | | | y | | | | z | | | | | | | | y | | | | z | | | |
| | | 5 | | 0 | | 1 | | 8 | | | | | | 5 | | 0 | | 1 | | 8 | | |
| 6 | | | 2 | | 3 | | 4 | | | 9 | | 6 | | | 2 | | 3 | | 4 | | | 9 |
| a | | | x | | u | | w | | | b | | a | | | x | | u | | w | | | b |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
| bc | | bc |
| ca | | ca |
When I request locate I should get When I request locate I should get
| in | out | | in | out |
| 0 | c | | 0 | c |
| 1 | c | | 1 | c |
| 2 | a | | 2 | a |
| 3 | c | | 3 | c |
| 4 | b | | 4 | b |
| 5 | a | | 5 | a |
| 6 | a | | 6 | a |
| 7 | c | | 7 | c |
| 8 | b | | 8 | b |
| 9 | b | | 9 | b |
| x | a | | x | a |
| y | c | | y | c |
| z | c | | z | c |
| w | b | | w | b |
Scenario: Nearest - easy-west way Scenario: Nearest - easy-west way
Given the node map Given the node map
| 3 | 4 | | 5 | 6 | | 3 | 4 | | 5 | 6 |
| 2 | a | x | b | 7 | | 2 | a | x | b | 7 |
| 1 | 0 | | 9 | 8 | | 1 | 0 | | 9 | 8 |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
When I request locate I should get When I request locate I should get
| in | out | | in | out |
| 0 | a | | 0 | a |
| 1 | a | | 1 | a |
| 2 | a | | 2 | a |
| 3 | a | | 3 | a |
| 4 | a | | 4 | a |
| 5 | b | | 5 | b |
| 6 | b | | 6 | b |
| 7 | b | | 7 | b |
| 8 | b | | 8 | b |
| 9 | b | | 9 | b |
Scenario: Nearest - north-south way Scenario: Nearest - north-south way
Given the node map Given the node map
| 1 | 2 | 3 | | 1 | 2 | 3 |
| 0 | a | 4 | | 0 | a | 4 |
| | x | | | | x | |
| 9 | b | 5 | | 9 | b | 5 |
| 8 | 7 | 6 | | 8 | 7 | 6 |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
When I request locate I should get When I request locate I should get
| in | out | | in | out |
| 0 | a | | 0 | a |
| 1 | a | | 1 | a |
| 2 | a | | 2 | a |
| 3 | a | | 3 | a |
| 4 | a | | 4 | a |
| 5 | b | | 5 | b |
| 6 | b | | 6 | b |
| 7 | b | | 7 | b |
| 8 | b | | 8 | b |
| 9 | b | | 9 | b |
Scenario: Nearest - diagonal 1 Scenario: Nearest - diagonal 1
Given the node map Given the node map
| 2 | | 3 | | | | | 2 | | 3 | | | |
| | a | | 4 | | | | | a | | 4 | | |
| 1 | | x | | 5 | | | 1 | | x | | 5 | |
| | 0 | | y | | 6 | | | 0 | | y | | 6 |
| | | 9 | | b | | | | | 9 | | b | |
| | | | 8 | | 7 | | | | | 8 | | 7 |
And the ways And the ways
| nodes | | nodes |
| axyb | | axyb |
When I request locate I should get When I request locate I should get
| in | out | | in | out |
| 0 | x | | 0 | x |
| 1 | a | | 1 | a |
| 2 | a | | 2 | a |
| 3 | a | | 3 | a |
| 4 | x | | 4 | x |
| 5 | y | | 5 | y |
| 6 | b | | 6 | b |
| 7 | b | | 7 | b |
| 8 | b | | 8 | b |
| 9 | y | | 9 | y |
| a | a | | a | a |
| b | b | | b | b |
| x | x | | x | x |
| y | y | | y | y |
Scenario: Nearest - diagonal 2 Scenario: Nearest - diagonal 2
Given the node map Given the node map
| | | | 6 | | 7 | | | | | 6 | | 7 |
| | | 5 | | b | | | | | 5 | | b | |
| | 4 | | y | | 8 | | | 4 | | y | | 8 |
| 3 | | x | | 9 | | | 3 | | x | | 9 | |
| | a | | 0 | | | | | a | | 0 | | |
| 2 | | 1 | | | | | 2 | | 1 | | | |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
When I request nearest I should get When I request nearest I should get
| in | out | | in | out |
| 0 | x | | 0 | x |
| 1 | a | | 1 | a |
| 2 | a | | 2 | a |
| 3 | a | | 3 | a |
| 4 | x | | 4 | x |
| 5 | y | | 5 | y |
| 6 | b | | 6 | b |
| 7 | b | | 7 | b |
| 8 | b | | 8 | b |
| 9 | y | | 9 | y |
| a | a | | a | a |
| b | b | | b | b |
| x | x | | x | x |
| y | y | | y | y |
Scenario: Locate - High lat/lon Scenario: Locate - High lat/lon
Given the node locations Given the node locations
| node | lat | lon | | node | lat | lon |
| a | -85 | -180 | | a | -85 | -180 |
| b | 0 | 0 | | b | 0 | 0 |
| c | 85 | 180 | | c | 85 | 180 |
| x | -84 | -180 | | x | -84 | -180 |
| y | 84 | 180 | | y | 84 | 180 |
And the ways And the ways
| nodes | | nodes |
| abc | | abc |
When I request locate I should get When I request locate I should get
| in | out | | in | out |
| x | a | | x | a |
| y | c | | y | c |

View File

@ -1,78 +1,78 @@
@nearest @nearest
Feature: Locating Nearest node on a Way - pick closest way Feature: Locating Nearest node on a Way - pick closest way
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Nearest - two ways crossing
Given the node map
| | 0 | c | 1 | |
| 7 | | n | | 2 |
| a | k | x | m | b |
| 6 | | l | | 3 |
| | 5 | d | 4 | |
And the ways Scenario: Nearest - two ways crossing
| nodes | Given the node map
| axb | | | 0 | c | 1 | |
| cxd | | 7 | | n | | 2 |
| a | k | x | m | b |
When I request nearest I should get | 6 | | l | | 3 |
| in | out | | | 5 | d | 4 | |
| 0 | c |
| 1 | c |
| 2 | b |
| 3 | b |
| 4 | d |
| 5 | d |
| 6 | a |
| 7 | a |
| k | k |
| l | l |
| m | m |
| n | n |
Scenario: Nearest - inside a triangle
Given the node map
| | | | | | c | | | | | |
| | | | | | | | | | | |
| | | | y | | | | z | | | |
| | | | | 0 | | 1 | | | | |
| | | | 2 | | 3 | | 4 | | | |
| a | | | x | | u | | w | | | b |
And the ways
| nodes |
| ab |
| bc |
| ca |
When I request nearest I should get
| in | out |
| 0 | y |
| 1 | z |
| 2 | x |
| 3 | u |
| 4 | w |
Scenario: Nearest - High lat/lon
Given the node locations
| node | lat | lon |
| a | -85 | -180 |
| b | 0 | 0 |
| c | 85 | 180 |
| x | -70 | -100 |
| y | 70 | 100 |
| v | 1 | 1 |
| w | -1 | -1 |
And the ways And the ways
| nodes | | nodes |
| abc | | axb |
| cxd |
When I request nearest I should get When I request nearest I should get
| in | out | | in | out |
| x | a | | 0 | c |
| y | c | | 1 | c |
| v | b | | 2 | b |
| w | b | | 3 | b |
| 4 | d |
| 5 | d |
| 6 | a |
| 7 | a |
| k | k |
| l | l |
| m | m |
| n | n |
Scenario: Nearest - inside a triangle
Given the node map
| | | | | | c | | | | | |
| | | | | | | | | | | |
| | | | y | | | | z | | | |
| | | | | 0 | | 1 | | | | |
| | | | 2 | | 3 | | 4 | | | |
| a | | | x | | u | | w | | | b |
And the ways
| nodes |
| ab |
| bc |
| ca |
When I request nearest I should get
| in | out |
| 0 | y |
| 1 | z |
| 2 | x |
| 3 | u |
| 4 | w |
Scenario: Nearest - High lat/lon
Given the node locations
| node | lat | lon |
| a | -85 | -180 |
| b | 0 | 0 |
| c | 85 | 180 |
| x | -70 | -100 |
| y | 70 | 100 |
| v | 1 | 1 |
| w | -1 | -1 |
And the ways
| nodes |
| abc |
When I request nearest I should get
| in | out |
| x | a |
| y | c |
| v | b |
| w | b |

View File

@ -1,105 +1,105 @@
@nearest @nearest
Feature: Locating Nearest node on a Way - basic projection onto way Feature: Locating Nearest node on a Way - basic projection onto way
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Nearest - easy-west way
Given the node map
| 0 | 1 | 2 | 3 | 4 |
| | a | x | b | |
| 5 | 6 | 7 | 8 | 9 |
And the ways Scenario: Nearest - easy-west way
| nodes | Given the node map
| ab | | 0 | 1 | 2 | 3 | 4 |
| | a | x | b | |
| 5 | 6 | 7 | 8 | 9 |
When I request nearest I should get And the ways
| in | out | | nodes |
| 0 | a | | ab |
| 1 | a |
| 2 | x |
| 3 | b |
| 4 | b |
| 5 | a |
| 6 | a |
| 7 | x |
| 8 | b |
| 9 | b |
Scenario: Nearest - north-south way When I request nearest I should get
Given the node map | in | out |
| 0 | | 5 | | 0 | a |
| 1 | a | 6 | | 1 | a |
| 2 | x | 7 | | 2 | x |
| 3 | b | 8 | | 3 | b |
| 4 | | 9 | | 4 | b |
| 5 | a |
And the ways | 6 | a |
| nodes | | 7 | x |
| ab | | 8 | b |
| 9 | b |
When I request nearest I should get Scenario: Nearest - north-south way
| in | out | Given the node map
| 0 | a | | 0 | | 5 |
| 1 | a | | 1 | a | 6 |
| 2 | x | | 2 | x | 7 |
| 3 | b | | 3 | b | 8 |
| 4 | b | | 4 | | 9 |
| 5 | a |
| 6 | a |
| 7 | x |
| 8 | b |
| 9 | b |
Scenario: Nearest - diagonal 1 And the ways
Given the node map | nodes |
| 8 | | 4 | | | | | ab |
| | a | | 5 | | |
| 0 | | x | | 6 | |
| | 1 | | y | | 7 |
| | | 2 | | b | |
| | | | 3 | | 9 |
And the ways When I request nearest I should get
| nodes | | in | out |
| ab | | 0 | a |
| 1 | a |
| 2 | x |
| 3 | b |
| 4 | b |
| 5 | a |
| 6 | a |
| 7 | x |
| 8 | b |
| 9 | b |
When I request nearest I should get Scenario: Nearest - diagonal 1
| in | out | Given the node map
| 0 | a | | 8 | | 4 | | | |
| 1 | x | | | a | | 5 | | |
| 2 | y | | 0 | | x | | 6 | |
| 3 | b | | | 1 | | y | | 7 |
| 4 | a | | | | 2 | | b | |
| 5 | x | | | | | 3 | | 9 |
| 6 | y |
| 7 | b |
| 8 | a |
| 9 | b |
Scenario: Nearest - diagonal 2 And the ways
Given the node map | nodes |
| | | | 3 | | 9 | | ab |
| | | 2 | | b | |
| | 1 | | y | | 7 |
| 0 | | x | | 6 | |
| | a | | 5 | | |
| 8 | | 4 | | | |
And the ways When I request nearest I should get
| nodes | | in | out |
| ab | | 0 | a |
| 1 | x |
| 2 | y |
| 3 | b |
| 4 | a |
| 5 | x |
| 6 | y |
| 7 | b |
| 8 | a |
| 9 | b |
When I request nearest I should get Scenario: Nearest - diagonal 2
| in | out | Given the node map
| 0 | a | | | | | 3 | | 9 |
| 1 | x | | | | 2 | | b | |
| 2 | y | | | 1 | | y | | 7 |
| 3 | b | | 0 | | x | | 6 | |
| 4 | a | | | a | | 5 | | |
| 5 | x | | 8 | | 4 | | | |
| 6 | y |
| 7 | b | And the ways
| 8 | a | | nodes |
| 9 | b | | ab |
When I request nearest I should get
| in | out |
| 0 | a |
| 1 | x |
| 2 | y |
| 3 | b |
| 4 | a |
| 5 | x |
| 6 | y |
| 7 | b |
| 8 | a |
| 9 | b |

View File

@ -1,58 +1,58 @@
@stress @stress
Feature: Stress testing Feature: Stress testing
Background:
Given the profile "testbot"
Scenario: Stress - 10km star, request 1 route
#osrm-routed hangs very often
Given a grid size of 10000 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
And the ways Background:
| nodes | highway | Given the profile "testbot"
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
When I route 100 times I should get Scenario: Stress - 10km star, request 1 route
| from | to | route | #osrm-routed hangs very often
| x | h | xh | Given a grid size of 10000 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
Scenario: Stress - 10km star, request 8 routes And the ways
#osrm-routed hangs sometimes | nodes | highway |
Given a grid size of 10000 meters | xa | primary |
Given the node map | xb | primary |
| h | a | b | | xc | primary |
| g | x | c | | xd | primary |
| f | e | d | | xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
And the ways When I route 100 times I should get
| nodes | highway | | from | to | route |
| xa | primary | | x | h | xh |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
When I route 100 times I should get Scenario: Stress - 10km star, request 8 routes
| from | to | route | #osrm-routed hangs sometimes
| x | a | xa | Given a grid size of 10000 meters
| x | b | xb | Given the node map
| x | c | xc | | h | a | b |
| x | d | xd | | g | x | c |
| x | e | xe | | f | e | d |
| x | f | xf |
| x | g | xg | And the ways
| x | h | xh | | nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
When I route 100 times I should get
| from | to | route |
| x | a | xa |
| x | b | xb |
| x | c | xc |
| x | d | xd |
| x | e | xe |
| x | f | xf |
| x | g | xg |
| x | h | xh |

View File

@ -1,86 +1,86 @@
@routing @bad @routing @bad
Feature: Handle bad data in a graceful manner Feature: Handle bad data in a graceful manner
Background:
Given the profile "testbot"
Scenario: Empty dataset Background:
Given the node map Given the profile "testbot"
| |
Given the ways Scenario: Empty dataset
| nodes | Given the node map
| |
When I preprocess data
Then "osrm-extract" should return code 255
Scenario: Only dead-end oneways Given the ways
Given the node map | nodes |
| a | b | c | d | e |
Given the ways When I preprocess data
| nodes | oneway | Then "osrm-extract" should return code 255
| abcde | yes |
Scenario: Only dead-end oneways
Given the node map
| a | b | c | d | e |
Given the ways
| nodes | oneway |
| abcde | yes |
When I route I should get
| from | to | route |
| b | d | abcde |
When I route I should get
| from | to | route |
| b | d | abcde |
@todo @todo
Scenario: Start/end point at the same location Scenario: Start/end point at the same location
Given the node map Given the node map
| a | b | | a | b |
| 1 | 2 | | 1 | 2 |
Given the ways Given the ways
| nodes | | nodes |
| ab | | ab |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | a | | | a | a | |
| b | b | | | b | b | |
| 1 | 1 | | | 1 | 1 | |
| 2 | 2 | | | 2 | 2 | |
@poles @poles
Scenario: Routing close to the north/south pole Scenario: Routing close to the north/south pole
Mercator is undefined close to the poles. Mercator is undefined close to the poles.
All nodes and request with latitude to close to either of the poles should therefore be ignored. All nodes and request with latitude to close to either of the poles should therefore be ignored.
Given the node locations Given the node locations
| node | lat | lon | | node | lat | lon |
| a | 89 | 0 | | a | 89 | 0 |
| b | 87 | 0 | | b | 87 | 0 |
| c | 82 | 0 | | c | 82 | 0 |
| d | 80 | 0 | | d | 80 | 0 |
| e | 78 | 0 | | e | 78 | 0 |
| k | -78 | 0 | | k | -78 | 0 |
| l | -80 | 0 | | l | -80 | 0 |
| m | -82 | 0 | | m | -82 | 0 |
# | n | -87 | 0 | # | n | -87 | 0 |
# | o | -89 | 0 | # | o | -89 | 0 |
And the ways And the ways
| nodes | | nodes |
# | ab | # | ab |
| bc | | bc |
| cd | | cd |
| de | | de |
| kl | | kl |
| lm | | lm |
# | mn | # | mn |
# | no | # | no |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
# | a | b | cd | # | a | b | cd |
# | b | c | cd | # | b | c | cd |
# | a | d | cd | # | a | d | cd |
# | c | d | cd | # | c | d | cd |
| d | e | de | | d | e | de |
# | k | l | kl | # | k | l | kl |
# | l | m | lm | # | l | m | lm |
# | o | l | lm | # | o | l | lm |
# | n | m | lm | # | n | m | lm |
# | o | n | lm | # | o | n | lm |

View File

@ -1,235 +1,235 @@
@routing @basic @routing @basic
Feature: Basic Routing Feature: Basic Routing
Background: Background:
Given the profile "testbot" Given the profile "testbot"
@smallest @smallest
Scenario: A single way with two nodes Scenario: A single way with two nodes
Given the node map Given the node map
| a | b | | a | b |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab |
| b | a | ab | | b | a | ab |
Scenario: Routing in between two nodes of way Scenario: Routing in between two nodes of way
Given the node map Given the node map
| a | b | 1 | 2 | c | d | | a | b | 1 | 2 | c | d |
And the ways And the ways
| nodes | | nodes |
| abcd | | abcd |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| 1 | 2 | abcd | | 1 | 2 | abcd |
| 2 | 1 | abcd | | 2 | 1 | abcd |
Scenario: Routing between the middle nodes of way Scenario: Routing between the middle nodes of way
Given the node map Given the node map
| a | b | c | d | e | f | | a | b | c | d | e | f |
And the ways And the ways
| nodes | | nodes |
| abcdef | | abcdef |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| b | c | abcdef | | b | c | abcdef |
| b | d | abcdef | | b | d | abcdef |
| b | e | abcdef | | b | e | abcdef |
| c | b | abcdef | | c | b | abcdef |
| c | d | abcdef | | c | d | abcdef |
| c | e | abcdef | | c | e | abcdef |
| d | b | abcdef | | d | b | abcdef |
| d | c | abcdef | | d | c | abcdef |
| d | e | abcdef | | d | e | abcdef |
| e | b | abcdef | | e | b | abcdef |
| e | c | abcdef | | e | c | abcdef |
| e | d | abcdef | | e | d | abcdef |
Scenario: Two ways connected in a straight line Scenario: Two ways connected in a straight line
Given the node map Given the node map
| a | b | c | | a | b | c |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
| bc | | bc |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | ab,bc | | a | c | ab,bc |
| c | a | bc,ab | | c | a | bc,ab |
| a | b | ab | | a | b | ab |
| b | a | ab | | b | a | ab |
| b | c | bc | | b | c | bc |
| c | b | bc | | c | b | bc |
Scenario: 2 unconnected parallel ways Scenario: 2 unconnected parallel ways
Given the node map Given the node map
| a | b | c | | a | b | c |
| d | e | f | | d | e | f |
And the ways And the ways
| nodes | | nodes |
| abc | | abc |
| def | | def |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abc | | a | b | abc |
| b | a | abc | | b | a | abc |
| b | c | abc | | b | c | abc |
| c | b | abc | | c | b | abc |
| d | e | def | | d | e | def |
| e | d | def | | e | d | def |
| e | f | def | | e | f | def |
| f | e | def | | f | e | def |
| a | d | | | a | d | |
| d | a | | | d | a | |
| b | d | | | b | d | |
| d | b | | | d | b | |
| c | d | | | c | d | |
| d | c | | | d | c | |
| a | e | | | a | e | |
| e | a | | | e | a | |
| b | e | | | b | e | |
| e | b | | | e | b | |
| c | e | | | c | e | |
| e | c | | | e | c | |
| a | f | | | a | f | |
| f | a | | | f | a | |
| b | f | | | b | f | |
| f | b | | | f | b | |
| c | f | | | c | f | |
| f | c | | | f | c | |
Scenario: 3 ways connected in a triangle Scenario: 3 ways connected in a triangle
Given the node map Given the node map
| a | | b | | a | | b |
| | | | | | | |
| | c | | | | c | |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
| bc | | bc |
| ca | | ca |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab |
| a | c | ca | | a | c | ca |
| b | c | bc | | b | c | bc |
| b | a | ab | | b | a | ab |
| c | a | ca | | c | a | ca |
| c | b | bc | | c | b | bc |
Scenario: 3 connected triangles Scenario: 3 connected triangles
Given a grid size of 100 meters Given a grid size of 100 meters
Given the node map Given the node map
| x | a | | b | s | | x | a | | b | s |
| y | | | | t | | y | | | | t |
| | | c | | | | | | c | | |
| | v | | w | | | | v | | w | |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
| bc | | bc |
| ca | | ca |
| ax | | ax |
| xy | | xy |
| ya | | ya |
| bs | | bs |
| st | | st |
| tb | | tb |
| cv | | cv |
| vw | | vw |
| wc | | wc |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab |
| a | c | ca | | a | c | ca |
| b | c | bc | | b | c | bc |
| b | a | ab | | b | a | ab |
| c | a | ca | | c | a | ca |
| c | b | bc | | c | b | bc |
Scenario: To ways connected at a 45 degree angle Scenario: To ways connected at a 45 degree angle
Given the node map Given the node map
| a | | | | a | | |
| b | | | | b | | |
| c | d | e | | c | d | e |
And the ways And the ways
| nodes | | nodes |
| abc | | abc |
| cde | | cde |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| b | d | abc,cde | | b | d | abc,cde |
| a | e | abc,cde | | a | e | abc,cde |
| a | c | abc | | a | c | abc |
| c | a | abc | | c | a | abc |
| c | e | cde | | c | e | cde |
| e | c | cde | | e | c | cde |
Scenario: Grid city center Scenario: Grid city center
Given the node map Given the node map
| a | b | c | d | | a | b | c | d |
| e | f | g | h | | e | f | g | h |
| i | j | k | l | | i | j | k | l |
| m | n | o | p | | m | n | o | p |
And the ways And the ways
| nodes | | nodes |
| abcd | | abcd |
| efgh | | efgh |
| ijkl | | ijkl |
| mnop | | mnop |
| aeim | | aeim |
| bfjn | | bfjn |
| cgko | | cgko |
| dhlp | | dhlp |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| f | g | efgh | | f | g | efgh |
| g | f | efgh | | g | f | efgh |
| f | j | bfjn | | f | j | bfjn |
| j | f | bfjn | | j | f | bfjn |
Scenario: Grid city periphery Scenario: Grid city periphery
Given the node map Given the node map
| a | b | c | d | | a | b | c | d |
| e | f | g | h | | e | f | g | h |
| i | j | k | l | | i | j | k | l |
| m | n | o | p | | m | n | o | p |
And the ways And the ways
| nodes | | nodes |
| abcd | | abcd |
| efgh | | efgh |
| ijkl | | ijkl |
| mnop | | mnop |
| aeim | | aeim |
| bfjn | | bfjn |
| cgko | | cgko |
| dhlp | | dhlp |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | d | abcd | | a | d | abcd |
| d | a | abcd | | d | a | abcd |
| a | m | aeim | | a | m | aeim |
| m | a | aeim | | m | a | aeim |

View File

@ -1,141 +1,141 @@
@routing @bearing @routing @bearing
Feature: Compass bearing Feature: Compass bearing
Background:
Given the profile "testbot"
Scenario: Bearing when going northwest
Given the node map
| b | |
| | a |
And the ways Background:
| nodes | Given the profile "testbot"
| ab |
When I route I should get Scenario: Bearing when going northwest
| from | to | route | compass | bearing | Given the node map
| a | b | ab | NW | 315 | | b | |
| | a |
Scenario: Bearing when going west And the ways
Given the node map | nodes |
| b | a | | ab |
And the ways When I route I should get
| nodes | | from | to | route | compass | bearing |
| ab | | a | b | ab | NW | 315 |
When I route I should get Scenario: Bearing when going west
| from | to | route | compass | bearing | Given the node map
| a | b | ab | W | 270 | | b | a |
Scenario: Bearing af 45 degree intervals And the ways
Given the node map | nodes |
| b | a | h | | ab |
| c | x | g |
| d | e | f |
And the ways When I route I should get
| nodes | | from | to | route | compass | bearing |
| xa | | a | b | ab | W | 270 |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
When I route I should get Scenario: Bearing af 45 degree intervals
| from | to | route | compass | bearing | Given the node map
| x | a | xa | N | 0 | | b | a | h |
| x | b | xb | NW | 315 | | c | x | g |
| x | c | xc | W | 270 | | d | e | f |
| x | d | xd | SW | 225 |
| x | e | xe | S | 180 |
| x | f | xf | SE | 135 |
| x | g | xg | E | 90 |
| x | h | xh | NE | 45 |
Scenario: Bearing in a roundabout And the ways
Given the node map | nodes |
| | d | c | | | xa |
| e | | | b | | xb |
| f | | | a | | xc |
| | g | h | | | xd |
| xe |
| xf |
| xg |
| xh |
And the ways When I route I should get
| nodes | oneway | | from | to | route | compass | bearing |
| ab | yes | | x | a | xa | N | 0 |
| bc | yes | | x | b | xb | NW | 315 |
| cd | yes | | x | c | xc | W | 270 |
| de | yes | | x | d | xd | SW | 225 |
| ef | yes | | x | e | xe | S | 180 |
| fg | yes | | x | f | xf | SE | 135 |
| gh | yes | | x | g | xg | E | 90 |
| ha | yes | | x | h | xh | NE | 45 |
When I route I should get Scenario: Bearing in a roundabout
| from | to | route | compass | bearing | Given the node map
| c | b | cd,de,ef,fg,gh,ha,ab | W,SW,S,SE,E,NE,N | 270,225,180,135,90,45,0 | | | d | c | |
| g | f | gh,ha,ab,bc,cd,de,ef | E,NE,N,NW,W,SW,S | 90,45,0,315,270,225,180 | | e | | | b |
| f | | | a |
| | g | h | |
Scenario: Bearing should stay constant when zig-zagging And the ways
Given the node map | nodes | oneway |
| b | d | f | h | | ab | yes |
| a | c | e | g | | bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
And the ways When I route I should get
| nodes | | from | to | route | compass | bearing |
| ab | | c | b | cd,de,ef,fg,gh,ha,ab | W,SW,S,SE,E,NE,N | 270,225,180,135,90,45,0 |
| bc | | g | f | gh,ha,ab,bc,cd,de,ef | E,NE,N,NW,W,SW,S | 90,45,0,315,270,225,180 |
| cd |
| de |
| ef |
| fg |
| gh |
When I route I should get Scenario: Bearing should stay constant when zig-zagging
| from | to | route | compass | bearing | Given the node map
| a | h | ab,bc,cd,de,ef,fg,gh | N,SE,N,SE,N,SE,N | 0,135,0,135,0,135,0 | | b | d | f | h |
| a | c | e | g |
Scenario: Bearings on an east-west way.
Given the node map
| a | b | c | d | e | f |
And the ways And the ways
| nodes | | nodes |
| abcdef | | ab |
| bc |
| cd |
| de |
| ef |
| fg |
| gh |
When I route I should get When I route I should get
| from | to | route | compass | bearing | | from | to | route | compass | bearing |
| a | b | abcdef | E | 90 | | a | h | ab,bc,cd,de,ef,fg,gh | N,SE,N,SE,N,SE,N | 0,135,0,135,0,135,0 |
| a | c | abcdef | E | 90 |
| a | d | abcdef | E | 90 | Scenario: Bearings on an east-west way.
| a | e | abcdef | E | 90 | Given the node map
| a | f | abcdef | E | 90 | | a | b | c | d | e | f |
| b | a | abcdef | W | 270 |
| b | c | abcdef | E | 90 | And the ways
| b | d | abcdef | E | 90 | | nodes |
| b | e | abcdef | E | 90 | | abcdef |
| b | f | abcdef | E | 90 |
| c | a | abcdef | W | 270 | When I route I should get
| c | b | abcdef | W | 270 | | from | to | route | compass | bearing |
| c | d | abcdef | E | 90 | | a | b | abcdef | E | 90 |
| c | e | abcdef | E | 90 | | a | c | abcdef | E | 90 |
| c | f | abcdef | E | 90 | | a | d | abcdef | E | 90 |
| d | a | abcdef | W | 270 | | a | e | abcdef | E | 90 |
| d | b | abcdef | W | 270 | | a | f | abcdef | E | 90 |
| d | c | abcdef | W | 270 | | b | a | abcdef | W | 270 |
| d | e | abcdef | E | 90 | | b | c | abcdef | E | 90 |
| d | f | abcdef | E | 90 | | b | d | abcdef | E | 90 |
| e | a | abcdef | W | 270 | | b | e | abcdef | E | 90 |
| e | b | abcdef | W | 270 | | b | f | abcdef | E | 90 |
| e | c | abcdef | W | 270 | | c | a | abcdef | W | 270 |
| e | d | abcdef | W | 270 | | c | b | abcdef | W | 270 |
| e | f | abcdef | E | 90 | | c | d | abcdef | E | 90 |
| f | a | abcdef | W | 270 | | c | e | abcdef | E | 90 |
| f | b | abcdef | W | 270 | | c | f | abcdef | E | 90 |
| f | c | abcdef | W | 270 | | d | a | abcdef | W | 270 |
| f | d | abcdef | W | 270 | | d | b | abcdef | W | 270 |
| f | e | abcdef | W | 270 | | d | c | abcdef | W | 270 |
| d | e | abcdef | E | 90 |
| d | f | abcdef | E | 90 |
| e | a | abcdef | W | 270 |
| e | b | abcdef | W | 270 |
| e | c | abcdef | W | 270 |
| e | d | abcdef | W | 270 |
| e | f | abcdef | E | 90 |
| f | a | abcdef | W | 270 |
| f | b | abcdef | W | 270 |
| f | c | abcdef | W | 270 |
| f | d | abcdef | W | 270 |
| f | e | abcdef | W | 270 |

View File

@ -1,93 +1,93 @@
@routing @bearing_param @todo @routing @bearing_param @todo
Feature: Bearing parameter Feature: Bearing parameter
Background:
Given the profile "testbot"
And a grid size of 10 meters
Scenario: Testbot - Intial bearing in simple case
Given the node map
| a | |
| 0 | c |
| b | |
And the ways
| nodes |
| ac |
| bc |
When I route I should get Background:
| from | to | param:bearing | route | bearing | Given the profile "testbot"
| 0 | c | 0 | bc | 45 | And a grid size of 10 meters
| 0 | c | 45 | bc | 45 |
| 0 | c | 85 | bc | 45 | Scenario: Testbot - Intial bearing in simple case
| 0 | c | 95 | ac | 135 | Given the node map
| 0 | c | 135 | ac | 135 | | a | |
| 0 | c | 180 | ac | 135 | | 0 | c |
| b | |
Scenario: Testbot - Initial bearing on split way
Given the node map And the ways
| nodes |
| ac |
| bc |
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | c | 0 | bc | 45 |
| 0 | c | 45 | bc | 45 |
| 0 | c | 85 | bc | 45 |
| 0 | c | 95 | ac | 135 |
| 0 | c | 135 | ac | 135 |
| 0 | c | 180 | ac | 135 |
Scenario: Testbot - Initial bearing on split way
Given the node map
| d | | | | | 1 | | | | | c | | d | | | | | 1 | | | | | c |
| a | | | | | 0 | | | | | b | | a | | | | | 0 | | | | | b |
And the ways And the ways
| nodes | oneway | | nodes | oneway |
| ab | yes | | ab | yes |
| bc | yes | | bc | yes |
| cd | yes | | cd | yes |
| da | yes | | da | yes |
When I route I should get When I route I should get
| from | to | param:bearing | route | bearing | | from | to | param:bearing | route | bearing |
| 0 | b | 10 | ab | 90 | | 0 | b | 10 | ab | 90 |
| 0 | b | 90 | ab | 90 | | 0 | b | 90 | ab | 90 |
| 0 | b | 170 | ab | 90 | | 0 | b | 170 | ab | 90 |
| 0 | b | 190 | cd,da,ab | 270 | | 0 | b | 190 | cd,da,ab | 270 |
| 0 | b | 270 | cd,da,ab | 270 | | 0 | b | 270 | cd,da,ab | 270 |
| 0 | b | 350 | cd,da,ab | 270 | | 0 | b | 350 | cd,da,ab | 270 |
| 1 | d | 10 | cd | 90 | | 1 | d | 10 | cd | 90 |
| 1 | d | 90 | cd | 90 | | 1 | d | 90 | cd | 90 |
| 1 | d | 170 | cd | 90 | | 1 | d | 170 | cd | 90 |
| 1 | d | 190 | ab,bc,cd | 270 | | 1 | d | 190 | ab,bc,cd | 270 |
| 1 | d | 270 | ab,bc,cd | 270 | | 1 | d | 270 | ab,bc,cd | 270 |
| 1 | d | 350 | ab,bc,cd | 270 | | 1 | d | 350 | ab,bc,cd | 270 |
Scenario: Testbot - Initial bearing in all direction Scenario: Testbot - Initial bearing in all direction
Given the node map Given the node map
| h | | | a | | | b | | h | | | a | | | b |
| | | | | | | | | | | | | | | |
| | | p | i | j | | | | | | p | i | j | | |
| g | | o | 0 | k | | c | | g | | o | 0 | k | | c |
| | | n | m | l | | | | | | n | m | l | | |
| | | | | | | | | | | | | | | |
| f | | | e | | | d | | f | | | e | | | d |
And the ways
| nodes | oneway |
| ia | yes |
| jb | yes |
| kc | yes |
| ld | yes |
| me | yes |
| nf | yes |
| og | yes |
| ph | yes |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
When I route I should get And the ways
| from | to | param:bearing | route | bearing | | nodes | oneway |
| 0 | a | 0 | ia | 0 | | ia | yes |
| 0 | a | 45 | jb,bc,cd,de,ef,fg,gh,ha | 45 | | jb | yes |
| 0 | a | 90 | kc,cd,de,ef,fg,gh,ha | 90 | | kc | yes |
| 0 | a | 135 | ld,de,ef,fg,gh,ha | 135 | | ld | yes |
| 0 | a | 180 | me,de,ef,fg,gh,ha | 180 | | me | yes |
| 0 | a | 225 | nf,ef,fg,gh,ha | 225 | | nf | yes |
| 0 | a | 270 | og,gh,ha | 270 | | og | yes |
| 0 | a | 315 | pn,ha | 315 | | ph | yes |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | a | 0 | ia | 0 |
| 0 | a | 45 | jb,bc,cd,de,ef,fg,gh,ha | 45 |
| 0 | a | 90 | kc,cd,de,ef,fg,gh,ha | 90 |
| 0 | a | 135 | ld,de,ef,fg,gh,ha | 135 |
| 0 | a | 180 | me,de,ef,fg,gh,ha | 180 |
| 0 | a | 225 | nf,ef,fg,gh,ha | 225 |
| 0 | a | 270 | og,gh,ha | 270 |
| 0 | a | 315 | pn,ha | 315 |

View File

@ -1,23 +1,23 @@
@routing @testbot @bug @todo @routing @testbot @bug @todo
Feature: Testbot - Things that looks like bugs Feature: Testbot - Things that looks like bugs
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Testbot - Triangle problem Scenario: Testbot - Triangle problem
Given the node map Given the node map
| | | | d | | | | | d |
| a | b | c | | | a | b | c | |
| | | | e | | | | | e |
And the ways And the ways
| nodes | highway | oneway | | nodes | highway | oneway |
| abc | primary | | | abc | primary | |
| cd | primary | yes | | cd | primary | yes |
| ce | river | | | ce | river | |
| de | primary | | | de | primary | |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| d | c | de,ce | | d | c | de,ce |
| e | d | de | | e | d | de |

View File

@ -1,228 +1,228 @@
@routing @distance @routing @distance
Feature: Distance calculation Feature: Distance calculation
Background:
Given the profile "testbot"
Scenario: 100m distance
Given a grid size of 100 meters
Given the node map
| a | b |
And the ways Background:
| nodes | Given the profile "testbot"
| ab |
When I route I should get Scenario: 100m distance
| from | to | route | distance | Given a grid size of 100 meters
| a | b | ab | 100m +- 2 | Given the node map
| a | b |
Scenario: Distance should equal sum of segments, leftwinded And the ways
Given the node map | nodes |
| e | | | ab |
| d | c |
| a | b |
And the ways When I route I should get
| nodes | | from | to | route | distance |
| abcde | | a | b | ab | 100m +- 2 |
When I route I should get Scenario: Distance should equal sum of segments, leftwinded
| from | to | route | distance | Given the node map
| a | d | abcde | 300m +-2 | | e | |
| d | c |
| a | b |
Scenario: Distance should equal sum of segments, rightwinded And the ways
Given the node map | nodes |
| | e | | abcde |
| c | d |
| b | a |
And the ways When I route I should get
| nodes | | from | to | route | distance |
| abcde | | a | d | abcde | 300m +-2 |
When I route I should get Scenario: Distance should equal sum of segments, rightwinded
| from | to | route | distance | Given the node map
| a | d | abcde | 300m +-2 | | | e |
| c | d |
| b | a |
Scenario: 10m distances And the ways
Given a grid size of 10 meters | nodes |
Given the node map | abcde |
| a | b |
| | c |
And the ways When I route I should get
| nodes | | from | to | route | distance |
| abc | | a | d | abcde | 300m +-2 |
When I route I should get Scenario: 10m distances
| from | to | route | distance | Given a grid size of 10 meters
| a | b | abc | 10m +-2 | Given the node map
| b | a | abc | 10m +-2 | | a | b |
| b | c | abc | 10m +-2 | | | c |
| c | b | abc | 10m +-2 |
| a | c | abc | 20m +-4 |
| c | a | abc | 20m +-4 |
Scenario: 100m distances And the ways
Given a grid size of 100 meters | nodes |
Given the node map | abc |
| a | b |
| | c |
And the ways When I route I should get
| nodes | | from | to | route | distance |
| abc | | a | b | abc | 10m +-2 |
| b | a | abc | 10m +-2 |
| b | c | abc | 10m +-2 |
| c | b | abc | 10m +-2 |
| a | c | abc | 20m +-4 |
| c | a | abc | 20m +-4 |
When I route I should get Scenario: 100m distances
| from | to | route | distance | Given a grid size of 100 meters
| a | b | abc | 100m +-2 | Given the node map
| b | a | abc | 100m +-2 | | a | b |
| b | c | abc | 100m +-2 | | | c |
| c | b | abc | 100m +-2 |
| a | c | abc | 200m +-4 |
| c | a | abc | 200m +-4 |
Scenario: 1km distance And the ways
Given a grid size of 1000 meters | nodes |
Given the node map | abc |
| a | b |
| | c |
And the ways When I route I should get
| nodes | | from | to | route | distance |
| abc | | a | b | abc | 100m +-2 |
| b | a | abc | 100m +-2 |
| b | c | abc | 100m +-2 |
| c | b | abc | 100m +-2 |
| a | c | abc | 200m +-4 |
| c | a | abc | 200m +-4 |
When I route I should get Scenario: 1km distance
| from | to | route | distance | Given a grid size of 1000 meters
| a | b | abc | 1000m +-2 | Given the node map
| b | a | abc | 1000m +-2 | | a | b |
| b | c | abc | 1000m +-2 | | | c |
| c | b | abc | 1000m +-2 |
| a | c | abc | 2000m +-4 |
| c | a | abc | 2000m +-4 |
Scenario: Distance of a winding south-north path And the ways
Given a grid size of 10 meters | nodes |
Given the node map | abc |
| a | b |
| d | c |
| e | f |
| h | g |
And the ways When I route I should get
| nodes | | from | to | route | distance |
| abcdefgh | | a | b | abc | 1000m +-2 |
| b | a | abc | 1000m +-2 |
| b | c | abc | 1000m +-2 |
| c | b | abc | 1000m +-2 |
| a | c | abc | 2000m +-4 |
| c | a | abc | 2000m +-4 |
When I route I should get Scenario: Distance of a winding south-north path
| from | to | route | distance | Given a grid size of 10 meters
| a | b | abcdefgh | 10m +-2 | Given the node map
| a | c | abcdefgh | 20m +-4 | | a | b |
| a | d | abcdefgh | 30m +-6 | | d | c |
| a | e | abcdefgh | 40m +-8 | | e | f |
| a | f | abcdefgh | 50m +-10 | | h | g |
| a | g | abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 |
Scenario: Distance of a winding east-west path
Given a grid size of 10 meters
Given the node map
| a | d | e | h |
| b | c | f | g |
And the ways And the ways
| nodes | | nodes |
| abcdefgh | | abcdefgh |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | abcdefgh | 10m +-2 | | a | b | abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 | | a | c | abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 | | a | d | abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 | | a | e | abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 | | a | f | abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 | | a | g | abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 | | a | h | abcdefgh | 70m +-14 |
Scenario: Geometric distances Scenario: Distance of a winding east-west path
Given a grid size of 1000 meters Given a grid size of 10 meters
Given the node map Given the node map
| v | w | y | a | b | c | d | | a | d | e | h |
| u | | | | | | e | | b | c | f | g |
| t | | | | | | f |
| s | | | x | | | g |
| r | | | | | | h |
| q | | | | | | i |
| p | o | n | m | l | k | j |
And the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
| xi |
| xj |
| xk |
| xl |
| xm |
| xn |
| xo |
| xp |
| xq |
| xr |
| xs |
| xt |
| xu |
| xv |
| xw |
| xy |
When I route I should get And the ways
| from | to | route | distance | | nodes |
| x | a | xa | 3000m +-2 | | abcdefgh |
| x | b | xb | 3162m +-2 |
| x | c | xc | 3606m +-2 |
| x | d | xd | 4243m +-2 |
| x | e | xe | 3606m +-2 |
| x | f | xf | 3162m +-2 |
| x | g | xg | 3000m +-2 |
| x | h | xh | 3162m +-2 |
| x | i | xi | 3606m +-2 |
| x | j | xj | 4243m +-2 |
| x | k | xk | 3606m +-2 |
| x | l | xl | 3162m +-2 |
| x | m | xm | 3000m +-2 |
| x | n | xn | 3162m +-2 |
| x | o | xo | 3606m +-2 |
| x | p | xp | 4243m +-2 |
| x | q | xq | 3606m +-2 |
| x | r | xr | 3162m +-2 |
| x | s | xs | 3000m +-2 |
| x | t | xt | 3162m +-2 |
| x | u | xu | 3606m +-2 |
| x | v | xv | 4243m +-2 |
| x | w | xw | 3606m +-2 |
| x | y | xy | 3162m +-2 |
@maze When I route I should get
Scenario: Distance of a maze of short segments | from | to | route | distance |
Given a grid size of 7 meters | a | b | abcdefgh | 10m +-2 |
Given the node map | a | c | abcdefgh | 20m +-4 |
| a | b | s | t | | a | d | abcdefgh | 30m +-6 |
| d | c | r | q | | a | e | abcdefgh | 40m +-8 |
| e | f | o | p | | a | f | abcdefgh | 50m +-10 |
| h | g | n | m | | a | g | abcdefgh | 60m +-12 |
| i | j | k | l | | a | h | abcdefgh | 70m +-14 |
And the ways Scenario: Geometric distances
| nodes | Given a grid size of 1000 meters
| abcdefghijklmnopqrst | Given the node map
| v | w | y | a | b | c | d |
| u | | | | | | e |
| t | | | | | | f |
| s | | | x | | | g |
| r | | | | | | h |
| q | | | | | | i |
| p | o | n | m | l | k | j |
When I route I should get And the ways
| from | to | route | distance | | nodes |
| a | t | abcdefghijklmnopqrst | 133m +-2 | | xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
| xi |
| xj |
| xk |
| xl |
| xm |
| xn |
| xo |
| xp |
| xq |
| xr |
| xs |
| xt |
| xu |
| xv |
| xw |
| xy |
When I route I should get
| from | to | route | distance |
| x | a | xa | 3000m +-2 |
| x | b | xb | 3162m +-2 |
| x | c | xc | 3606m +-2 |
| x | d | xd | 4243m +-2 |
| x | e | xe | 3606m +-2 |
| x | f | xf | 3162m +-2 |
| x | g | xg | 3000m +-2 |
| x | h | xh | 3162m +-2 |
| x | i | xi | 3606m +-2 |
| x | j | xj | 4243m +-2 |
| x | k | xk | 3606m +-2 |
| x | l | xl | 3162m +-2 |
| x | m | xm | 3000m +-2 |
| x | n | xn | 3162m +-2 |
| x | o | xo | 3606m +-2 |
| x | p | xp | 4243m +-2 |
| x | q | xq | 3606m +-2 |
| x | r | xr | 3162m +-2 |
| x | s | xs | 3000m +-2 |
| x | t | xt | 3162m +-2 |
| x | u | xu | 3606m +-2 |
| x | v | xv | 4243m +-2 |
| x | w | xw | 3606m +-2 |
| x | y | xy | 3162m +-2 |
@maze
Scenario: Distance of a maze of short segments
Given a grid size of 7 meters
Given the node map
| a | b | s | t |
| d | c | r | q |
| e | f | o | p |
| h | g | n | m |
| i | j | k | l |
And the ways
| nodes |
| abcdefghijklmnopqrst |
When I route I should get
| from | to | route | distance |
| a | t | abcdefghijklmnopqrst | 133m +-2 |

View File

@ -1,42 +1,42 @@
@routing @testbot @routes @duration @routing @testbot @routes @duration
Feature: Durations Feature: Durations
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Duration of ways Scenario: Duration of ways
Given the node map Given the node map
| a | b | | | | f | | a | b | | | | f |
| | | | e | | | | | | | e | | |
| | c | | | d | | | | c | | | d | |
And the ways And the ways
| nodes | highway | duration | | nodes | highway | duration |
| ab | primary | 0:01 | | ab | primary | 0:01 |
| bc | primary | 0:10 | | bc | primary | 0:10 |
| cd | primary | 1:00 | | cd | primary | 1:00 |
| de | primary | 10:00 | | de | primary | 10:00 |
| ef | primary | 01:02:03 | | ef | primary | 01:02:03 |
When I route I should get When I route I should get
| from | to | route | distance | time | | from | to | route | distance | time |
| a | b | ab | 100m +-1 | 60s +-1 | | a | b | ab | 100m +-1 | 60s +-1 |
| b | c | bc | 200m +-1 | 600s +-1 | | b | c | bc | 200m +-1 | 600s +-1 |
| c | d | cd | 300m +-1 | 3600s +-1 | | c | d | cd | 300m +-1 | 3600s +-1 |
| d | e | de | 141m +-2 | 36000s +-1 | | d | e | de | 141m +-2 | 36000s +-1 |
| e | f | ef | 224m +-2 | 3723s +-1 | | e | f | ef | 224m +-2 | 3723s +-1 |
@todo @todo
Scenario: Partial duration of ways Scenario: Partial duration of ways
Given the node map Given the node map
| a | b | | c | | a | b | | c |
And the ways And the ways
| nodes | highway | duration | | nodes | highway | duration |
| abc | primary | 0:01 | | abc | primary | 0:01 |
When I route I should get When I route I should get
| from | to | route | distance | time | | from | to | route | distance | time |
| a | c | abc | 300m +-1 | 60s +-1 | | a | c | abc | 300m +-1 | 60s +-1 |
| a | b | ab | 100m +-1 | 20s +-1 | | a | b | ab | 100m +-1 | 20s +-1 |
| b | c | bc | 200m +-1 | 40s +-1 | | b | c | bc | 200m +-1 | 40s +-1 |

View File

@ -4,35 +4,35 @@ Feature: Testbot - Walkthrough
# A complete walk-through of how this data is processed can be found at: # A complete walk-through of how this data is processed can be found at:
# https://github.com/DennisOSRM/Project-OSRM/wiki/Processing-Flow # https://github.com/DennisOSRM/Project-OSRM/wiki/Processing-Flow
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Testbot - Processing Flow Scenario: Testbot - Processing Flow
Given the node map Given the node map
| | | | d | | | | | d |
| a | b | c | | | a | b | c | |
| | | | e | | | | | e |
And the ways And the ways
| nodes | highway | oneway | | nodes | highway | oneway |
| abc | primary | | | abc | primary | |
| cd | primary | yes | | cd | primary | yes |
| ce | river | | | ce | river | |
| de | primary | | | de | primary | |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abc | | a | b | abc |
| a | c | abc | | a | c | abc |
| a | d | abc,cd | | a | d | abc,cd |
| a | e | abc,ce | | a | e | abc,ce |
| b | a | abc | | b | a | abc |
| b | c | abc | | b | c | abc |
| b | d | abc,cd | | b | d | abc,cd |
| b | e | abc,ce | | b | e | abc,ce |
| d | a | de,ce,abc | | d | a | de,ce,abc |
| d | b | de,ce,abc | | d | b | de,ce,abc |
| d | e | de | | d | e | de |
| e | a | ce,abc | | e | a | ce,abc |
| e | b | ce,abc | | e | b | ce,abc |
| e | c | ce | | e | c | ce |

View File

@ -1,38 +1,38 @@
@routing @fastest @routing @fastest
Feature: Choosing fastest route Feature: Choosing fastest route
Background:
Given the profile "testbot"
Scenario: Pick the geometrically shortest route, way types being equal
Given the node map
| | | s | | |
| | | t | | |
| x | a | | b | y |
And the ways Background:
| nodes | highway | Given the profile "testbot"
| xa | primary |
| by | primary |
| atb | primary |
| asb | primary |
When I route I should get Scenario: Pick the geometrically shortest route, way types being equal
| from | to | route | Given the node map
| x | y | xa,atb,by | | | | s | | |
| y | x | by,atb,xa | | | | t | | |
| x | a | | b | y |
Scenario: Pick the fastest route, even when it's longer And the ways
Given the node map | nodes | highway |
| | p | | | xa | primary |
| a | s | b | | by | primary |
| atb | primary |
| asb | primary |
And the ways When I route I should get
| nodes | highway | | from | to | route |
| apb | primary | | x | y | xa,atb,by |
| asb | secondary | | y | x | by,atb,xa |
When I route I should get Scenario: Pick the fastest route, even when it's longer
| from | to | route | Given the node map
| a | b | apb | | | p | |
| b | a | apb | | a | s | b |
And the ways
| nodes | highway |
| apb | primary |
| asb | secondary |
When I route I should get
| from | to | route |
| a | b | apb |
| b | a | apb |

View File

@ -1,175 +1,175 @@
@routing @testbot @ferry @routing @testbot @ferry
Feature: Testbot - Handle ferry routes Feature: Testbot - Handle ferry routes
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Testbot - Ferry duration, single node Scenario: Testbot - Ferry duration, single node
Given the node map Given the node map
| a | b | c | d | | a | b | c | d |
| e | f | g | h | | e | f | g | h |
| i | j | k | l | | i | j | k | l |
| m | n | o | p | | m | n | o | p |
| q | r | s | t | | q | r | s | t |
And the ways And the ways
| nodes | highway | route | duration | | nodes | highway | route | duration |
| ab | primary | | | | ab | primary | | |
| cd | primary | | | | cd | primary | | |
| ef | primary | | | | ef | primary | | |
| gh | primary | | | | gh | primary | | |
| ij | primary | | | | ij | primary | | |
| kl | primary | | | | kl | primary | | |
| mn | primary | | | | mn | primary | | |
| op | primary | | | | op | primary | | |
| qr | primary | | | | qr | primary | | |
| st | primary | | | | st | primary | | |
| bc | | ferry | 0:01 | | bc | | ferry | 0:01 |
| fg | | ferry | 0:10 | | fg | | ferry | 0:10 |
| jk | | ferry | 1:00 | | jk | | ferry | 1:00 |
| no | | ferry | 24:00 | | no | | ferry | 24:00 |
| rs | | ferry | 96:00 | | rs | | ferry | 96:00 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| b | c | bc | 60s +-1 | | b | c | bc | 60s +-1 |
| f | g | fg | 600s +-1 | | f | g | fg | 600s +-1 |
| j | k | jk | 3600s +-1 | | j | k | jk | 3600s +-1 |
| n | o | no | 86400s +-1 | | n | o | no | 86400s +-1 |
| r | s | rs | 345600s +-1 | | r | s | rs | 345600s +-1 |
@todo @todo
Scenario: Testbot - Week long ferry routes Scenario: Testbot - Week long ferry routes
Given the node map Given the node map
| a | b | c | d | | a | b | c | d |
| e | f | g | h | | e | f | g | h |
| i | j | k | l | | i | j | k | l |
And the ways And the ways
| nodes | highway | route | duration | | nodes | highway | route | duration |
| ab | primary | | | | ab | primary | | |
| cd | primary | | | | cd | primary | | |
| ef | primary | | | | ef | primary | | |
| gh | primary | | | | gh | primary | | |
| ij | primary | | | | ij | primary | | |
| kl | primary | | | | kl | primary | | |
| bc | | ferry | 24:00 | | bc | | ferry | 24:00 |
| fg | | ferry | 168:00 | | fg | | ferry | 168:00 |
| jk | | ferry | 720:00 | | jk | | ferry | 720:00 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| b | c | bc | 86400s +-1 | | b | c | bc | 86400s +-1 |
| f | g | fg | 604800s +-1 | | f | g | fg | 604800s +-1 |
| j | k | jk | 259200s +-1 | | j | k | jk | 259200s +-1 |
Scenario: Testbot - Ferry duration, multiple nodes Scenario: Testbot - Ferry duration, multiple nodes
Given the node map Given the node map
| x | | | | | y | | x | | | | | y |
| | a | b | c | d | | | | a | b | c | d | |
And the ways And the ways
| nodes | highway | route | duration | | nodes | highway | route | duration |
| xa | primary | | | | xa | primary | | |
| yd | primary | | | | yd | primary | | |
| ad | | ferry | 1:00 | | ad | | ferry | 1:00 |
When I route I should get
| from | to | route | time |
| a | d | ad | 3600s +-1 |
| d | a | ad | 3600s +-1 |
When I route I should get
| from | to | route | time |
| a | d | ad | 3600s +-1 |
| d | a | ad | 3600s +-1 |
@todo @todo
Scenario: Testbot - Ferry duration, individual parts, fast Scenario: Testbot - Ferry duration, individual parts, fast
Given a grid size of 10000 meters Given a grid size of 10000 meters
Given the node map Given the node map
| x | y | | z | | | v | | x | y | | z | | | v |
| a | b | | c | | | d | | a | b | | c | | | d |
And the ways And the ways
| nodes | highway | route | duration | | nodes | highway | route | duration |
| xa | primary | | | | xa | primary | | |
| yb | primary | | | | yb | primary | | |
| zc | primary | | | | zc | primary | | |
| vd | primary | | | | vd | primary | | |
| abcd | | ferry | 0:06 | | abcd | | ferry | 0:06 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 360s +-1 |
| a | b | abcd | 60s +-1 |
| b | c | abcd | 120s +-1 |
| c | d | abcd | 180s +-1 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 360s +-1 |
| a | b | abcd | 60s +-1 |
| b | c | abcd | 120s +-1 |
| c | d | abcd | 180s +-1 |
@todo @todo
Scenario: Testbot - Ferry duration, individual parts, slow Scenario: Testbot - Ferry duration, individual parts, slow
Given the node map Given the node map
| x | y | | z | | | v | | x | y | | z | | | v |
| a | b | | c | | | d | | a | b | | c | | | d |
And the ways And the ways
| nodes | highway | route | duration | | nodes | highway | route | duration |
| xa | primary | | | | xa | primary | | |
| yb | primary | | | | yb | primary | | |
| zc | primary | | | | zc | primary | | |
| vd | primary | | | | vd | primary | | |
| abcd | | ferry | 1:00 | | abcd | | ferry | 1:00 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | d | abcd | 3600s ~1% | | a | d | abcd | 3600s ~1% |
| a | b | abcd | 600s ~1% | | a | b | abcd | 600s ~1% |
| b | c | abcd | 1200s ~1% | | b | c | abcd | 1200s ~1% |
| c | d | abcd | 1800s ~1% | | c | d | abcd | 1800s ~1% |
Scenario: Testbot - Ferry duration, connected routes
Given the node map
| x | | | | d | | | | y |
| | a | b | c | | e | f | g | t |
And the ways Scenario: Testbot - Ferry duration, connected routes
| nodes | highway | route | duration | Given the node map
| xa | primary | | | | x | | | | d | | | | y |
| yg | primary | | | | | a | b | c | | e | f | g | t |
| abcd | | ferry | 0:30 |
| defg | | ferry | 0:30 |
When I route I should get And the ways
| from | to | route | time | | nodes | highway | route | duration |
| a | g | abcd,defg | 3600s +-1 | | xa | primary | | |
| g | a | defg,abcd | 3600s +-1 | | yg | primary | | |
| abcd | | ferry | 0:30 |
| defg | | ferry | 0:30 |
Scenario: Testbot - Prefer road when faster than ferry When I route I should get
Given the node map | from | to | route | time |
| x | a | b | c | | | a | g | abcd,defg | 3600s +-1 |
| | | | | d | | g | a | defg,abcd | 3600s +-1 |
| y | g | f | e | |
And the ways Scenario: Testbot - Prefer road when faster than ferry
| nodes | highway | route | duration | Given the node map
| xa | primary | | | | x | a | b | c | |
| yg | primary | | | | | | | | d |
| xy | primary | | | | y | g | f | e | |
| abcd | | ferry | 0:01 |
| defg | | ferry | 0:01 |
When I route I should get And the ways
| from | to | route | time | | nodes | highway | route | duration |
| a | g | xa,xy,yg | 60s +-25% | | xa | primary | | |
| g | a | yg,xy,xa | 60s +-25% | | yg | primary | | |
| xy | primary | | |
| abcd | | ferry | 0:01 |
| defg | | ferry | 0:01 |
Scenario: Testbot - Long winding ferry route When I route I should get
Given the node map | from | to | route | time |
| x | | b | | d | | f | | y | | a | g | xa,xy,yg | 60s +-25% |
| | a | | c | | e | | g | | | g | a | yg,xy,xa | 60s +-25% |
And the ways Scenario: Testbot - Long winding ferry route
| nodes | highway | route | duration | Given the node map
| xa | primary | | | | x | | b | | d | | f | | y |
| yg | primary | | | | | a | | c | | e | | g | |
| abcdefg | | ferry | 6:30 |
When I route I should get And the ways
| from | to | route | time | | nodes | highway | route | duration |
| a | g | abcdefg | 23400s +-1 | | xa | primary | | |
| g | a | abcdefg | 23400s +-1 | | yg | primary | | |
| abcdefg | | ferry | 6:30 |
When I route I should get
| from | to | route | time |
| a | g | abcdefg | 23400s +-1 |
| g | a | abcdefg | 23400s +-1 |

View File

@ -2,21 +2,21 @@
Feature: Basic Routing Feature: Basic Routing
Test the input data descibed on https://github.com/DennisOSRM/Project-OSRM/wiki/Graph-representation Test the input data descibed on https://github.com/DennisOSRM/Project-OSRM/wiki/Graph-representation
Background: Background:
Given the profile "testbot" Given the profile "testbot"
@smallest @smallest
Scenario: Graph transformation Scenario: Graph transformation
Given the node map Given the node map
| | | d | | | | d |
| a | b | c | | a | b | c |
| | | e | | | | e |
And the ways And the ways
| nodes | | nodes |
| abc | | abc |
| dce | | dce |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | e | abc,dce | | a | e | abc,dce |

View File

@ -5,92 +5,92 @@ Instead the speed can optionally be factored into the weiht in the lua profile.
Note: With the default grid size of 100m, the diagonals has a length if 141.42m Note: With the default grid size of 100m, the diagonals has a length if 141.42m
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Use impedance to pick route, even when longer/slower
Given the node map
| | s | | t | | u | | v | |
| a | | b | | c | | d | | e |
And the ways Scenario: Use impedance to pick route, even when longer/slower
| nodes | impedance | Given the node map
| ab | 1.3 | | | s | | t | | u | | v | |
| asb | 1 | | a | | b | | c | | d | | e |
| bc | 1.5 |
| btc | 1 |
| cd | 0.015 |
| cud | 0.010 |
| de | 150000 |
| dve | 100000 |
When I route I should get And the ways
| from | to | route | distance | | nodes | impedance |
| a | b | ab | 200m +-1 | | ab | 1.3 |
| b | a | ab | 200m +-1 | | asb | 1 |
| b | c | btc | 282m +-1 | | bc | 1.5 |
| c | b | btc | 282m +-1 | | btc | 1 |
| c | d | cud | 282m +-1 | | cd | 0.015 |
| d | c | cud | 282m +-1 | | cud | 0.010 |
| d | e | dve | 282m +-1 | | de | 150000 |
| e | d | dve | 282m +-1 | | dve | 100000 |
Scenario: Weight should default to 1 When I route I should get
Given the node map | from | to | route | distance |
| | s | | t | | | a | b | ab | 200m +-1 |
| a | | b | | c | | b | a | ab | 200m +-1 |
| b | c | btc | 282m +-1 |
| c | b | btc | 282m +-1 |
| c | d | cud | 282m +-1 |
| d | c | cud | 282m +-1 |
| d | e | dve | 282m +-1 |
| e | d | dve | 282m +-1 |
And the ways Scenario: Weight should default to 1
| nodes | impedance | Given the node map
| ab | 1.40 | | | s | | t | |
| asb | | | a | | b | | c |
| bc | 1.42 |
| btc | |
When I route I should get And the ways
| from | to | route | | nodes | impedance |
| a | b | ab | | ab | 1.40 |
| b | a | ab | | asb | |
| b | c | btc | | bc | 1.42 |
| c | b | btc | | btc | |
Scenario: Use both impedance and speed (multiplied) when picking route When I route I should get
OSRM should not factor speed into impedance internally. However, the profile can choose to do so, | from | to | route |
and this test expect the testbot profile to do it. | a | b | ab |
Given the node map | b | a | ab |
| | s | | t | | | b | c | btc |
| a | | b | | c | | c | b | btc |
And the ways Scenario: Use both impedance and speed (multiplied) when picking route
| nodes | impedance | highway | OSRM should not factor speed into impedance internally. However, the profile can choose to do so,
| ab | 2.80 | primary | and this test expect the testbot profile to do it.
| asb | 1 | secondary | Given the node map
| bc | 2.84 | primary | | | s | | t | |
| btc | 1 | secondary | | a | | b | | c |
When I route I should get And the ways
| from | to | route | | nodes | impedance | highway |
| a | b | ab | | ab | 2.80 | primary |
| b | a | ab | | asb | 1 | secondary |
| b | c | btc | | bc | 2.84 | primary |
| c | b | btc | | btc | 1 | secondary |
Scenario: Weight should influence neither speed nor travel time. When I route I should get
Given the node map | from | to | route |
| a | b | c | | a | b | ab |
| t | | | | b | a | ab |
| b | c | btc |
| c | b | btc |
And the ways Scenario: Weight should influence neither speed nor travel time.
| nodes | Given the node map
| ab | | a | b | c |
| bc | | t | | |
| at |
When I route I should get And the ways
| from | to | route | distance | time | | nodes |
| a | b | ab | 100m +-1 | 10s +-1 | | ab |
| b | a | ab | 100m +-1 | 10s +-1 | | bc |
| b | c | bc | 100m +-1 | 10s +-1 | | at |
| c | b | bc | 100m +-1 | 10s +-1 |
| a | c | ab,bc | 200m +-1 | 20s +-1 | When I route I should get
| c | a | bc,ab | 200m +-1 | 20s +-1 | | from | to | route | distance | time |
| a | b | ab | 100m +-1 | 10s +-1 |
| b | a | ab | 100m +-1 | 10s +-1 |
| b | c | bc | 100m +-1 | 10s +-1 |
| c | b | bc | 100m +-1 | 10s +-1 |
| a | c | ab,bc | 200m +-1 | 20s +-1 |
| c | a | bc,ab | 200m +-1 | 20s +-1 |

View File

@ -1,52 +1,52 @@
@routing @maxspeed @testbot @routing @maxspeed @testbot
Feature: Car - Max speed restrictions Feature: Car - Max speed restrictions
Background: Use specific speeds Background: Use specific speeds
Given the profile "testbot" Given the profile "testbot"
Scenario: Testbot - Respect maxspeeds when lower that way type speed
Given the node map
| a | b | c | d |
And the ways Scenario: Testbot - Respect maxspeeds when lower that way type speed
| nodes | maxspeed | Given the node map
| ab | | | a | b | c | d |
| bc | 24 |
| cd | 18 |
When I route I should get And the ways
| from | to | route | time | | nodes | maxspeed |
| a | b | ab | 10s +-1 | | ab | |
| b | a | ab | 10s +-1 | | bc | 24 |
| b | c | bc | 15s +-1 | | cd | 18 |
| c | b | bc | 15s +-1 |
| c | d | cd | 20s +-1 |
| d | c | cd | 20s +-1 |
Scenario: Testbot - Ignore maxspeed when higher than way speed When I route I should get
Given the node map | from | to | route | time |
| a | b | c | | a | b | ab | 10s +-1 |
| b | a | ab | 10s +-1 |
| b | c | bc | 15s +-1 |
| c | b | bc | 15s +-1 |
| c | d | cd | 20s +-1 |
| d | c | cd | 20s +-1 |
And the ways Scenario: Testbot - Ignore maxspeed when higher than way speed
| nodes | maxspeed | Given the node map
| ab | | | a | b | c |
| bc | 200 |
When I route I should get And the ways
| from | to | route | time | | nodes | maxspeed |
| a | b | ab | 10s +-1 | | ab | |
| b | a | ab | 10s +-1 | | bc | 200 |
| b | c | bc | 10s +-1 |
| c | b | bc | 10s +-1 | When I route I should get
| from | to | route | time |
| a | b | ab | 10s +-1 |
| b | a | ab | 10s +-1 |
| b | c | bc | 10s +-1 |
| c | b | bc | 10s +-1 |
@opposite @opposite
Scenario: Testbot - Forward/backward maxspeed Scenario: Testbot - Forward/backward maxspeed
Then routability should be Then routability should be
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw | | maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | 20s +-1 | 20s +-1 | | | | | 20s +-1 | 20s +-1 |
| 18 | | | 40s +-1 | 40s +-1 | | 18 | | | 40s +-1 | 40s +-1 |
| | 18 | | 40s +-1 | 20s +-1 | | | 18 | | 40s +-1 | 20s +-1 |
| | | 18 | 20s +-1 | 40s +-1 | | | | 18 | 20s +-1 | 40s +-1 |
| 9 | 18 | | 40s +-1 | 80s +-1 | | 9 | 18 | | 40s +-1 | 80s +-1 |
| 9 | | 18 | 80s +-1 | 40s +-1 | | 9 | | 18 | 80s +-1 | 40s +-1 |
| 9 | 24 | 18 | 30s +-1 | 40s +-1 | | 9 | 24 | 18 | 30s +-1 | 40s +-1 |

View File

@ -1,26 +1,26 @@
@routing @testbot @mode @routing @testbot @mode
Feature: Testbot - Mode flag Feature: Testbot - Mode flag
Background: Background:
Given the profile "testbot" Given the profile "testbot"
@todo @todo
Scenario: Bike - Mode Scenario: Bike - Mode
Given the node map Given the node map
| a | b | | | a | b | |
| | c | d | | | c | d |
And the ways And the ways
| nodes | highway | route | duration | | nodes | highway | route | duration |
| ab | primary | | | | ab | primary | | |
| bc | | ferry | 0:01 | | bc | | ferry | 0:01 |
| cd | primary | | | | cd | primary | | |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | bot,ferry,bot | | a | d | ab,bc,cd | head,right,left,destination | bot,ferry,bot |
| d | a | cd,bc,ab | head,right left,destination | bot,ferry,bot | | d | a | cd,bc,ab | head,right left,destination | bot,ferry,bot |
| c | a | bc,ab | head,left,destination | ferry,bot | | c | a | bc,ab | head,left,destination | ferry,bot |
| d | b | cd,bc | head,right,destination | bot,ferry | | d | b | cd,bc | head,right,destination | bot,ferry |
| a | c | ab,bc | head,right,destination | bot,ferry | | a | c | ab,bc | head,right,destination | bot,ferry |
| b | d | bc,cd | head,left,destination | ferry,bot | | b | d | bc,cd | head,left,destination | ferry,bot |

View File

@ -1,18 +1,18 @@
@routing @testbot @opposite @routing @testbot @opposite
Feature: Separate settings for forward/backward direction Feature: Separate settings for forward/backward direction
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Testbot - Going against the flow Scenario: Testbot - Going against the flow
Given the node map Given the node map
| a | b | c | d | | a | b | c | d |
And the ways And the ways
| nodes | highway | | nodes | highway |
| abcd | river | | abcd | river |
When I route I should get When I route I should get
| from | to | route | distance | time | | from | to | route | distance | time |
| a | d | abcd | 300 +- 1m | 31s | | a | d | abcd | 300 +- 1m | 31s |
| d | a | abcd | 300 +- 1m | 68s | | d | a | abcd | 300 +- 1m | 68s |

View File

@ -1,75 +1,75 @@
@routing @origin @routing @origin
Feature: Routing close to the [0,0] origin Feature: Routing close to the [0,0] origin
Background:
Given the profile "testbot"
Scenario: East-west oneways close to the origin
Given the node locations
| node | lat | lon |
| a | 0 | 0 |
| b | 0.0008990679362704611 | 0 |
| c | 0.0017981358725409223 | 0 |
| d | 0.0026972038088113833 | 0 |
And the ways Background:
| nodes | oneway | Given the profile "testbot"
| abcd | yes |
When I route I should get Scenario: East-west oneways close to the origin
| from | to | route | distance | Given the node locations
| b | c | abcd | 100m +-1 | | node | lat | lon |
| c | b | | | | a | 0 | 0 |
| b | 0.0008990679362704611 | 0 |
| c | 0.0017981358725409223 | 0 |
| d | 0.0026972038088113833 | 0 |
Scenario: North-south oneways close to the origin And the ways
Given the node locations | nodes | oneway |
| node | lat | lon | | abcd | yes |
| a | 0 | 0 |
| b | 0 | 0.0008990679362704611 |
| c | 0 | 0.0017981358725409223 |
| d | 0 | 0.0026972038088113833 |
And the ways When I route I should get
| nodes | oneway | | from | to | route | distance |
| abcd | yes | | b | c | abcd | 100m +-1 |
| c | b | | |
When I route I should get Scenario: North-south oneways close to the origin
| from | to | route | distance | Given the node locations
| b | c | abcd | 100m +-1 | | node | lat | lon |
| c | b | | | | a | 0 | 0 |
| b | 0 | 0.0008990679362704611 |
Scenario: East-west oneways crossing the origin | c | 0 | 0.0017981358725409223 |
Given the node locations | d | 0 | 0.0026972038088113833 |
| node | lat | lon |
| a | -0.0017981358725409223 | 0 |
| b | -0.0008990679362704611 | 0 |
| c | 0 | 0 |
| d | 0.0008990679362704611 | 0 |
| e | 0.0017981358725409223 | 0 |
And the ways And the ways
| nodes | oneway | | nodes | oneway |
| abcde | yes | | abcd | yes |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| b | d | abcde | 200m +-2 | | b | c | abcd | 100m +-1 |
| d | b | | | | c | b | | |
Scenario: North-south oneways crossing the origin
Given the node locations
| node | lat | lon |
| a | 0 | -0.0017981358725409223 |
| b | 0 | -0.0008990679362704611 |
| c | 0 | 0 |
| d | 0 | 0.0008990679362704611 |
| e | 0 | 0.0017981358725409223 |
And the ways Scenario: East-west oneways crossing the origin
| nodes | oneway | Given the node locations
| abcde | yes | | node | lat | lon |
| a | -0.0017981358725409223 | 0 |
| b | -0.0008990679362704611 | 0 |
| c | 0 | 0 |
| d | 0.0008990679362704611 | 0 |
| e | 0.0017981358725409223 | 0 |
When I route I should get And the ways
| from | to | route | distance | | nodes | oneway |
| b | d | abcde | 200m +-2 | | abcde | yes |
| d | b | | |
When I route I should get
| from | to | route | distance |
| b | d | abcde | 200m +-2 |
| d | b | | |
Scenario: North-south oneways crossing the origin
Given the node locations
| node | lat | lon |
| a | 0 | -0.0017981358725409223 |
| b | 0 | -0.0008990679362704611 |
| c | 0 | 0 |
| d | 0 | 0.0008990679362704611 |
| e | 0 | 0.0017981358725409223 |
And the ways
| nodes | oneway |
| abcde | yes |
When I route I should get
| from | to | route | distance |
| b | d | abcde | 200m +-2 |
| d | b | | |

View File

@ -2,167 +2,167 @@
Feature: Penalties Feature: Penalties
Testbot uses a signal penalty of 7s. Testbot uses a signal penalty of 7s.
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Traffic signals should incur a delay, without changing distance Scenario: Traffic signals should incur a delay, without changing distance
Given the node map Given the node map
| a | b | c | | a | b | c |
| d | e | f | | d | e | f |
And the nodes And the nodes
| node | highway | | node | highway |
| e | traffic_signals | | e | traffic_signals |
And the ways And the ways
| nodes | | nodes |
| abc | | abc |
| def | | def |
When I route I should get When I route I should get
| from | to | route | time | distance | | from | to | route | time | distance |
| a | c | abc | 20s +-1 | 200m +-1 | | a | c | abc | 20s +-1 | 200m +-1 |
| d | f | def | 27s +-1 | 200m +-1 | | d | f | def | 27s +-1 | 200m +-1 |
Scenario: Signal penalty should not depend on way type Scenario: Signal penalty should not depend on way type
Given the node map Given the node map
| a | b | c | | a | b | c |
| d | e | f | | d | e | f |
| g | h | i | | g | h | i |
And the nodes And the nodes
| node | highway | | node | highway |
| b | traffic_signals | | b | traffic_signals |
| e | traffic_signals | | e | traffic_signals |
| h | traffic_signals | | h | traffic_signals |
And the ways And the ways
| nodes | highway | | nodes | highway |
| abc | primary | | abc | primary |
| def | secondary | | def | secondary |
| ghi | tertiary | | ghi | tertiary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | c | abc | 27s +-1 | | a | c | abc | 27s +-1 |
| d | f | def | 47s +-1 | | d | f | def | 47s +-1 |
| g | i | ghi | 67s +-1 | | g | i | ghi | 67s +-1 |
Scenario: Passing multiple traffic signals should incur a accumulated delay Scenario: Passing multiple traffic signals should incur a accumulated delay
Given the node map Given the node map
| a | b | c | d | e | | a | b | c | d | e |
And the nodes And the nodes
| node | highway | | node | highway |
| b | traffic_signals | | b | traffic_signals |
| c | traffic_signals | | c | traffic_signals |
| d | traffic_signals | | d | traffic_signals |
And the ways And the ways
| nodes | | nodes |
| abcde | | abcde |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | e | abcde | 61s +-1 | | a | e | abcde | 61s +-1 |
@todo @todo
Scenario: Signal penalty should not depend on way type Scenario: Signal penalty should not depend on way type
Given the node map Given the node map
| a | b | c | | a | b | c |
| d | e | f | | d | e | f |
| g | h | i | | g | h | i |
And the nodes And the nodes
| node | highway | | node | highway |
| b | traffic_signals | | b | traffic_signals |
| e | traffic_signals | | e | traffic_signals |
| h | traffic_signals | | h | traffic_signals |
And the ways And the ways
| nodes | highway | | nodes | highway |
| abc | primary | | abc | primary |
| def | secondary | | def | secondary |
| ghi | tertiary | | ghi | tertiary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | abc | 10s +-1 | | a | b | abc | 10s +-1 |
| a | c | abc | 27s +-1 | | a | c | abc | 27s +-1 |
| d | e | def | 20s +-1 | | d | e | def | 20s +-1 |
| d | f | def | 47s +-1 | | d | f | def | 47s +-1 |
| g | h | ghi | 30s +-1 | | g | h | ghi | 30s +-1 |
| g | i | ghi | 67s +-1 | | g | i | ghi | 67s +-1 |
Scenario: Passing multiple traffic signals should incur a accumulated delay Scenario: Passing multiple traffic signals should incur a accumulated delay
Given the node map Given the node map
| a | b | c | d | e | | a | b | c | d | e |
And the nodes And the nodes
| node | highway | | node | highway |
| b | traffic_signals | | b | traffic_signals |
| c | traffic_signals | | c | traffic_signals |
| d | traffic_signals | | d | traffic_signals |
And the ways And the ways
| nodes | | nodes |
| abcde | | abcde |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | e | abcde | 61s +-1 | | a | e | abcde | 61s +-1 |
@todo @todo
Scenario: Starting or ending at a traffic signal should not incur a delay Scenario: Starting or ending at a traffic signal should not incur a delay
Given the node map Given the node map
| a | b | c | | a | b | c |
And the nodes And the nodes
| node | highway | | node | highway |
| b | traffic_signals | | b | traffic_signals |
And the ways And the ways
| nodes | | nodes |
| abc | | abc |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | abc | 10s +-1 | | a | b | abc | 10s +-1 |
| b | a | abc | 10s +-1 | | b | a | abc | 10s +-1 |
Scenario: Routing between signals on the same way should not incur a delay Scenario: Routing between signals on the same way should not incur a delay
Given the node map Given the node map
| a | b | c | d | | a | b | c | d |
And the nodes And the nodes
| node | highway | | node | highway |
| a | traffic_signals | | a | traffic_signals |
| d | traffic_signals | | d | traffic_signals |
And the ways And the ways
| nodes | highway | | nodes | highway |
| abcd | primary | | abcd | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| b | c | abcd | 10s +-1 | | b | c | abcd | 10s +-1 |
| c | b | abcd | 10s +-1 | | c | b | abcd | 10s +-1 |
Scenario: Prefer faster route without traffic signals Scenario: Prefer faster route without traffic signals
Given a grid size of 50 meters Given a grid size of 50 meters
And the node map And the node map
| a | | b | | c | | a | | b | | c |
| | | d | | | | | | d | | |
And the nodes And the nodes
| node | highway | | node | highway |
| b | traffic_signals | | b | traffic_signals |
And the ways And the ways
| nodes | highway | | nodes | highway |
| abc | primary | | abc | primary |
| adc | primary | | adc | primary |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | adc | | a | c | adc |

View File

@ -1,86 +1,86 @@
@routing @planetary @routing @planetary
Feature: Distance calculation Feature: Distance calculation
Scenario: Approximated Longitudinal distances at equator
Given the node locations
| node | lat | lon |
| a | 0 | 80 |
| b | 0 | 0 |
And the ways Scenario: Approximated Longitudinal distances at equator
| nodes | Given the node locations
| ab | | node | lat | lon |
| a | 0 | 80 |
| b | 0 | 0 |
When I route I should get And the ways
| from | to | route | distance | | nodes |
| a | b | ab | 8905559m ~0.1% | | ab |
Scenario: Approximated Longitudinal distances at latitude 45 When I route I should get
Given the node locations | from | to | route | distance |
| node | lat | lon | | a | b | ab | 8905559m ~0.1% |
| c | 45 | 80 |
| d | 45 | 0 |
And the ways Scenario: Approximated Longitudinal distances at latitude 45
| nodes | Given the node locations
| cd | | node | lat | lon |
| c | 45 | 80 |
| d | 45 | 0 |
When I route I should get And the ways
| from | to | route | distance | | nodes |
| c | d | cd | 6028844m ~4.5% | | cd |
Scenario: Approximated Longitudinal distances at latitude 80 When I route I should get
Given the node locations | from | to | route | distance |
| node | lat | lon | | c | d | cd | 6028844m ~4.5% |
| c | 80 | 80 |
| d | 80 | 0 |
And the ways Scenario: Approximated Longitudinal distances at latitude 80
| nodes | Given the node locations
| cd | | node | lat | lon |
| c | 80 | 80 |
| d | 80 | 0 |
When I route I should get And the ways
| from | to | route | distance | | nodes |
| c | d | cd | 1431469m ~9.5% | | cd |
Scenario: Approximated Latitudinal distances at longitude 0 When I route I should get
Given the node locations | from | to | route | distance |
| node | lat | lon | | c | d | cd | 1431469m ~9.5% |
| a | 80 | 0 |
| b | 0 | 0 |
And the ways Scenario: Approximated Latitudinal distances at longitude 0
| nodes | Given the node locations
| ab | | node | lat | lon |
| a | 80 | 0 |
| b | 0 | 0 |
When I route I should get And the ways
| from | to | route | distance | | nodes |
| a | b | ab | 8905559m ~0.1% | | ab |
Scenario: Approximated Latitudinal distances at longitude 45 When I route I should get
Given the node locations | from | to | route | distance |
| node | lat | lon | | a | b | ab | 8905559m ~0.1% |
| a | 80 | 45 |
| b | 0 | 45 |
And the ways Scenario: Approximated Latitudinal distances at longitude 45
| nodes | Given the node locations
| ab | | node | lat | lon |
| a | 80 | 45 |
| b | 0 | 45 |
When I route I should get And the ways
| from | to | route | distance | | nodes |
| a | b | ab | 8905559m ~0.1% | | ab |
Scenario: Approximated Latitudinal distances at longitude 80 When I route I should get
Given the node locations | from | to | route | distance |
| node | lat | lon | | a | b | ab | 8905559m ~0.1% |
| a | 80 | 80 |
| b | 0 | 80 |
And the ways Scenario: Approximated Latitudinal distances at longitude 80
| nodes | Given the node locations
| ab | | node | lat | lon |
| a | 80 | 80 |
| b | 0 | 80 |
When I route I should get And the ways
| from | to | route | distance | | nodes |
| a | b | ab | 8905559m ~0.1% | | ab |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |

View File

@ -1,35 +1,35 @@
@routing @testbot @routes @todo @routing @testbot @routes @todo
Feature: OSM Route Relation Feature: OSM Route Relation
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Prioritize ways that are part of route relations
This scenario assumes that the testbot uses an impedance of 0.5 for ways that are part of 'testbot' routes.
Given the node map
| s | | | t | | | |
| a | | | b | | | c |
| | | | | | | |
| | | | u | | | v |
And the ways Scenario: Prioritize ways that are part of route relations
| nodes | This scenario assumes that the testbot uses an impedance of 0.5 for ways that are part of 'testbot' routes.
| ab |
| bc |
| as |
| stb |
| bu |
| uvc |
And the relations Given the node map
| type | route | way:route | | s | | | t | | | |
| route | testbot | as,stb | | a | | | b | | | c |
| route | testbot | bu,uvc | | | | | | | | |
| | | | u | | | v |
When I route I should get And the ways
| from | to | route | distance | time | | nodes |
| b | c | bc | 300m +-1 | 30s +-1 | | ab |
| c | b | bc | 300m +-1 | 30s +-1 | | bc |
| a | b | as,stb | 500m +-1 | 50s +-1 | | as |
| b | a | stb,as | 500m +-1 | 50s +-1 | | stb |
| bu |
| uvc |
And the relations
| type | route | way:route |
| route | testbot | as,stb |
| route | testbot | bu,uvc |
When I route I should get
| from | to | route | distance | time |
| b | c | bc | 300m +-1 | 30s +-1 |
| c | b | bc | 300m +-1 | 30s +-1 |
| a | b | as,stb | 500m +-1 | 50s +-1 |
| b | a | stb,as | 500m +-1 | 50s +-1 |

View File

@ -1,154 +1,154 @@
@routing @snap @routing @snap
Feature: Snap start/end point to the nearest way Feature: Snap start/end point to the nearest way
Background:
Given the profile "testbot"
Scenario: Snap to nearest protruding oneway
Given the node map
| | 1 | | 2 | |
| 8 | | n | | 3 |
| | w | c | e | |
| 7 | | s | | 4 |
| | 6 | | 5 | |
And the ways Background:
| nodes | Given the profile "testbot"
| nc |
| ec |
| sc |
| wc |
When I route I should get Scenario: Snap to nearest protruding oneway
| from | to | route | Given the node map
| 1 | c | nc | | | 1 | | 2 | |
| 2 | c | nc | | 8 | | n | | 3 |
| 3 | c | ec | | | w | c | e | |
| 4 | c | ec | | 7 | | s | | 4 |
| 5 | c | sc | | | 6 | | 5 | |
| 6 | c | sc |
| 7 | c | wc |
| 8 | c | wc |
Scenario: Snap to nearest edge of a square
Given the node map
| 4 | 5 | 6 | 7 |
| 3 | a | | u |
| 2 | | | |
| 1 | d | | b |
And the ways And the ways
| nodes | | nodes |
| aub | | nc |
| adb | | ec |
| sc |
| wc |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| 1 | b | adb | | 1 | c | nc |
| 2 | b | adb | | 2 | c | nc |
| 6 | b | aub | | 3 | c | ec |
| 7 | b | aub | | 4 | c | ec |
| 5 | c | sc |
| 6 | c | sc |
| 7 | c | wc |
| 8 | c | wc |
Scenario: Snap to edge right under start/end point Scenario: Snap to nearest edge of a square
Given the node map Given the node map
| d | e | f | g | | 4 | 5 | 6 | 7 |
| c | | | h | | 3 | a | | u |
| b | | | i | | 2 | | | |
| a | l | k | j | | 1 | d | | b |
And the ways And the ways
| nodes | | nodes |
| abcd | | aub |
| defg | | adb |
| ghij |
| jkla |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abcd | | 1 | b | adb |
| a | c | abcd | | 2 | b | adb |
| a | d | abcd | | 6 | b | aub |
| a | e | abcd,defg | | 7 | b | aub |
| a | f | abcd,defg |
| a | h | jkla,ghij |
| a | i | jkla,ghij |
| a | j | jkla |
| a | k | jkla |
| a | l | jkla |
Scenario: Snap to correct way at large scales Scenario: Snap to edge right under start/end point
Given a grid size of 1000 meters Given the node map
Given the node map | d | e | f | g |
| | | | a | | c | | | h |
| x | | | b | | b | | | i |
| | | | c | | a | l | k | j |
And the ways And the ways
| nodes | | nodes |
| xa | | abcd |
| xb | | defg |
| xc | | ghij |
| jkla |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | a | xa | | a | b | abcd |
| x | b | xb | | a | c | abcd |
| x | c | xc | | a | d | abcd |
| a | x | xa | | a | e | abcd,defg |
| b | x | xb | | a | f | abcd,defg |
| c | x | xc | | a | h | jkla,ghij |
| a | i | jkla,ghij |
Scenario: Find edges within 1km, and the same from 10km | a | j | jkla |
Given a grid size of 1000 meters | a | k | jkla |
Given the node map | a | l | jkla |
| p | | | | | | | | | | | i | | | | | | | | | | | j |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | 8 | | 1 | | 2 | | | | | | | | | |
| | | | | | | | | | | h | a | b | | | | | | | | | | |
| o | | | | | | | | | 7 | g | x | c | 3 | | | | | | | | | k |
| | | | | | | | | | | f | e | d | | | | | | | | | | |
| | | | | | | | | | 6 | | 5 | | 4 | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| n | | | | | | | | | | | m | | | | | | | | | | | l |
Given the ways Scenario: Snap to correct way at large scales
| nodes | Given a grid size of 1000 meters
| xa | Given the node map
| xb | | | | | a |
| xc | | x | | | b |
| xd | | | | | c |
| xe |
| xf |
| xg |
| xh |
When I route I should get And the ways
| from | to | route | | nodes |
| x | 1 | xa | | xa |
| x | 2 | xb | | xb |
| x | 3 | xc | | xc |
| x | 4 | xd |
| x | 5 | xe | When I route I should get
| x | 6 | xf | | from | to | route |
| x | 7 | xg | | x | a | xa |
| x | 8 | xh | | x | b | xb |
| x | i | xa | | x | c | xc |
| x | j | xb | | a | x | xa |
| x | k | xc | | b | x | xb |
| x | l | xd | | c | x | xc |
| x | m | xe |
| x | n | xf | Scenario: Find edges within 1km, and the same from 10km
| x | o | xg | Given a grid size of 1000 meters
| x | p | xh | Given the node map
| p | | | | | | | | | | | i | | | | | | | | | | | j |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | 8 | | 1 | | 2 | | | | | | | | | |
| | | | | | | | | | | h | a | b | | | | | | | | | | |
| o | | | | | | | | | 7 | g | x | c | 3 | | | | | | | | | k |
| | | | | | | | | | | f | e | d | | | | | | | | | | |
| | | | | | | | | | 6 | | 5 | | 4 | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| n | | | | | | | | | | | m | | | | | | | | | | | l |
Given the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
When I route I should get
| from | to | route |
| x | 1 | xa |
| x | 2 | xb |
| x | 3 | xc |
| x | 4 | xd |
| x | 5 | xe |
| x | 6 | xf |
| x | 7 | xg |
| x | 8 | xh |
| x | i | xa |
| x | j | xb |
| x | k | xc |
| x | l | xd |
| x | m | xe |
| x | n | xf |
| x | o | xg |
| x | p | xh |

View File

@ -1,215 +1,215 @@
@routing @time @routing @time
Feature: Estimation of travel time Feature: Estimation of travel time
Testbot speeds: Testbot speeds:
Primary road: 36km/h = 36000m/3600s = 100m/10s Primary road: 36km/h = 36000m/3600s = 100m/10s
Secondary road: 18km/h = 18000m/3600s = 100m/20s Secondary road: 18km/h = 18000m/3600s = 100m/20s
Tertiary road: 12km/h = 12000m/3600s = 100m/30s Tertiary road: 12km/h = 12000m/3600s = 100m/30s
Background: Use specific speeds
Given the profile "testbot"
Scenario: Basic travel time, 10m scale
Given a grid size of 10 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
And the ways Background: Use specific speeds
| nodes | highway | Given the profile "testbot"
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
When I route I should get Scenario: Basic travel time, 10m scale
| from | to | route | time | Given a grid size of 10 meters
| x | a | xa | 1s +-1 | Given the node map
| x | b | xb | 1s +-1 | | h | a | b |
| x | c | xc | 1s +-1 | | g | x | c |
| x | d | xd | 1s +-1 | | f | e | d |
| x | e | xe | 1s +-1 |
| x | f | xf | 1s +-1 |
| x | g | xg | 1s +-1 |
| x | h | xh | 1s +-1 |
Scenario: Basic travel time, 100m scale And the ways
Given a grid size of 100 meters | nodes | highway |
Given the node map | xa | primary |
| h | a | b | | xb | primary |
| g | x | c | | xc | primary |
| f | e | d | | xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
And the ways When I route I should get
| nodes | highway | | from | to | route | time |
| xa | primary | | x | a | xa | 1s +-1 |
| xb | primary | | x | b | xb | 1s +-1 |
| xc | primary | | x | c | xc | 1s +-1 |
| xd | primary | | x | d | xd | 1s +-1 |
| xe | primary | | x | e | xe | 1s +-1 |
| xf | primary | | x | f | xf | 1s +-1 |
| xg | primary | | x | g | xg | 1s +-1 |
| xh | primary | | x | h | xh | 1s +-1 |
When I route I should get
| from | to | route | time |
| x | a | xa | 10s +-1 |
| x | b | xb | 14s +-1 |
| x | c | xc | 10s +-1 |
| x | d | xd | 14s +-1 |
| x | e | xe | 10s +-1 |
| x | f | xf | 14s +-1 |
| x | g | xg | 10s +-1 |
| x | h | xh | 14s +-1 |
Scenario: Basic travel time, 1km scale Scenario: Basic travel time, 100m scale
Given a grid size of 1000 meters Given a grid size of 100 meters
Given the node map Given the node map
| h | a | b | | h | a | b |
| g | x | c | | g | x | c |
| f | e | d | | f | e | d |
And the ways And the ways
| nodes | highway | | nodes | highway |
| xa | primary | | xa | primary |
| xb | primary | | xb | primary |
| xc | primary | | xc | primary |
| xd | primary | | xd | primary |
| xe | primary | | xe | primary |
| xf | primary | | xf | primary |
| xg | primary | | xg | primary |
| xh | primary | | xh | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| x | a | xa | 100s +-1 | | x | a | xa | 10s +-1 |
| x | b | xb | 141s +-1 | | x | b | xb | 14s +-1 |
| x | c | xc | 100s +-1 | | x | c | xc | 10s +-1 |
| x | d | xd | 141s +-1 | | x | d | xd | 14s +-1 |
| x | e | xe | 100s +-1 | | x | e | xe | 10s +-1 |
| x | f | xf | 141s +-1 | | x | f | xf | 14s +-1 |
| x | g | xg | 100s +-1 | | x | g | xg | 10s +-1 |
| x | h | xh | 141s +-1 | | x | h | xh | 14s +-1 |
Scenario: Basic travel time, 10km scale Scenario: Basic travel time, 1km scale
Given a grid size of 10000 meters Given a grid size of 1000 meters
Given the node map Given the node map
| h | a | b | | h | a | b |
| g | x | c | | g | x | c |
| f | e | d | | f | e | d |
And the ways
| nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
When I route I should get
| from | to | route | time |
| x | a | xa | 1000s +-1 |
| x | b | xb | 1414s +-1 |
| x | c | xc | 1000s +-1 |
| x | d | xd | 1414s +-1 |
| x | e | xe | 1000s +-1 |
| x | f | xf | 1414s +-1 |
| x | g | xg | 1000s +-1 |
| x | h | xh | 1414s +-1 |
Scenario: Time of travel depending on way type And the ways
Given the node map | nodes | highway |
| a | b | | xa | primary |
| c | d | | xb | primary |
| e | f | | xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
And the ways When I route I should get
| nodes | highway | | from | to | route | time |
| ab | primary | | x | a | xa | 100s +-1 |
| cd | secondary | | x | b | xb | 141s +-1 |
| ef | tertiary | | x | c | xc | 100s +-1 |
| ace | something | | x | d | xd | 141s +-1 |
| x | e | xe | 100s +-1 |
When I route I should get | x | f | xf | 141s +-1 |
| from | to | route | time | | x | g | xg | 100s +-1 |
| a | b | ab | 10s +-1 | | x | h | xh | 141s +-1 |
| c | d | cd | 20s +-1 |
| e | f | ef | 30s +-1 |
Scenario: Time of travel on a series of ways Scenario: Basic travel time, 10km scale
Given the node map Given a grid size of 10000 meters
| a | b | | Given the node map
| | c | d | | h | a | b |
| g | x | c |
| f | e | d |
And the ways And the ways
| nodes | highway | | nodes | highway |
| ab | primary | | xa | primary |
| bc | primary | | xb | primary |
| cd | primary | | xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | ab | 10s +-1 | | x | a | xa | 1000s +-1 |
| a | c | ab,bc | 20s +-1 | | x | b | xb | 1414s +-1 |
| a | d | ab,bc,cd | 30s +-1 | | x | c | xc | 1000s +-1 |
| x | d | xd | 1414s +-1 |
| x | e | xe | 1000s +-1 |
| x | f | xf | 1414s +-1 |
| x | g | xg | 1000s +-1 |
| x | h | xh | 1414s +-1 |
Scenario: Time of travel on a winding way Scenario: Time of travel depending on way type
Given the node map Given the node map
| a | | i | h | | a | b |
| b | c | | g | | c | d |
| | d | e | f | | e | f |
And the ways And the ways
| nodes | highway | | nodes | highway |
| abcdefghi | primary | | ab | primary |
| cd | secondary |
| ef | tertiary |
| ace | something |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | abcdefghi | 10s +-1 | | a | b | ab | 10s +-1 |
| a | e | abcdefghi | 40s +-1 | | c | d | cd | 20s +-1 |
| a | i | abcdefghi | 80s +-1 | | e | f | ef | 30s +-1 |
Scenario: Time of travel on combination of road types Scenario: Time of travel on a series of ways
Given the node map Given the node map
| a | b | c | | a | b | |
| | | d | | | c | d |
| | | e |
And the ways
| nodes | highway |
| abc | primary |
| cde | tertiary |
When I route I should get And the ways
| from | to | route | time | | nodes | highway |
| b | c | abc | 10s +-1 | | ab | primary |
| c | e | cde | 60s +-1 | | bc | primary |
| b | d | abc,cde | 40s +-1 | | cd | primary |
| a | e | abc,cde | 80s +-1 |
Scenario: Time of travel on part of a way When I route I should get
Given the node map | from | to | route | time |
| a | 1 | | a | b | ab | 10s +-1 |
| | 2 | | a | c | ab,bc | 20s +-1 |
| | 3 | | a | d | ab,bc,cd | 30s +-1 |
| b | 4 |
And the ways Scenario: Time of travel on a winding way
| nodes | highway | Given the node map
| ab | primary | | a | | i | h |
| b | c | | g |
| | d | e | f |
When I route I should get And the ways
| from | to | route | time | | nodes | highway |
| 1 | 2 | ab | 10s +-1 | | abcdefghi | primary |
| 1 | 3 | ab | 20s +-1 |
| 1 | 4 | ab | 30s +-1 | When I route I should get
| 4 | 3 | ab | 10s +-1 | | from | to | route | time |
| 4 | 2 | ab | 20s +-1 | | a | b | abcdefghi | 10s +-1 |
| 4 | 1 | ab | 30s +-1 | | a | e | abcdefghi | 40s +-1 |
| a | i | abcdefghi | 80s +-1 |
Scenario: Time of travel on combination of road types
Given the node map
| a | b | c |
| | | d |
| | | e |
And the ways
| nodes | highway |
| abc | primary |
| cde | tertiary |
When I route I should get
| from | to | route | time |
| b | c | abc | 10s +-1 |
| c | e | cde | 60s +-1 |
| b | d | abc,cde | 40s +-1 |
| a | e | abc,cde | 80s +-1 |
Scenario: Time of travel on part of a way
Given the node map
| a | 1 |
| | 2 |
| | 3 |
| b | 4 |
And the ways
| nodes | highway |
| ab | primary |
When I route I should get
| from | to | route | time |
| 1 | 2 | ab | 10s +-1 |
| 1 | 3 | ab | 20s +-1 |
| 1 | 4 | ab | 30s +-1 |
| 4 | 3 | ab | 10s +-1 |
| 4 | 2 | ab | 20s +-1 |
| 4 | 1 | ab | 30s +-1 |

View File

@ -1,123 +1,123 @@
@routing @turns @routing @turns
Feature: Turn directions/codes Feature: Turn directions/codes
Background:
Given the profile "testbot"
Scenario: Turn directions
Given the node map
| o | p | a | b | c |
| n | | | | d |
| m | | x | | e |
| l | | | | f |
| k | j | i | h | g |
And the ways Background:
| nodes | Given the profile "testbot"
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
| xi |
| xj |
| xk |
| xl |
| xm |
| xn |
| xo |
| xp |
When I route I should get Scenario: Turn directions
| from | to | route | turns | Given the node map
| i | k | xi,xk | head,sharp_left,destination | | o | p | a | b | c |
| i | m | xi,xm | head,left,destination | | n | | | | d |
| i | o | xi,xo | head,slight_left,destination | | m | | x | | e |
| i | a | xi,xa | head,straight,destination | | l | | | | f |
| i | c | xi,xc | head,slight_right,destination | | k | j | i | h | g |
| i | e | xi,xe | head,right,destination |
| i | g | xi,xg | head,sharp_right,destination |
| k | m | xk,xm | head,sharp_left,destination | And the ways
| k | o | xk,xo | head,left,destination | | nodes |
| k | a | xk,xa | head,slight_left,destination | | xa |
| k | c | xk,xc | head,straight,destination | | xb |
| k | e | xk,xe | head,slight_right,destination | | xc |
| k | g | xk,xg | head,right,destination | | xd |
| k | i | xk,xi | head,sharp_right,destination | | xe |
| xf |
| xg |
| xh |
| xi |
| xj |
| xk |
| xl |
| xm |
| xn |
| xo |
| xp |
| m | o | xm,xo | head,sharp_left,destination | When I route I should get
| m | a | xm,xa | head,left,destination | | from | to | route | turns |
| m | c | xm,xc | head,slight_left,destination | | i | k | xi,xk | head,sharp_left,destination |
| m | e | xm,xe | head,straight,destination | | i | m | xi,xm | head,left,destination |
| m | g | xm,xg | head,slight_right,destination | | i | o | xi,xo | head,slight_left,destination |
| m | i | xm,xi | head,right,destination | | i | a | xi,xa | head,straight,destination |
| m | k | xm,xk | head,sharp_right,destination | | i | c | xi,xc | head,slight_right,destination |
| i | e | xi,xe | head,right,destination |
| i | g | xi,xg | head,sharp_right,destination |
| o | a | xo,xa | head,sharp_left,destination | | k | m | xk,xm | head,sharp_left,destination |
| o | c | xo,xc | head,left,destination | | k | o | xk,xo | head,left,destination |
| o | e | xo,xe | head,slight_left,destination | | k | a | xk,xa | head,slight_left,destination |
| o | g | xo,xg | head,straight,destination | | k | c | xk,xc | head,straight,destination |
| o | i | xo,xi | head,slight_right,destination | | k | e | xk,xe | head,slight_right,destination |
| o | k | xo,xk | head,right,destination | | k | g | xk,xg | head,right,destination |
| o | m | xo,xm | head,sharp_right,destination | | k | i | xk,xi | head,sharp_right,destination |
| a | c | xa,xc | head,sharp_left,destination | | m | o | xm,xo | head,sharp_left,destination |
| a | e | xa,xe | head,left,destination | | m | a | xm,xa | head,left,destination |
| a | g | xa,xg | head,slight_left,destination | | m | c | xm,xc | head,slight_left,destination |
| a | i | xa,xi | head,straight,destination | | m | e | xm,xe | head,straight,destination |
| a | k | xa,xk | head,slight_right,destination | | m | g | xm,xg | head,slight_right,destination |
| a | m | xa,xm | head,right,destination | | m | i | xm,xi | head,right,destination |
| a | o | xa,xo | head,sharp_right,destination | | m | k | xm,xk | head,sharp_right,destination |
| c | e | xc,xe | head,sharp_left,destination | | o | a | xo,xa | head,sharp_left,destination |
| c | g | xc,xg | head,left,destination | | o | c | xo,xc | head,left,destination |
| c | i | xc,xi | head,slight_left,destination | | o | e | xo,xe | head,slight_left,destination |
| c | k | xc,xk | head,straight,destination | | o | g | xo,xg | head,straight,destination |
| c | m | xc,xm | head,slight_right,destination | | o | i | xo,xi | head,slight_right,destination |
| c | o | xc,xo | head,right,destination | | o | k | xo,xk | head,right,destination |
| c | a | xc,xa | head,sharp_right,destination | | o | m | xo,xm | head,sharp_right,destination |
| e | g | xe,xg | head,sharp_left,destination | | a | c | xa,xc | head,sharp_left,destination |
| e | i | xe,xi | head,left,destination | | a | e | xa,xe | head,left,destination |
| e | k | xe,xk | head,slight_left,destination | | a | g | xa,xg | head,slight_left,destination |
| e | m | xe,xm | head,straight,destination | | a | i | xa,xi | head,straight,destination |
| e | o | xe,xo | head,slight_right,destination | | a | k | xa,xk | head,slight_right,destination |
| e | a | xe,xa | head,right,destination | | a | m | xa,xm | head,right,destination |
| e | c | xe,xc | head,sharp_right,destination | | a | o | xa,xo | head,sharp_right,destination |
| g | i | xg,xi | head,sharp_left,destination | | c | e | xc,xe | head,sharp_left,destination |
| g | k | xg,xk | head,left,destination | | c | g | xc,xg | head,left,destination |
| g | m | xg,xm | head,slight_left,destination | | c | i | xc,xi | head,slight_left,destination |
| g | o | xg,xo | head,straight,destination | | c | k | xc,xk | head,straight,destination |
| g | a | xg,xa | head,slight_right,destination | | c | m | xc,xm | head,slight_right,destination |
| g | c | xg,xc | head,right,destination | | c | o | xc,xo | head,right,destination |
| g | e | xg,xe | head,sharp_right,destination | | c | a | xc,xa | head,sharp_right,destination |
Scenario: Turn instructions at high latitude
https://github.com/DennisOSRM/Project-OSRM/issues/532
Given the node locations
| node | lat | lon |
| a | 55.68740 | 12.52430 |
| b | 55.68745 | 12.52409 |
| c | 55.68711 | 12.52383 |
| x | -55.68740 | 12.52430 |
| y | -55.68745 | 12.52409 |
| z | -55.68711 | 12.52383 |
And the ways | e | g | xe,xg | head,sharp_left,destination |
| nodes | | e | i | xe,xi | head,left,destination |
| ab | | e | k | xe,xk | head,slight_left,destination |
| bc | | e | m | xe,xm | head,straight,destination |
| xy | | e | o | xe,xo | head,slight_right,destination |
| yz | | e | a | xe,xa | head,right,destination |
| e | c | xe,xc | head,sharp_right,destination |
When I route I should get | g | i | xg,xi | head,sharp_left,destination |
| from | to | route | turns | | g | k | xg,xk | head,left,destination |
| a | c | ab,bc | head,left,destination | | g | m | xg,xm | head,slight_left,destination |
| c | a | bc,ab | head,right,destination | | g | o | xg,xo | head,straight,destination |
| x | z | xy,yz | head,right,destination | | g | a | xg,xa | head,slight_right,destination |
| z | x | yz,xy | head,left,destination | | g | c | xg,xc | head,right,destination |
| g | e | xg,xe | head,sharp_right,destination |
Scenario: Turn instructions at high latitude
https://github.com/DennisOSRM/Project-OSRM/issues/532
Given the node locations
| node | lat | lon |
| a | 55.68740 | 12.52430 |
| b | 55.68745 | 12.52409 |
| c | 55.68711 | 12.52383 |
| x | -55.68740 | 12.52430 |
| y | -55.68745 | 12.52409 |
| z | -55.68711 | 12.52383 |
And the ways
| nodes |
| ab |
| bc |
| xy |
| yz |
When I route I should get
| from | to | route | turns |
| a | c | ab,bc | head,left,destination |
| c | a | bc,ab | head,right,destination |
| x | z | xy,yz | head,right,destination |
| z | x | yz,xy | head,left,destination |

View File

@ -1,21 +1,21 @@
@routing @utf @routing @utf
Feature: Handling of UTF characters Feature: Handling of UTF characters
Background:
Given the profile "testbot"
Scenario: Streetnames with UTF characters
Given the node map
| a | b | c | d |
And the ways Background:
| nodes | name | Given the profile "testbot"
| ab | Scandinavian København |
| bc | Japanese |
| cd | Cyrillic Москва |
When I route I should get Scenario: Streetnames with UTF characters
| from | to | route | Given the node map
| a | b | Scandinavian København | | a | b | c | d |
| b | c | Japanese |
| c | d | Cyrillic Москва | And the ways
| nodes | name |
| ab | Scandinavian København |
| bc | Japanese |
| cd | Cyrillic Москва |
When I route I should get
| from | to | route |
| a | b | Scandinavian København |
| b | c | Japanese |
| c | d | Cyrillic Москва |

View File

@ -4,67 +4,49 @@ Feature: Via points
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Simple via point Scenario: Simple via point
Given the node map Given the node map
| a | b | c | | a | b | c |
And the ways And the ways
| nodes | | nodes |
| abc | | abc |
When I route I should get When I route I should get
| waypoints | route | | waypoints | route |
| a,b,c | abc | | a,b,c | abc |
| c,b,a | abc | | c,b,a | abc |
Scenario: Via point at a dead end Scenario: Via point at a dead end
Given the node map Given the node map
| a | b | c | | a | b | c |
| | d | | | | d | |
And the ways And the ways
| nodes | | nodes |
| abc | | abc |
| bd | | bd |
When I route I should get When I route I should get
| waypoints | route | | waypoints | route |
| a,d,c | abc,bd,bd,abc | | a,d,c | abc,bd,bd,abc |
| c,d,a | abc,bd,bd,abc | | c,d,a | abc,bd,bd,abc |
Scenario: Multiple via points Scenario: Multiple via points
Given the node map Given the node map
| a | | | | e | f | g | | | a | | | | e | f | g | |
| | b | c | d | | | | h | | | b | c | d | | | | h |
And the ways And the ways
| nodes | | nodes |
| ae | | ae |
| ab | | ab |
| bcd | | bcd |
| de | | de |
| efg | | efg |
| gh | | gh |
| dh | | dh |
When I route I should get
| waypoints | route |
| a,c,f,h | ab,bcd,de,efg,gh |
@bug @todo
Scenario: U-turn should be allowed at via point
Given the node map
| a | b | c |
| | d | |
| | e | |
And the ways
| nodes |
| abc |
| bd |
| de |
When I route I should get
| waypoints | route |
| a,d,c | abc,bd,bd,abc |
When I route I should get
| waypoints | route |
| a,c,f,h | ab,bcd,de,efg,gh |

View File

@ -1,12 +1,11 @@
@timestamp @timestamp
Feature: Timestamp Feature: Timestamp
Scenario: Request timestamp Scenario: Request timestamp
Given the node map Given the node map
| a | b | | a | b |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
When I request /timestamp When I request /timestamp
Then I should get a valid timestamp Then I should get a valid timestamp