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

View File

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

View File

@ -1,103 +1,103 @@
@routing @bicycle @area
Feature: Bike - Squares and other areas
Background:
Given the profile "bicycle"
@square
Scenario: Bike - Route along edge of a squares
Given the node map
| x | |
| a | b |
| d | c |
Background:
Given the profile "bicycle"
And the ways
| nodes | area | highway |
| xa | | primary |
| abcda | yes | residential |
When I route I should get
| 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 |
@square
Scenario: Bike - Route along edge of a squares
Given the node map
| x | |
| a | b |
| d | c |
And the ways
| nodes | highway | area | building | access |
| xa | primary | | | |
| abcda | (nil) | yes | yes | yes |
And the ways
| nodes | area | highway |
| xa | | primary |
| abcda | yes | residential |
When I route I should get
| from | to | route |
| a | b | xa |
| a | d | xa |
| b | c | xa |
| c | b | xa |
| c | d | xa |
| d | c | xa |
| d | a | xa |
| a | d | xa |
@parking
Scenario: Bike - parking areas
Given the node map
| e | | | f |
| x | a | b | y |
| | d | c | |
When I route I should get
| 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 |
And the ways
| nodes | highway | amenity |
| xa | primary | |
| by | primary | |
| xefy | primary | |
| abcda | (nil) | parking |
@building
Scenario: Bike - Don't route on buildings
Given the node map
| x | |
| a | b |
| d | c |
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 | area | building | access |
| xa | primary | | | |
| abcda | (nil) | yes | yes | yes |
And the ways
| nodes | highway | railway |
| xa | primary | |
| by | primary | |
| abcda | (nil) | platform |
When I route I should get
| from | to | route |
| a | b | xa |
| a | d | xa |
| b | c | xa |
| c | b | xa |
| c | d | xa |
| d | c | xa |
| d | a | xa |
| a | d | xa |
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 |
@parking
Scenario: Bike - parking areas
Given the node map
| e | | | f |
| x | a | b | y |
| | d | c | |
And the ways
| nodes | highway | amenity |
| xa | primary | |
| by | primary | |
| 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
Feature: Barriers
Background:
Given the profile "bicycle"
Background:
Given the profile "bicycle"
Scenario: Bike - Barriers
Then routability should be
| node/barrier | bothw |
| | x |
| bollard | x |
| gate | x |
| cycle_barrier | x |
| cattle_grid | x |
| border_control | x |
| toll_booth | x |
| sally_port | x |
| entrance | x |
| wall | |
| fence | |
| some_tag | |
Scenario: Bike - Barriers
Then routability should be
| node/barrier | bothw |
| | x |
| bollard | x |
| gate | x |
| cycle_barrier | x |
| cattle_grid | x |
| border_control | x |
| toll_booth | x |
| sally_port | x |
| entrance | x |
| wall | |
| fence | |
| some_tag | |
Scenario: Bike - Access tag trumphs barriers
Then routability should be
| node/barrier | node/access | bothw |
| bollard | | x |
| bollard | yes | x |
| bollard | permissive | x |
| bollard | designated | x |
| bollard | no | |
| bollard | private | |
| bollard | agricultural | |
| wall | | |
| wall | yes | x |
| wall | permissive | x |
| wall | designated | x |
| wall | no | |
| wall | private | |
| wall | agricultural | |
Scenario: Bike - Access tag trumphs barriers
Then routability should be
| node/barrier | node/access | bothw |
| bollard | | x |
| bollard | yes | x |
| bollard | permissive | x |
| bollard | designated | x |
| bollard | no | |
| bollard | private | |
| bollard | agricultural | |
| wall | | |
| wall | yes | x |
| wall | permissive | x |
| wall | designated | x |
| wall | no | |
| wall | private | |
| wall | agricultural | |

View File

@ -2,80 +2,80 @@
Feature: Bike - Cycle tracks/lanes
Reference: http://wiki.openstreetmap.org/wiki/Key:cycleway
Background:
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 |
Background:
Given the profile "bicycle"
Scenario: Bike - Left/right side cycleways on implied bidirectionals
Then routability should be
| highway | cycleway | cycleway:left | cycleway:right | forw | backw |
| primary | | | | x | x |
| primary | track | | | x | x |
| primary | opposite | | | x | x |
| primary | | track | | x | x |
| primary | | opposite | | x | x |
| primary | | | track | x | x |
| primary | | | opposite | x | x |
| primary | | track | track | x | x |
| primary | | opposite | opposite | x | x |
| primary | | track | opposite | x | x |
| primary | | opposite | track | x | x |
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 oneways
Then routability should be
| highway | cycleway | cycleway:left | cycleway:right | forw | backw |
| primary | | | | x | x |
| motorway | | | | | |
| motorway | track | | | x | |
| motorway | opposite | | | | x |
| motorway | | track | | | x |
| motorway | | opposite | | | x |
| motorway | | | track | x | |
| motorway | | | opposite | x | |
| motorway | | track | track | x | x |
| motorway | | opposite | opposite | x | x |
| motorway | | track | opposite | x | x |
| motorway | | opposite | track | x | x |
Scenario: Bike - Left/right side cycleways on implied bidirectionals
Then routability should be
| highway | cycleway | cycleway:left | cycleway:right | forw | backw |
| primary | | | | x | x |
| primary | track | | | x | x |
| primary | opposite | | | x | x |
| primary | | track | | x | x |
| primary | | opposite | | x | x |
| primary | | | track | x | x |
| primary | | | opposite | x | x |
| primary | | track | track | x | x |
| primary | | opposite | opposite | x | x |
| primary | | track | opposite | x | x |
| primary | | opposite | track | x | x |
Scenario: Bike - Invalid cycleway tags
Then routability should be
| highway | cycleway | bothw |
| primary | | x |
| primary | yes | x |
| primary | no | 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 |
Scenario: Bike - Left/right side cycleways on implied oneways
Then routability should be
| highway | cycleway | cycleway:left | cycleway:right | forw | backw |
| primary | | | | x | x |
| motorway | | | | | |
| motorway | track | | | x | |
| motorway | opposite | | | | x |
| motorway | | track | | | x |
| motorway | | opposite | | | x |
| motorway | | | track | x | |
| motorway | | | opposite | x | |
| motorway | | track | track | x | x |
| motorway | | opposite | opposite | x | x |
| motorway | | track | opposite | x | x |
| motorway | | opposite | track | x | x |
Scenario: Bike - Invalid cycleway tags
Then routability should be
| highway | cycleway | bothw |
| primary | | x |
| primary | yes | x |
| primary | no | 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
Feature: Bike - Destination only, no passing through
Background:
Given the profile "bicycle"
Scenario: Bike - Destination only street
Given the node map
| a | | | | e |
| | b | c | d | |
| | | | | |
| x | | | | y |
Background:
Given the profile "bicycle"
And the ways
| nodes | access |
| ab | |
| bcd | destination |
| de | |
| axye | |
Scenario: Bike - Destination only street
Given the node map
| a | | | | e |
| | b | c | d | |
| | | | | |
| x | | | | y |
When I route I should get
| from | to | route |
| a | b | ab |
| a | c | ab,bcd |
| a | d | ab,bcd |
| a | e | 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
| nodes | access |
| ab | |
| bcd | destination |
| de | |
| axye | |
And the ways
| nodes | access |
| ab | |
| bc | destination |
| cd | destination |
| de | |
| axye | |
When I route I should get
| from | to | route |
| a | b | ab |
| a | c | ab,bcd |
| a | d | ab,bcd |
| a | e | axye |
| e | d | de |
| e | c | de,bcd |
| e | b | de,bcd |
| e | a | axye |
When I route I should get
| from | to | route |
| a | b | ab |
| a | c | ab,bc |
| a | d | ab,bc,cd |
| a | e | axye |
| e | d | de |
| e | c | de,dc |
| e | b | de,dc,bc |
| e | a | axye |
Scenario: Bike - Destination only street
Given the node map
| a | | | | e |
| | b | c | d | |
| | | | | |
| x | | | | y |
Scenario: Bike - Routing inside a destination only area
Given the node map
| a | | c | | e |
| | b | | d | |
| x | | | | y |
And the ways
| nodes | access |
| ab | |
| bc | destination |
| cd | destination |
| de | |
| axye | |
And the ways
| nodes | access |
| ab | destination |
| bc | destination |
| cd | destination |
| de | destination |
| axye | |
When I route I should get
| from | to | route |
| a | b | ab |
| a | c | ab,bc |
| a | d | ab,bc,cd |
| a | e | axye |
| e | d | de |
| e | c | de,dc |
| e | b | de,dc,bc |
| e | a | 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 |
Scenario: Bike - Routing inside a destination only area
Given the node map
| a | | c | | e |
| | b | | d | |
| x | | | | y |
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
Feature: Bike - Handle ferry routes
Background:
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 |
Background:
Given the profile "bicycle"
Scenario: Bike - Ferry duration, single node
Given the node map
| a | b | c | d |
| | | 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 route
Given the node map
| a | b | c | | |
| | | d | | |
| | | e | f | g |
Scenario: Bike - Ferry duration, multiple nodes
Given the node map
| x | | | | | y |
| | a | b | c | d | |
And the ways
| nodes | highway | route | bicycle |
| abc | primary | | |
| cde | | ferry | yes |
| efg | primary | | |
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 |
| 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 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 3600s +-10 |
| d | a | abcd | 3600s +-10 |
Scenario: Bike - Ferry duration, single node
Given the node map
| a | b | c | d |
| | | 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
Feature: Bike - Max speed restrictions
Background: Use specific speeds
Given the profile "bicycle"
Background: Use specific speeds
Given the profile "bicycle"
Scenario: Bicycle - Respect maxspeeds when lower that way type speed
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | 10 | 72s ~10% |
Scenario: Bicycle - Respect maxspeeds when lower that way type speed
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | 10 | 72s ~10% |
Scenario: Bicycle - Ignore maxspeed when higher than way speed
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | 80 | 49s ~10% |
Scenario: Bicycle - Ignore maxspeed when higher than way speed
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | 80 | 49s ~10% |
@todo
Scenario: Bicycle - Maxspeed formats
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | 5 | 144s ~10% |
| residential | 5mph | 90s ~10% |
| residential | 5 mph | 90s ~10% |
| residential | 5MPH | 90s ~10% |
| residential | 5 MPH | 90s ~10% |
| trunk | 5unknown | 49s ~10% |
| trunk | 5 unknown | 49s ~10% |
Scenario: Bicycle - Maxspeed formats
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | 5 | 144s ~10% |
| residential | 5mph | 90s ~10% |
| residential | 5 mph | 90s ~10% |
| residential | 5MPH | 90s ~10% |
| residential | 5 MPH | 90s ~10% |
| trunk | 5unknown | 49s ~10% |
| trunk | 5 unknown | 49s ~10% |
@todo
Scenario: Bicycle - Maxspeed special tags
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | none | 49s ~10% |
| residential | signals | 49s ~10% |
Scenario: Bicycle - Maxspeed special tags
Then routability should be
| highway | maxspeed | bothw |
| residential | | 49s ~10% |
| residential | none | 49s ~10% |
| residential | signals | 49s ~10% |
Scenario: Bike - Do not use maxspeed when higher that way type speed
Given the node map
| a | b | c |
Scenario: Bike - Do not use maxspeed when higher that way type speed
Given the node map
| a | b | c |
And the ways
| nodes | highway | maxspeed |
| ab | residential | |
| bc | residential | 80 |
And the ways
| nodes | highway | maxspeed |
| ab | residential | |
| bc | residential | 80 |
When I route I should get
| from | to | route | time |
| a | b | ab | 24s ~5% |
| b | c | bc | 24s ~5% |
When I route I should get
| from | to | route | time |
| a | b | ab | 24s ~5% |
| b | c | bc | 24s ~5% |
Scenario: Bike - Forward/backward maxspeed
Scenario: Bike - Forward/backward maxspeed
Given the shortcuts
| key | value |
| bike | 49s ~10% |
| run | 73s ~10% |
| walk | 145s ~10% |
| snail | 720s ~10% |
| key | value |
| bike | 49s ~10% |
| run | 73s ~10% |
| walk | 145s ~10% |
| snail | 720s ~10% |
Then routability should be
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | bike | bike |
| 10 | | | run | run |
| | 10 | | run | bike |
| | | 10 | bike | run |
| 1 | 10 | | run | snail |
| 1 | | 10 | snail | run |
| 1 | 5 | 10 | walk | run |
Then routability should be
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | bike | bike |
| 10 | | | run | run |
| | 10 | | run | bike |
| | | 10 | bike | run |
| 1 | 10 | | run | snail |
| 1 | | 10 | snail | run |
| 1 | 5 | 10 | walk | run |
Scenario: Bike - Maxspeed should not allow routing on unroutable ways
Then routability should be
| highway | railway | access | maxspeed | maxspeed:forward | maxspeed:backward | bothw |
| primary | | | | | | x |
| secondary | | no | | | | |
| secondary | | no | 100 | | | |
| secondary | | no | | 100 | | |
| secondary | | no | | | 100 | |
| (nil) | train | | | | | |
| (nil) | train | | 100 | | | |
| (nil) | train | | | 100 | | |
| (nil) | train | | | | 100 | |
| runway | | | | | | |
| runway | | | 100 | | | |
| runway | | | | 100 | | |
| runway | | | | | 100 | |
Scenario: Bike - Maxspeed should not allow routing on unroutable ways
Then routability should be
| highway | railway | access | maxspeed | maxspeed:forward | maxspeed:backward | bothw |
| primary | | | | | | x |
| secondary | | no | | | | |
| secondary | | no | 100 | | | |
| secondary | | no | | 100 | | |
| secondary | | no | | | 100 | |
| (nil) | train | | | | | |
| (nil) | train | | 100 | | | |
| (nil) | train | | | 100 | | |
| (nil) | train | | | | 100 | |
| runway | | | | | | |
| runway | | | 100 | | | |
| runway | | | | 100 | | |
| runway | | | | | 100 | |

View File

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

View File

@ -1,49 +1,49 @@
@routing @bicycle @names
Feature: Bike - Street names in instructions
Background:
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 |
Background:
Given the profile "bicycle"
And the ways
| nodes | highway | name |
| ab | cycleway | |
| bcd | track | |
Scenario: Bike - A named street
Given the node map
| a | b |
| | c |
When I route I should get
| from | to | route |
| a | d | {highway:cycleway},{highway:track} |
And the ways
| nodes | name |
| ab | My Way |
| bc | Your Way |
@area @names @todo
Scenario: Bike - name on streets overlapping an area
Given the node map
| x | a | b | y |
| | d | c | |
When I route I should get
| from | to | route |
| a | c | My Way,Your Way |
And the ways
| nodes | highway | area |
| xaby | residential | |
| abcda | residential | yes |
@unnamed
Scenario: Bike - Use way type to describe unnamed ways
Given the node map
| a | b | c | d |
When I route I should get
| from | to | route |
| x | y | xaby |
| y | x | xaby |
And the ways
| nodes | highway | name |
| ab | cycleway | |
| 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
Usually we can push bikes against oneways, but we use foot=no to prevent this in these tests
Background:
Given the profile "bicycle"
Scenario: Bike - Simple oneway
Then routability should be
| highway | foot | oneway | forw | backw |
| primary | no | yes | x | |
Background:
Given the profile "bicycle"
Scenario: Simple reverse oneway
Then routability should be
| highway | foot | oneway | forw | backw |
| primary | no | -1 | | x |
Scenario: Bike - Simple oneway
Then routability should be
| highway | foot | oneway | forw | backw |
| primary | no | yes | x | |
Scenario: Bike - Around the Block
Given the node map
| a | b |
| d | c |
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: Simple reverse oneway
Then routability should be
| highway | foot | oneway | forw | backw |
| primary | no | -1 | | 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 - Around the Block
Given the node map
| a | b |
| d | c |
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 | |
And the ways
| nodes | oneway | foot |
| ab | yes | no |
| bc | | no |
| cd | | no |
| da | | no |
Scenario: Bike - Two consecutive oneways
Given the node map
| a | b | c |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | bc,cd,da |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
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
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
| from | to | route |
| a | c | ab,bc |
When I route I should get
| from | to | route |
| a | c | ab,bc |

View File

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

View File

@ -1,41 +1,41 @@
@routing @bicycle @ref @name
Feature: Bike - Way ref
Background:
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 |
Background:
Given the profile "bicycle"
Scenario: Bike - Way with only ref
Given the node map
| a | b |
Scenario: Bike - Way with both name and ref
Given the node map
| a | b |
And the ways
| nodes | name | ref |
| ab | | E7 |
And the ways
| nodes | name | ref |
| ab | Utopia Drive | E7 |
When I route I should get
| from | to | route |
| a | b | E7 |
When I route I should get
| from | to | route |
| a | b | Utopia Drive / E7 |
Scenario: Bike - Way with only name
Given the node map
| a | b |
Scenario: Bike - Way with only ref
Given the node map
| a | b |
And the ways
| nodes | name |
| ab | Utopia Drive |
And the ways
| nodes | name | ref |
| ab | | E7 |
When I route I should get
| from | to | route |
| a | b | Utopia Drive |
When I route I should get
| from | to | route |
| 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
Feature: Bike - Turn restrictions
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.
Background:
Given the profile "bicycle"
@no_turning
Scenario: Bike - No left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
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.
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
Background:
Given the profile "bicycle"
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_left_turn |
@no_turning
Scenario: Bike - No left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
@no_turning
Scenario: Bike - No right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_left_turn |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | no_right_turn |
@no_turning
Scenario: Bike - No right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
@no_turning
Scenario: Bike - No u-turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | no_right_turn |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_u_turn |
@no_turning
Scenario: Bike - No u-turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
@no_turning
Scenario: Bike - Handle any no_* relation
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_u_turn |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_weird_zigzags |
@no_turning
Scenario: Bike - Handle any no_* relation
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
@only_turning
Scenario: Bike - Only left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_weird_zigzags |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | only_left_turn |
@only_turning
Scenario: Bike - Only left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
@only_turning
Scenario: Bike - Only right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | only_left_turn |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | only_right_turn |
@only_turning
Scenario: Bike - Only right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
@only_turning
Scenario: Bike - Only straight on
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | only_right_turn |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_straight_on |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
@only_turning
Scenario: Bike - Only straight on
Given the node map
| | n | |
| w | j | e |
| | s | |
@no_turning
Scenario: Bike - Handle any only_* restriction
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_straight_on |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_weird_zigzags |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
@no_turning
Scenario: Bike - Handle any only_* restriction
Given the node map
| | n | |
| w | j | e |
| | s | |
@except
Scenario: Bike - Except tag and on no_ restrictions
Given the node map
| b | x | c |
| a | j | d |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the ways
| nodes | oneway | foot |
| sj | no | no |
| xj | -1 | no |
| aj | -1 | no |
| bj | no | no |
| cj | -1 | no |
| dj | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_weird_zigzags |
And the relations
| type | way:from | way:to | node:via | restriction | except |
| restriction | sj | aj | j | no_left_turn | bicycle |
| restriction | sj | bj | j | no_left_turn | |
| restriction | sj | cj | j | no_right_turn | |
| restriction | sj | dj | j | no_right_turn | bicycle |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | sj,ej |
When I route I should get
| from | to | route |
| s | a | sj,aj |
| s | b | sj,bj |
| s | c | sj,cj |
| s | d | sj,dj |
@except
Scenario: Bike - Except tag and on no_ restrictions
Given the node map
| b | x | c |
| a | j | d |
| | s | |
@except
Scenario: Bike - Except tag and on only_ restrictions
Given the node map
| a | | b |
| | j | |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | no | no |
| xj | -1 | no |
| aj | -1 | no |
| bj | no | no |
| cj | -1 | no |
| dj | -1 | no |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| aj | no | no |
| bj | no | no |
And the relations
| type | way:from | way:to | node:via | restriction | except |
| restriction | sj | aj | j | no_left_turn | bicycle |
| restriction | sj | bj | j | no_left_turn | |
| restriction | sj | cj | j | no_right_turn | |
| restriction | sj | dj | j | no_right_turn | bicycle |
And the relations
| type | way:from | way:to | node:via | restriction | except |
| restriction | sj | aj | j | only_straight_on | bicycle |
When I route I should get
| from | to | route |
| s | a | sj,aj |
| s | b | sj,bj |
| s | c | sj,cj |
| s | d | sj,dj |
When I route I should get
| from | to | route |
| s | a | sj,aj |
| s | b | sj,bj |
@except
Scenario: Bike - Except tag and on only_ restrictions
Given the node map
| a | | b |
| | j | |
| | s | |
@except
Scenario: Bike - Multiple except tag values
Given the node map
| s | j | a |
| | | b |
| | | c |
| | | d |
| | | e |
| | | f |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| aj | no | no |
| bj | no | no |
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 | aj | j | only_straight_on | bicycle |
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,aj |
| s | b | sj,bj |
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 |
@except
Scenario: Bike - Multiple except tag values
Given the node map
| s | j | a |
| | | b |
| | | c |
| | | d |
| | | 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
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
| nodes | junction |
| sa | |
| tb | |
| 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 |
Background:
Given the profile "bicycle"
Scenario: Bicycle - Roundabout instructions
Given the node map
| | | v | | |
| | | d | | |
| s | a | | c | u |
| | | b | | |
| | | t | | |
And the ways
| nodes | junction |
| sa | |
| tb | |
| 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:
http://wiki.openstreetmap.org/wiki/Tag:public_transport%3Dstop_area
Background:
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 |
Background:
Given the profile "bicycle"
Scenario: Bike - railway platforms
Given the node map
| a | b | c | d |
| | s | t | |
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
Given the node map
| a | b | c | d |
| | s | t | |
And the nodes
| node | public_transport |
| c | stop_position |
And the ways
| nodes | highway | railway | bicycle | public_transport |
| abcd | (nil) | train | yes | |
| st | (nil) | (nil) | | platform |
| node | public_transport |
| c | stop_position |
And the relations
| type | public_transport | node:stop | way:platform |
| public_transport | stop_area | c | st |
And the ways
| nodes | highway | railway | bicycle | public_transport |
| abcd | (nil) | train | yes | |
| st | (nil) | (nil) | | platform |
When I route I should get
| from | to | route |
| a | d | abcd |
| s | t | st |
| s | d | /st,.+,abcd/ |
And the relations
| type | public_transport | node:stop | way:platform |
| public_transport | stop_area | c | st |
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
Bringing bikes on trains and subways
Background:
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 |
Background:
Given the profile "bicycle"
@construction
Scenario: Bike - Don't route on railways under construction
Then routability should be
| highway | railway | bicycle | bothw |
| primary | | | x |
| (nil) | construction | yes | |
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 - 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
Background:
Given the profile "turnbot"
Given the profile "turnbot"
Scenario: Bike - turns should incur a delay that depend on the angle
Given the node map
| c | d | e |
| b | j | f |
| a | s | g |
| c | d | e |
| b | j | f |
| a | s | g |
And the ways
| nodes |
| sj |
| ja |
| jb |
| jc |
| jd |
| je |
| jf |
| jg |
| nodes |
| sj |
| ja |
| jb |
| jc |
| jd |
| je |
| jf |
| jg |
When I route I should get
| from | to | route | time | distance |
| s | a | sj,ja | 39s +-1 | 242m +-1 |
| s | b | sj,jb | 30s +-1 | 200m +-1 |
| s | c | sj,jc | 29s +-1 | 242m +-1 |
| s | d | sj,jd | 20s +-1 | 200m +-1 |
| s | e | sj,je | 29s +-1 | 242m +-1 |
| s | f | sj,jf | 30s +-1 | 200m +-1 |
| s | g | sj,jg | 39s +-1 | 242m +-1 |
| from | to | route | time | distance |
| s | a | sj,ja | 39s +-1 | 242m +-1 |
| s | b | sj,jb | 30s +-1 | 200m +-1 |
| s | c | sj,jc | 29s +-1 | 242m +-1 |
| s | d | sj,jd | 20s +-1 | 200m +-1 |
| s | e | sj,je | 29s +-1 | 242m +-1 |
| s | f | sj,jf | 30s +-1 | 200m +-1 |
| s | g | sj,jg | 39s +-1 | 242m +-1 |

View File

@ -1,41 +1,41 @@
@routing @bicycle @way
Feature: Bike - Accessability of different way types
Background:
Given the profile "bicycle"
Background:
Given the profile "bicycle"
Scenario: Bike - Routability of way types
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.
Then routability should be
| highway | bothw |
| (nil) | |
| motorway | |
| motorway_link | |
| trunk | |
| trunk_link | |
| primary | x |
| primary_link | x |
| secondary | x |
| secondary_link | x |
| tertiary | x |
| tertiary_link | x |
| residential | x |
| service | x |
| unclassified | x |
| living_street | x |
| road | x |
| track | x |
| path | x |
| footway | x |
| pedestrian | x |
| steps | x |
| cycleway | x |
| bridleway | |
| pier | |
Scenario: Bike - Routability of way types
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.
Then routability should be
| highway | bothw |
| (nil) | |
| motorway | |
| motorway_link | |
| trunk | |
| trunk_link | |
| primary | x |
| primary_link | x |
| secondary | x |
| secondary_link | x |
| tertiary | x |
| tertiary_link | x |
| residential | x |
| service | x |
| unclassified | x |
| living_street | x |
| road | x |
| track | x |
| path | x |
| footway | x |
| pedestrian | x |
| steps | x |
| cycleway | x |
| bridleway | |
| pier | |
Scenario: Bike - Routability of man_made structures
Then routability should be
| highway | man_made | bothw |
| (nil) | (nil) | |
| (nil) | pier | x |
Scenario: Bike - Routability of man_made structures
Then routability should be
| highway | man_made | bothw |
| (nil) | (nil) | |
| (nil) | pier | x |

View File

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

View File

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

View File

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

View File

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

View File

@ -1,33 +1,33 @@
@routing @car @names
Feature: Car - Street names in instructions
Background:
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 |
Background:
Given the profile "car"
And the ways
| nodes | highway | name |
| ab | tertiary | |
| bcd | residential | |
Scenario: Car - A named street
Given the node map
| a | b |
| | c |
When I route I should get
| from | to | route |
| a | c | tertiary,residential |
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
| 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
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
Background:
Given the profile "car"
Scenario: Car - Simple oneway
Then routability should be
| highway | oneway | forw | backw |
| primary | yes | x | |
Background:
Given the profile "car"
Scenario: Car - Simple reverse oneway
Then routability should be
| highway | oneway | forw | backw |
| primary | -1 | | x |
Scenario: Car - Simple oneway
Then routability should be
| highway | oneway | forw | backw |
| primary | yes | x | |
Scenario: Car - Implied oneways
Then routability should be
| highway | junction | forw | backw |
| motorway | | x | |
| motorway_link | | x | |
| primary | | x | x |
| motorway | roundabout | x | |
| motorway_link | roundabout | x | |
| primary | roundabout | x | |
Scenario: Car - Simple reverse oneway
Then routability should be
| highway | oneway | forw | backw |
| primary | -1 | | x |
Scenario: Car - Overrule implied oneway
Then routability should be
| highway | oneway | forw | backw |
| motorway | no | x | x |
| motorway_link | no | x | x |
Scenario: Car - Implied oneways
Then routability should be
| highway | junction | forw | backw |
| motorway | | x | |
| motorway_link | | x | |
| primary | | x | x |
| motorway | roundabout | x | |
| motorway_link | roundabout | x | |
| primary | roundabout | x | |
Scenario: Car - Around the Block
Given the node map
| a | b |
| d | c |
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 - Overrule implied oneway
Then routability should be
| highway | oneway | forw | backw |
| motorway | no | x | x |
| motorway_link | no | x | x |
Scenario: Car - Two consecutive oneways
Given the node map
| a | b | c |
Scenario: Car - Around the Block
Given the node map
| a | b |
| d | c |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
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
Given the node map
| a | b | c |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
When I route I should get
| from | to | route |
| a | c | ab,bc |
When I route I should get
| from | to | route |
| a | c | ab,bc |

View File

@ -1,251 +1,251 @@
@routing @car @restrictions
Feature: Car - Turn restrictions
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.
Background: Use car routing
Given the profile "car"
@no_turning
Scenario: Car - No left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
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.
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
Background: Use car routing
Given the profile "car"
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_left_turn |
@no_turning
Scenario: Car - No left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | sj,ej |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
@no_turning
Scenario: Car - No right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_left_turn |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | sj,ej |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | no_right_turn |
@no_turning
Scenario: Car - No right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
@no_turning
Scenario: Car - No u-turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | no_right_turn |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | sj,nj |
| s | e | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_u_turn |
@no_turning
Scenario: Car - No u-turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | sj,ej |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
@no_turning
Scenario: Car - Handle any no_* relation
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_u_turn |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | sj,ej |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_weird_zigzags |
@no_turning
Scenario: Car - Handle any no_* relation
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | sj,ej |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
@only_turning
Scenario: Car - Only left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_weird_zigzags |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | sj,ej |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | only_left_turn |
@only_turning
Scenario: Car - Only left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | |
| s | e | |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
@only_turning
Scenario: Car - Only right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | only_left_turn |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
When I route I should get
| from | to | route |
| s | w | sj,wj |
| s | n | |
| s | e | |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | only_right_turn |
@only_turning
Scenario: Car - Only right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
When I route I should get
| from | to | route |
| s | w | |
| s | n | |
| s | e | sj,ej |
@only_turning
Scenario: Car - Only straight on
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | only_right_turn |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_straight_on |
When I route I should get
| from | to | route |
| s | w | |
| s | n | |
| s | e | sj,ej |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | |
@only_turning
Scenario: Car - Only straight on
Given the node map
| | n | |
| w | j | e |
| | s | |
@no_turning
Scenario: Car - Handle any only_* restriction
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_straight_on |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_weird_zigzags |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | |
@no_turning
Scenario: Car - Handle any only_* restriction
Given the node map
| | n | |
| w | j | e |
| | s | |
@except
Scenario: Car - Except tag and on no_ restrictions
Given the node map
| b | x | c |
| a | j | d |
| | s | |
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the ways
| nodes | oneway |
| sj | no |
| xj | -1 |
| aj | -1 |
| bj | no |
| cj | no |
| dj | -1 |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_weird_zigzags |
And the relations
| type | way:from | way:to | node:via | restriction | except |
| restriction | sj | aj | j | no_left_turn | motorcar |
| restriction | sj | bj | j | no_left_turn | |
| restriction | sj | cj | j | no_right_turn | |
| restriction | sj | dj | j | no_right_turn | motorcar |
When I route I should get
| from | to | route |
| s | w | |
| s | n | sj,nj |
| s | e | |
When I route I should get
| from | to | route |
| s | a | sj,aj |
| s | b | |
| s | c | |
| s | d | sj,dj |
@except
Scenario: Car - Except tag and on no_ restrictions
Given the node map
| b | x | c |
| a | j | d |
| | s | |
@except
Scenario: Car - Except tag and on only_ restrictions
Given the node map
| a | | b |
| | j | |
| | s | |
And the ways
| nodes | oneway |
| sj | no |
| xj | -1 |
| aj | -1 |
| bj | no |
| cj | no |
| dj | -1 |
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 | no_left_turn | motorcar |
| restriction | sj | bj | j | no_left_turn | |
| restriction | sj | cj | j | no_right_turn | |
| restriction | sj | dj | j | no_right_turn | motorcar |
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 | |
| s | c | |
| s | d | sj,dj |
When I route I should get
| from | to | route |
| s | a | sj,aj |
| s | b | sj,bj |
@except
Scenario: Car - Except tag and on only_ restrictions
Given the node map
| 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
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
| nodes | junction |
| sa | |
| tb | |
| 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 |
Background:
Given the profile "car"
Scenario: Car - Roundabout instructions
Given the node map
| | | v | | |
| | | d | | |
| s | a | | c | u |
| | | b | | |
| | | t | | |
And the ways
| nodes | junction |
| sa | |
| tb | |
| 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
Feature: Car - Handle ferryshuttle train routes
Background:
Given the profile "car"
Background:
Given the profile "car"
Scenario: Car - Use a ferry route
Given the node map
| a | b | c | | | |
| | | d | | | |
| | | 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 |
Scenario: Car - Use a ferry route
Given the node map
| a | b | c | | | |
| | | d | | | |
| | | 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 |

View File

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

View File

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

View File

@ -2,59 +2,59 @@
Feature: Foot - Oneway streets
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
Background:
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 |
Background:
Given the profile "foot"
Scenario: Foot - Walking and roundabouts
Then routability should be
| junction | bothw |
| roundarout | x |
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 - Oneway:foot tag should not cause walking on big roads
Then routability should be
| highway | oneway:foot | bothw |
| footway | | x |
| motorway | yes | |
| motorway_link | yes | |
| trunk | yes | |
| trunk_link | yes | |
| motorway | no | |
| motorway_link | no | |
| trunk | no | |
| trunk_link | no | |
| motorway | -1 | |
| motorway_link | -1 | |
| trunk | -1 | |
| trunk_link | -1 | |
Scenario: Foot - Walking should respect oneway:foot
Then routability should be
| oneway:foot | oneway | junction | forw | backw |
| yes | | | x | |
| yes | yes | | x | |
| yes | no | | x | |
| yes | -1 | | x | |
| yes | | roundabout | x | |
| no | | | x | x |
| no | yes | | x | x |
| no | no | | x | x |
| no | -1 | | x | x |
| no | | roundabout | x | x |
| -1 | | | | x |
| -1 | yes | | | x |
| -1 | no | | | x |
| -1 | -1 | | | x |
| -1 | | roundabout | | x |
Scenario: Foot - Walking and roundabouts
Then routability should be
| junction | bothw |
| roundarout | x |
Scenario: Foot - Oneway:foot tag should not cause walking on big roads
Then routability should be
| highway | oneway:foot | bothw |
| footway | | x |
| motorway | yes | |
| motorway_link | yes | |
| trunk | yes | |
| trunk_link | yes | |
| motorway | no | |
| motorway_link | no | |
| trunk | no | |
| trunk_link | no | |
| motorway | -1 | |
| motorway_link | -1 | |
| trunk | -1 | |
| trunk_link | -1 | |
Scenario: Foot - Walking should respect oneway:foot
Then routability should be
| oneway:foot | oneway | junction | forw | backw |
| yes | | | x | |
| yes | yes | | x | |
| yes | no | | x | |
| yes | -1 | | x | |
| yes | | roundabout | x | |
| no | | | x | x |
| no | yes | | x | x |
| no | no | | x | x |
| no | -1 | | x | 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
Feature: Foot - Accessability of different way types
Background:
Given the profile "foot"
Background:
Given the profile "foot"
Scenario: Foot - Basic access
Then routability should be
| highway | forw |
| motorway | |
| motorway_link | |
| trunk | |
| trunk_link | |
| primary | x |
| primary_link | x |
| secondary | x |
| secondary_link | x |
| tertiary | x |
| tertiary_link | x |
| residential | x |
| service | x |
| unclassified | x |
| living_street | x |
| road | x |
| track | x |
| path | x |
| footway | x |
| pedestrian | x |
| steps | x |
| pier | x |
| cycleway | |
| bridleway | |
Scenario: Foot - Basic access
Then routability should be
| highway | forw |
| motorway | |
| motorway_link | |
| trunk | |
| trunk_link | |
| primary | x |
| primary_link | x |
| secondary | x |
| secondary_link | x |
| tertiary | x |
| tertiary_link | x |
| residential | x |
| service | x |
| unclassified | x |
| living_street | x |
| road | x |
| track | x |
| path | x |
| footway | x |
| pedestrian | x |
| steps | x |
| pier | x |
| cycleway | |
| bridleway | |

View File

@ -1,79 +1,79 @@
@routing @weird @todo
Feature: Weird routings discovered
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Routing on a oneway roundabout
Given the node map
| | d | c | |
| e | | | b |
| f | | | a |
| | g | h | |
Scenario: Routing on a oneway roundabout
Given the node map
| | d | c | |
| e | | | b |
| f | | | a |
| | g | h | |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
When I route I should get
| from | to | route |
| a | b | ab |
| b | c | bc |
| c | d | cd |
| d | e | de |
| e | f | ef |
| f | g | fg |
| g | h | gh |
| h | a | ha |
| b | a | bc,cd,de,ef,fg,gh,ha |
| c | b | cd,de,ef,fg,gh,ha,ab |
| d | c | de,ef,fg,gh,ha,ab,bc |
| e | d | ef,fg,gh,ha,ab,bc,cd |
| f | e | fg,gh,ha,ab,bc,cd,de |
| g | f | gh,ha,ab,bc,cd,de,ef |
| h | g | ha,ab,bc,cd,de,ef,fg |
| a | h | ab,bc,cd,de,ef,fg,gh |
When I route I should get
| from | to | route |
| a | b | ab |
| b | c | bc |
| c | d | cd |
| d | e | de |
| e | f | ef |
| f | g | fg |
| g | h | gh |
| h | a | ha |
| b | a | bc,cd,de,ef,fg,gh,ha |
| c | b | cd,de,ef,fg,gh,ha,ab |
| d | c | de,ef,fg,gh,ha,ab,bc |
| e | d | ef,fg,gh,ha,ab,bc,cd |
| f | e | fg,gh,ha,ab,bc,cd,de |
| g | f | gh,ha,ab,bc,cd,de,ef |
| h | g | ha,ab,bc,cd,de,ef,fg |
| a | h | ab,bc,cd,de,ef,fg,gh |
Scenario: Routing on a oneway roundabout
Given the node map
| | d | c | |
| e | | | b |
| f | | | a |
| | g | h | |
Scenario: Routing on a oneway roundabout
Given the node map
| | d | c | |
| e | | | b |
| f | | | a |
| | g | h | |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
When I route I should get
| from | to | route |
| a | b | ab |
| b | c | bc |
| c | d | cd |
| d | e | de |
| e | f | ef |
| f | g | fg |
| g | h | gh |
| h | a | ha |
| b | a | bc,cd,de,ef,fg,gh,ha |
| c | b | cd,de,ef,fg,gh,ha,ab |
| d | c | de,ef,fg,gh,ha,ab,bc |
| e | d | ef,fg,gh,ha,ab,bc,cd |
| f | e | fg,gh,ha,ab,bc,cd,de |
| g | f | gh,ha,ab,bc,cd,de,ef |
| h | g | ha,ab,bc,cd,de,ef,fg |
| a | h | ab,bc,cd,de,ef,fg,gh |
When I route I should get
| from | to | route |
| a | b | ab |
| b | c | bc |
| c | d | cd |
| d | e | de |
| e | f | ef |
| f | g | fg |
| g | h | gh |
| h | a | ha |
| b | a | bc,cd,de,ef,fg,gh,ha |
| c | b | cd,de,ef,fg,gh,ha,ab |
| d | c | de,ef,fg,gh,ha,ab,bc |
| e | d | ef,fg,gh,ha,ab,bc,cd |
| f | e | fg,gh,ha,ab,bc,cd,de |
| g | f | gh,ha,ab,bc,cd,de,ef |
| h | g | ha,ab,bc,cd,de,ef,fg |
| 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
Given the node map
| | | 0 | c | 1 | | |
| | | | | | | |
| 7 | | | n | | | 2 |
| a | | k | x | m | | b |
| 6 | | | l | | | 3 |
| | | | | | | |
| | | 5 | d | 4 | | |
| | | 0 | c | 1 | | |
| | | | | | | |
| 7 | | | n | | | 2 |
| a | | k | x | m | | b |
| 6 | | | l | | | 3 |
| | | | | | | |
| | | 5 | d | 4 | | |
And the ways
| nodes |
| axb |
| cxd |
| nodes |
| axb |
| cxd |
When I request locate I should get
| in | out |
| 0 | c |
| 1 | c |
| 2 | b |
| 3 | b |
| 4 | d |
| 5 | d |
| 6 | a |
| 7 | a |
| a | a |
| b | b |
| c | c |
| d | d |
| k | x |
| l | x |
| m | x |
| n | x |
| in | out |
| 0 | c |
| 1 | c |
| 2 | b |
| 3 | b |
| 4 | d |
| 5 | d |
| 6 | a |
| 7 | a |
| a | a |
| b | b |
| c | c |
| d | d |
| k | x |
| l | x |
| m | x |
| n | x |
Scenario: Locate - inside a triangle
Given the node map
| | | | | | c | | | | | |
| | | | | | 7 | | | | | |
| | | | y | | | | z | | | |
| | | 5 | | 0 | | 1 | | 8 | | |
| 6 | | | 2 | | 3 | | 4 | | | 9 |
| a | | | x | | u | | w | | | b |
| | | | | | c | | | | | |
| | | | | | 7 | | | | | |
| | | | y | | | | z | | | |
| | | 5 | | 0 | | 1 | | 8 | | |
| 6 | | | 2 | | 3 | | 4 | | | 9 |
| a | | | x | | u | | w | | | b |
And the ways
| nodes |
| ab |
| bc |
| ca |
| nodes |
| ab |
| bc |
| ca |
When I request locate I should get
| in | out |
| 0 | c |
| 1 | c |
| 2 | a |
| 3 | c |
| 4 | b |
| 5 | a |
| 6 | a |
| 7 | c |
| 8 | b |
| 9 | b |
| x | a |
| y | c |
| z | c |
| w | b |
| in | out |
| 0 | c |
| 1 | c |
| 2 | a |
| 3 | c |
| 4 | b |
| 5 | a |
| 6 | a |
| 7 | c |
| 8 | b |
| 9 | b |
| x | a |
| y | c |
| z | c |
| w | b |
Scenario: Nearest - easy-west way
Given the node map
| 3 | 4 | | 5 | 6 |
| 2 | a | x | b | 7 |
| 1 | 0 | | 9 | 8 |
| 3 | 4 | | 5 | 6 |
| 2 | a | x | b | 7 |
| 1 | 0 | | 9 | 8 |
And the ways
| nodes |
| ab |
| nodes |
| ab |
When I request locate I should get
| in | out |
| 0 | a |
| 1 | a |
| 2 | a |
| 3 | a |
| 4 | a |
| 5 | b |
| 6 | b |
| 7 | b |
| 8 | b |
| 9 | b |
| in | out |
| 0 | a |
| 1 | a |
| 2 | a |
| 3 | a |
| 4 | a |
| 5 | b |
| 6 | b |
| 7 | b |
| 8 | b |
| 9 | b |
Scenario: Nearest - north-south way
Given the node map
| 1 | 2 | 3 |
| 0 | a | 4 |
| | x | |
| 9 | b | 5 |
| 8 | 7 | 6 |
| 1 | 2 | 3 |
| 0 | a | 4 |
| | x | |
| 9 | b | 5 |
| 8 | 7 | 6 |
And the ways
| nodes |
| ab |
| nodes |
| ab |
When I request locate I should get
| in | out |
| 0 | a |
| 1 | a |
| 2 | a |
| 3 | a |
| 4 | a |
| 5 | b |
| 6 | b |
| 7 | b |
| 8 | b |
| 9 | b |
| in | out |
| 0 | a |
| 1 | a |
| 2 | a |
| 3 | a |
| 4 | a |
| 5 | b |
| 6 | b |
| 7 | b |
| 8 | b |
| 9 | b |
Scenario: Nearest - diagonal 1
Given the node map
| 2 | | 3 | | | |
| | a | | 4 | | |
| 1 | | x | | 5 | |
| | 0 | | y | | 6 |
| | | 9 | | b | |
| | | | 8 | | 7 |
| 2 | | 3 | | | |
| | a | | 4 | | |
| 1 | | x | | 5 | |
| | 0 | | y | | 6 |
| | | 9 | | b | |
| | | | 8 | | 7 |
And the ways
| nodes |
| axyb |
| nodes |
| axyb |
When I request locate I should get
| in | out |
| 0 | x |
| 1 | a |
| 2 | a |
| 3 | a |
| 4 | x |
| 5 | y |
| 6 | b |
| 7 | b |
| 8 | b |
| 9 | y |
| a | a |
| b | b |
| x | x |
| y | y |
| in | out |
| 0 | x |
| 1 | a |
| 2 | a |
| 3 | a |
| 4 | x |
| 5 | y |
| 6 | b |
| 7 | b |
| 8 | b |
| 9 | y |
| a | a |
| b | b |
| x | x |
| y | y |
Scenario: Nearest - diagonal 2
Given the node map
| | | | 6 | | 7 |
| | | 5 | | b | |
| | 4 | | y | | 8 |
| 3 | | x | | 9 | |
| | a | | 0 | | |
| 2 | | 1 | | | |
| | | | 6 | | 7 |
| | | 5 | | b | |
| | 4 | | y | | 8 |
| 3 | | x | | 9 | |
| | a | | 0 | | |
| 2 | | 1 | | | |
And the ways
| nodes |
| ab |
When I request nearest I should get
| in | out |
| 0 | x |
| 1 | a |
| 2 | a |
| 3 | a |
| 4 | x |
| 5 | y |
| 6 | b |
| 7 | b |
| 8 | b |
| 9 | y |
| a | a |
| b | b |
| x | x |
| y | y |
| in | out |
| 0 | x |
| 1 | a |
| 2 | a |
| 3 | a |
| 4 | x |
| 5 | y |
| 6 | b |
| 7 | b |
| 8 | b |
| 9 | y |
| a | a |
| b | b |
| x | x |
| y | y |
Scenario: Locate - High lat/lon
Scenario: Locate - High lat/lon
Given the node locations
| node | lat | lon |
| a | -85 | -180 |
| b | 0 | 0 |
| c | 85 | 180 |
| x | -84 | -180 |
| y | 84 | 180 |
| node | lat | lon |
| a | -85 | -180 |
| b | 0 | 0 |
| c | 85 | 180 |
| x | -84 | -180 |
| y | 84 | 180 |
And the ways
| nodes |
| abc |
| nodes |
| abc |
When I request locate I should get
| in | out |
| x | a |
| y | c |
| in | out |
| x | a |
| y | c |

View File

@ -1,78 +1,78 @@
@nearest
Feature: Locating Nearest node on a Way - pick closest way
Background:
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 | |
Background:
Given the profile "testbot"
And the ways
| nodes |
| axb |
| cxd |
When I request nearest I should get
| in | out |
| 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 |
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
| nodes |
| abc |
| nodes |
| axb |
| cxd |
When I request nearest I should get
| in | out |
| x | a |
| y | c |
| v | b |
| w | b |
| in | out |
| 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
| 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
Feature: Locating Nearest node on a Way - basic projection onto way
Background:
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 |
Background:
Given the profile "testbot"
And the ways
| nodes |
| ab |
Scenario: Nearest - easy-west way
Given the node map
| 0 | 1 | 2 | 3 | 4 |
| | a | x | b | |
| 5 | 6 | 7 | 8 | 9 |
When I request nearest I should get
| in | out |
| 0 | a |
| 1 | a |
| 2 | x |
| 3 | b |
| 4 | b |
| 5 | a |
| 6 | a |
| 7 | x |
| 8 | b |
| 9 | b |
And the ways
| nodes |
| ab |
Scenario: Nearest - north-south way
Given the node map
| 0 | | 5 |
| 1 | a | 6 |
| 2 | x | 7 |
| 3 | b | 8 |
| 4 | | 9 |
And the ways
| nodes |
| ab |
When I request nearest I should get
| in | out |
| 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
| in | out |
| 0 | a |
| 1 | a |
| 2 | x |
| 3 | b |
| 4 | b |
| 5 | a |
| 6 | a |
| 7 | x |
| 8 | b |
| 9 | b |
Scenario: Nearest - north-south way
Given the node map
| 0 | | 5 |
| 1 | a | 6 |
| 2 | x | 7 |
| 3 | b | 8 |
| 4 | | 9 |
Scenario: Nearest - diagonal 1
Given the node map
| 8 | | 4 | | | |
| | a | | 5 | | |
| 0 | | x | | 6 | |
| | 1 | | y | | 7 |
| | | 2 | | b | |
| | | | 3 | | 9 |
And the ways
| nodes |
| ab |
And the ways
| nodes |
| ab |
When I request nearest I should get
| in | out |
| 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
| in | out |
| 0 | a |
| 1 | x |
| 2 | y |
| 3 | b |
| 4 | a |
| 5 | x |
| 6 | y |
| 7 | b |
| 8 | a |
| 9 | b |
Scenario: Nearest - diagonal 1
Given the node map
| 8 | | 4 | | | |
| | a | | 5 | | |
| 0 | | x | | 6 | |
| | 1 | | y | | 7 |
| | | 2 | | b | |
| | | | 3 | | 9 |
Scenario: Nearest - diagonal 2
Given the node map
| | | | 3 | | 9 |
| | | 2 | | b | |
| | 1 | | y | | 7 |
| 0 | | x | | 6 | |
| | a | | 5 | | |
| 8 | | 4 | | | |
And the ways
| nodes |
| ab |
And the ways
| nodes |
| 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 |
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 |
Scenario: Nearest - diagonal 2
Given the node map
| | | | 3 | | 9 |
| | | 2 | | b | |
| | 1 | | y | | 7 |
| 0 | | x | | 6 | |
| | a | | 5 | | |
| 8 | | 4 | | | |
And the ways
| nodes |
| 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
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
| nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
Background:
Given the profile "testbot"
When I route 100 times I should get
| from | to | route |
| x | h | xh |
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 |
Scenario: Stress - 10km star, request 8 routes
#osrm-routed hangs sometimes
Given a grid size of 10000 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
And the ways
| nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
And the ways
| 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 | h | xh |
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 |
Scenario: Stress - 10km star, request 8 routes
#osrm-routed hangs sometimes
Given a grid size of 10000 meters
Given the node map
| h | a | b |
| g | x | c |
| 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 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
Feature: Handle bad data in a graceful manner
Background:
Given the profile "testbot"
Scenario: Empty dataset
Given the node map
| |
Background:
Given the profile "testbot"
Given the ways
| nodes |
When I preprocess data
Then "osrm-extract" should return code 255
Scenario: Empty dataset
Given the node map
| |
Scenario: Only dead-end oneways
Given the node map
| a | b | c | d | e |
Given the ways
| nodes |
Given the ways
| nodes | oneway |
| abcde | yes |
When I preprocess data
Then "osrm-extract" should return code 255
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
Scenario: Start/end point at the same location
Given the node map
| a | b |
| 1 | 2 |
Scenario: Start/end point at the same location
Given the node map
| a | b |
| 1 | 2 |
Given the ways
| nodes |
| ab |
Given the ways
| nodes |
| ab |
When I route I should get
| from | to | route |
| a | a | |
| b | b | |
| 1 | 1 | |
| 2 | 2 | |
When I route I should get
| from | to | route |
| a | a | |
| b | b | |
| 1 | 1 | |
| 2 | 2 | |
@poles
Scenario: Routing close to the north/south pole
Mercator is undefined close to the poles.
All nodes and request with latitude to close to either of the poles should therefore be ignored.
@poles
Scenario: Routing close to the north/south pole
Mercator is undefined close to the poles.
All nodes and request with latitude to close to either of the poles should therefore be ignored.
Given the node locations
| node | lat | lon |
| a | 89 | 0 |
| b | 87 | 0 |
| c | 82 | 0 |
| d | 80 | 0 |
| e | 78 | 0 |
| k | -78 | 0 |
| l | -80 | 0 |
| m | -82 | 0 |
# | n | -87 | 0 |
# | o | -89 | 0 |
Given the node locations
| node | lat | lon |
| a | 89 | 0 |
| b | 87 | 0 |
| c | 82 | 0 |
| d | 80 | 0 |
| e | 78 | 0 |
| k | -78 | 0 |
| l | -80 | 0 |
| m | -82 | 0 |
# | n | -87 | 0 |
# | o | -89 | 0 |
And the ways
| nodes |
# | ab |
| bc |
| cd |
| de |
| kl |
| lm |
# | mn |
# | no |
And the ways
| nodes |
# | ab |
| bc |
| cd |
| de |
| kl |
| lm |
# | mn |
# | no |
When I route I should get
| from | to | route |
# | a | b | cd |
# | b | c | cd |
# | a | d | cd |
# | c | d | cd |
| d | e | de |
# | k | l | kl |
# | l | m | lm |
# | o | l | lm |
# | n | m | lm |
# | o | n | lm |
When I route I should get
| from | to | route |
# | a | b | cd |
# | b | c | cd |
# | a | d | cd |
# | c | d | cd |
| d | e | de |
# | k | l | kl |
# | l | m | lm |
# | o | l | lm |
# | n | m | lm |
# | o | n | lm |

View File

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

View File

@ -1,141 +1,141 @@
@routing @bearing
Feature: Compass bearing
Background:
Given the profile "testbot"
Scenario: Bearing when going northwest
Given the node map
| b | |
| | a |
And the ways
| nodes |
| ab |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route | compass | bearing |
| a | b | ab | NW | 315 |
Scenario: Bearing when going northwest
Given the node map
| b | |
| | a |
Scenario: Bearing when going west
Given the node map
| b | a |
And the ways
| nodes |
| ab |
And the ways
| nodes |
| ab |
When I route I should get
| from | to | route | compass | bearing |
| a | b | ab | NW | 315 |
When I route I should get
| from | to | route | compass | bearing |
| a | b | ab | W | 270 |
Scenario: Bearing when going west
Given the node map
| b | a |
Scenario: Bearing af 45 degree intervals
Given the node map
| b | a | h |
| c | x | g |
| d | e | f |
And the ways
| nodes |
| ab |
And the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
When I route I should get
| from | to | route | compass | bearing |
| a | b | ab | W | 270 |
When I route I should get
| from | to | route | compass | bearing |
| x | a | xa | N | 0 |
| x | b | xb | NW | 315 |
| x | c | xc | W | 270 |
| 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 af 45 degree intervals
Given the node map
| b | a | h |
| c | x | g |
| d | e | f |
Scenario: Bearing in a roundabout
Given the node map
| | d | c | |
| e | | | b |
| f | | | a |
| | g | h | |
And the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
When I route I should get
| from | to | route | compass | bearing |
| x | a | xa | N | 0 |
| x | b | xb | NW | 315 |
| x | c | xc | W | 270 |
| 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 |
When I route I should get
| from | to | route | compass | bearing |
| c | b | cd,de,ef,fg,gh,ha,ab | W,SW,S,SE,E,NE,N | 270,225,180,135,90,45,0 |
| g | f | gh,ha,ab,bc,cd,de,ef | E,NE,N,NW,W,SW,S | 90,45,0,315,270,225,180 |
Scenario: Bearing in a roundabout
Given the node map
| | d | c | |
| e | | | b |
| f | | | a |
| | g | h | |
Scenario: Bearing should stay constant when zig-zagging
Given the node map
| b | d | f | h |
| a | c | e | g |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
And the ways
| nodes |
| ab |
| bc |
| cd |
| de |
| ef |
| fg |
| gh |
When I route I should get
| from | to | route | compass | bearing |
| c | b | cd,de,ef,fg,gh,ha,ab | W,SW,S,SE,E,NE,N | 270,225,180,135,90,45,0 |
| g | f | gh,ha,ab,bc,cd,de,ef | E,NE,N,NW,W,SW,S | 90,45,0,315,270,225,180 |
When I route I should get
| from | to | route | compass | bearing |
| a | h | ab,bc,cd,de,ef,fg,gh | N,SE,N,SE,N,SE,N | 0,135,0,135,0,135,0 |
Scenario: Bearings on an east-west way.
Given the node map
| a | b | c | d | e | f |
Scenario: Bearing should stay constant when zig-zagging
Given the node map
| b | d | f | h |
| a | c | e | g |
And the ways
| nodes |
| abcdef |
And the ways
| nodes |
| ab |
| bc |
| cd |
| de |
| ef |
| fg |
| gh |
When I route I should get
| from | to | route | compass | bearing |
| a | b | abcdef | E | 90 |
| a | c | abcdef | E | 90 |
| a | d | abcdef | E | 90 |
| a | e | abcdef | E | 90 |
| a | f | abcdef | E | 90 |
| b | a | abcdef | W | 270 |
| b | c | abcdef | E | 90 |
| b | d | abcdef | E | 90 |
| b | e | abcdef | E | 90 |
| b | f | abcdef | E | 90 |
| c | a | abcdef | W | 270 |
| c | b | abcdef | W | 270 |
| c | d | abcdef | E | 90 |
| c | e | abcdef | E | 90 |
| c | f | abcdef | E | 90 |
| d | a | abcdef | W | 270 |
| d | b | 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 |
When I route I should get
| from | to | route | compass | bearing |
| a | h | ab,bc,cd,de,ef,fg,gh | N,SE,N,SE,N,SE,N | 0,135,0,135,0,135,0 |
Scenario: Bearings on an east-west way.
Given the node map
| a | b | c | d | e | f |
And the ways
| nodes |
| abcdef |
When I route I should get
| from | to | route | compass | bearing |
| a | b | abcdef | E | 90 |
| a | c | abcdef | E | 90 |
| a | d | abcdef | E | 90 |
| a | e | abcdef | E | 90 |
| a | f | abcdef | E | 90 |
| b | a | abcdef | W | 270 |
| b | c | abcdef | E | 90 |
| b | d | abcdef | E | 90 |
| b | e | abcdef | E | 90 |
| b | f | abcdef | E | 90 |
| c | a | abcdef | W | 270 |
| c | b | abcdef | W | 270 |
| c | d | abcdef | E | 90 |
| c | e | abcdef | E | 90 |
| c | f | abcdef | E | 90 |
| d | a | abcdef | W | 270 |
| d | b | 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
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 |
Feature: Bearing parameter
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
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
| 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 |
| a | | | | | 0 | | | | | b |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| da | yes |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| da | yes |
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | b | 10 | ab | 90 |
| 0 | b | 90 | ab | 90 |
| 0 | b | 170 | ab | 90 |
| 0 | b | 190 | cd,da,ab | 270 |
| 0 | b | 270 | cd,da,ab | 270 |
| 0 | b | 350 | cd,da,ab | 270 |
| 1 | d | 10 | cd | 90 |
| 1 | d | 90 | cd | 90 |
| 1 | d | 170 | cd | 90 |
| 1 | d | 190 | ab,bc,cd | 270 |
| 1 | d | 270 | ab,bc,cd | 270 |
| 1 | d | 350 | ab,bc,cd | 270 |
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | b | 10 | ab | 90 |
| 0 | b | 90 | ab | 90 |
| 0 | b | 170 | ab | 90 |
| 0 | b | 190 | cd,da,ab | 270 |
| 0 | b | 270 | cd,da,ab | 270 |
| 0 | b | 350 | cd,da,ab | 270 |
| 1 | d | 10 | cd | 90 |
| 1 | d | 90 | cd | 90 |
| 1 | d | 170 | cd | 90 |
| 1 | d | 190 | ab,bc,cd | 270 |
| 1 | d | 270 | ab,bc,cd | 270 |
| 1 | d | 350 | ab,bc,cd | 270 |
Scenario: Testbot - Initial bearing in all direction
Given the node map
| h | | | a | | | b |
| | | | | | | |
| | | p | i | j | | |
| g | | o | 0 | k | | c |
| | | n | m | l | | |
| | | | | | | |
| 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 |
Scenario: Testbot - Initial bearing in all direction
Given the node map
| h | | | a | | | b |
| | | | | | | |
| | | p | i | j | | |
| g | | o | 0 | k | | c |
| | | n | m | l | | |
| | | | | | | |
| f | | | e | | | d |
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 |
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
| 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
Feature: Testbot - Things that looks like bugs
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Testbot - Triangle problem
Given the node map
| | | | d |
| a | b | c | |
| | | | e |
Given the node map
| | | | d |
| a | b | c | |
| | | | e |
And the ways
| nodes | highway | oneway |
| abc | primary | |
| cd | primary | yes |
| ce | river | |
| de | primary | |
And the ways
| nodes | highway | oneway |
| abc | primary | |
| cd | primary | yes |
| ce | river | |
| de | primary | |
When I route I should get
| from | to | route |
| d | c | de,ce |
| e | d | de |
When I route I should get
| from | to | route |
| d | c | de,ce |
| e | d | de |

View File

@ -1,228 +1,228 @@
@routing @distance
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
| nodes |
| ab |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route | distance |
| a | b | ab | 100m +- 2 |
Scenario: 100m distance
Given a grid size of 100 meters
Given the node map
| a | b |
Scenario: Distance should equal sum of segments, leftwinded
Given the node map
| e | |
| d | c |
| a | b |
And the ways
| nodes |
| ab |
And the ways
| nodes |
| abcde |
When I route I should get
| from | to | route | distance |
| a | b | ab | 100m +- 2 |
When I route I should get
| from | to | route | distance |
| a | d | abcde | 300m +-2 |
Scenario: Distance should equal sum of segments, leftwinded
Given the node map
| e | |
| d | c |
| a | b |
Scenario: Distance should equal sum of segments, rightwinded
Given the node map
| | e |
| c | d |
| b | a |
And the ways
| nodes |
| abcde |
And the ways
| nodes |
| abcde |
When I route I should get
| from | to | route | distance |
| a | d | abcde | 300m +-2 |
When I route I should get
| from | to | route | distance |
| a | d | abcde | 300m +-2 |
Scenario: Distance should equal sum of segments, rightwinded
Given the node map
| | e |
| c | d |
| b | a |
Scenario: 10m distances
Given a grid size of 10 meters
Given the node map
| a | b |
| | c |
And the ways
| nodes |
| abcde |
And the ways
| nodes |
| abc |
When I route I should get
| from | to | route | distance |
| a | d | abcde | 300m +-2 |
When I route I should get
| from | to | route | distance |
| 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 |
Scenario: 10m distances
Given a grid size of 10 meters
Given the node map
| a | b |
| | c |
Scenario: 100m distances
Given a grid size of 100 meters
Given the node map
| a | b |
| | c |
And the ways
| nodes |
| abc |
And the ways
| nodes |
| abc |
When I route I should get
| from | to | route | distance |
| 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
| from | to | route | distance |
| 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 |
Scenario: 100m distances
Given a grid size of 100 meters
Given the node map
| a | b |
| | c |
Scenario: 1km distance
Given a grid size of 1000 meters
Given the node map
| a | b |
| | c |
And the ways
| nodes |
| abc |
And the ways
| nodes |
| abc |
When I route I should get
| from | to | route | distance |
| 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
| from | to | route | distance |
| 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 |
Scenario: 1km distance
Given a grid size of 1000 meters
Given the node map
| a | b |
| | c |
Scenario: Distance of a winding south-north path
Given a grid size of 10 meters
Given the node map
| a | b |
| d | c |
| e | f |
| h | g |
And the ways
| nodes |
| abc |
And the ways
| nodes |
| abcdefgh |
When I route I should get
| from | to | route | distance |
| 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
| from | to | route | distance |
| a | b | abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 |
| 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 |
Scenario: Distance of a winding south-north path
Given a grid size of 10 meters
Given the node map
| a | b |
| d | c |
| e | f |
| h | g |
And the ways
| nodes |
| abcdefgh |
And the ways
| nodes |
| abcdefgh |
When I route I should get
| from | to | route | distance |
| a | b | abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 |
When I route I should get
| from | to | route | distance |
| a | b | abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 |
Scenario: Geometric distances
Given a grid size of 1000 meters
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 |
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 |
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 |
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 |
And the ways
| nodes |
| abcdefgh |
@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 |
When I route I should get
| from | to | route | distance |
| a | b | abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 |
And the ways
| nodes |
| abcdefghijklmnopqrst |
Scenario: Geometric distances
Given a grid size of 1000 meters
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
| from | to | route | distance |
| a | t | abcdefghijklmnopqrst | 133m +-2 |
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
| 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
Feature: Durations
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Duration of ways
Given the node map
| a | b | | | | f |
| | | | e | | |
| | c | | | d | |
Given the node map
| a | b | | | | f |
| | | | e | | |
| | c | | | d | |
And the ways
| nodes | highway | duration |
| ab | primary | 0:01 |
| bc | primary | 0:10 |
| cd | primary | 1:00 |
| de | primary | 10:00 |
| ef | primary | 01:02:03 |
And the ways
| nodes | highway | duration |
| ab | primary | 0:01 |
| bc | primary | 0:10 |
| cd | primary | 1:00 |
| de | primary | 10:00 |
| ef | primary | 01:02:03 |
When I route I should get
| from | to | route | distance | time |
| a | b | ab | 100m +-1 | 60s +-1 |
| b | c | bc | 200m +-1 | 600s +-1 |
| c | d | cd | 300m +-1 | 3600s +-1 |
| d | e | de | 141m +-2 | 36000s +-1 |
| e | f | ef | 224m +-2 | 3723s +-1 |
When I route I should get
| from | to | route | distance | time |
| a | b | ab | 100m +-1 | 60s +-1 |
| b | c | bc | 200m +-1 | 600s +-1 |
| c | d | cd | 300m +-1 | 3600s +-1 |
| d | e | de | 141m +-2 | 36000s +-1 |
| e | f | ef | 224m +-2 | 3723s +-1 |
@todo
Scenario: Partial duration of ways
Given the node map
| a | b | | c |
Given the node map
| a | b | | c |
And the ways
| nodes | highway | duration |
| abc | primary | 0:01 |
And the ways
| nodes | highway | duration |
| abc | primary | 0:01 |
When I route I should get
| from | to | route | distance | time |
| a | c | abc | 300m +-1 | 60s +-1 |
| a | b | ab | 100m +-1 | 20s +-1 |
| b | c | bc | 200m +-1 | 40s +-1 |
When I route I should get
| from | to | route | distance | time |
| a | c | abc | 300m +-1 | 60s +-1 |
| a | b | ab | 100m +-1 | 20s +-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:
# https://github.com/DennisOSRM/Project-OSRM/wiki/Processing-Flow
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Testbot - Processing Flow
Given the node map
| | | | d |
| a | b | c | |
| | | | e |
Given the node map
| | | | d |
| a | b | c | |
| | | | e |
And the ways
| nodes | highway | oneway |
| abc | primary | |
| cd | primary | yes |
| ce | river | |
| de | primary | |
And the ways
| nodes | highway | oneway |
| abc | primary | |
| cd | primary | yes |
| ce | river | |
| de | primary | |
When I route I should get
| from | to | route |
| a | b | abc |
| a | c | abc |
| a | d | abc,cd |
| a | e | abc,ce |
| b | a | abc |
| b | c | abc |
| b | d | abc,cd |
| b | e | abc,ce |
| d | a | de,ce,abc |
| d | b | de,ce,abc |
| d | e | de |
| e | a | ce,abc |
| e | b | ce,abc |
| e | c | ce |
When I route I should get
| from | to | route |
| a | b | abc |
| a | c | abc |
| a | d | abc,cd |
| a | e | abc,ce |
| b | a | abc |
| b | c | abc |
| b | d | abc,cd |
| b | e | abc,ce |
| d | a | de,ce,abc |
| d | b | de,ce,abc |
| d | e | de |
| e | a | ce,abc |
| e | b | ce,abc |
| e | c | ce |

View File

@ -1,38 +1,38 @@
@routing @fastest
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
| nodes | highway |
| xa | primary |
| by | primary |
| atb | primary |
| asb | primary |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route |
| x | y | xa,atb,by |
| y | x | by,atb,xa |
Scenario: Pick the geometrically shortest route, way types being equal
Given the node map
| | | s | | |
| | | t | | |
| x | a | | b | y |
Scenario: Pick the fastest route, even when it's longer
Given the node map
| | p | |
| a | s | b |
And the ways
| nodes | highway |
| xa | primary |
| by | primary |
| atb | primary |
| asb | primary |
And the ways
| nodes | highway |
| apb | primary |
| asb | secondary |
When I route I should get
| from | to | route |
| x | y | xa,atb,by |
| y | x | by,atb,xa |
When I route I should get
| from | to | route |
| a | b | apb |
| b | a | apb |
Scenario: Pick the fastest route, even when it's longer
Given the node map
| | p | |
| 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
Feature: Testbot - Handle ferry routes
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Testbot - Ferry duration, single node
Given the node map
| a | b | c | d |
| e | f | g | h |
| i | j | k | l |
| m | n | o | p |
| q | r | s | t |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| ij | primary | | |
| kl | primary | | |
| mn | primary | | |
| op | primary | | |
| qr | primary | | |
| st | primary | | |
| bc | | ferry | 0:01 |
| fg | | ferry | 0:10 |
| jk | | ferry | 1:00 |
| no | | ferry | 24:00 |
| rs | | ferry | 96:00 |
Scenario: Testbot - Ferry duration, single node
Given the node map
| a | b | c | d |
| e | f | g | h |
| i | j | k | l |
| m | n | o | p |
| q | r | s | t |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| ij | primary | | |
| kl | primary | | |
| mn | primary | | |
| op | primary | | |
| qr | primary | | |
| st | primary | | |
| bc | | ferry | 0:01 |
| fg | | ferry | 0:10 |
| jk | | ferry | 1:00 |
| no | | ferry | 24:00 |
| rs | | ferry | 96:00 |
When I route I should get
| from | to | route | time |
| b | c | bc | 60s +-1 |
| f | g | fg | 600s +-1 |
| j | k | jk | 3600s +-1 |
| n | o | no | 86400s +-1 |
| r | s | rs | 345600s +-1 |
| from | to | route | time |
| b | c | bc | 60s +-1 |
| f | g | fg | 600s +-1 |
| j | k | jk | 3600s +-1 |
| n | o | no | 86400s +-1 |
| r | s | rs | 345600s +-1 |
@todo
Scenario: Testbot - Week long ferry routes
Given the node map
| a | b | c | d |
| e | f | g | h |
| i | j | k | l |
Scenario: Testbot - Week long ferry routes
Given the node map
| a | b | c | d |
| e | f | g | h |
| i | j | k | l |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| ij | primary | | |
| kl | primary | | |
| bc | | ferry | 24:00 |
| fg | | ferry | 168:00 |
| jk | | ferry | 720:00 |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| ij | primary | | |
| kl | primary | | |
| bc | | ferry | 24:00 |
| fg | | ferry | 168:00 |
| jk | | ferry | 720:00 |
When I route I should get
| from | to | route | time |
| b | c | bc | 86400s +-1 |
| f | g | fg | 604800s +-1 |
| j | k | jk | 259200s +-1 |
When I route I should get
| from | to | route | time |
| b | c | bc | 86400s +-1 |
| f | g | fg | 604800s +-1 |
| j | k | jk | 259200s +-1 |
Scenario: Testbot - Ferry duration, multiple nodes
Given the node map
| x | | | | | y |
| | a | b | c | d | |
Scenario: Testbot - Ferry duration, multiple nodes
Given the node map
| x | | | | | y |
| | a | b | c | d | |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yd | primary | | |
| ad | | ferry | 1:00 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yd | primary | | |
| 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
Scenario: Testbot - Ferry duration, individual parts, fast
Scenario: Testbot - Ferry duration, individual parts, fast
Given a grid size of 10000 meters
Given the node map
| x | y | | z | | | v |
| a | b | | c | | | d |
Given the node map
| x | y | | z | | | v |
| a | b | | c | | | d |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yb | primary | | |
| zc | primary | | |
| vd | primary | | |
| abcd | | ferry | 0:06 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yb | primary | | |
| zc | primary | | |
| vd | primary | | |
| 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
Scenario: Testbot - Ferry duration, individual parts, slow
Given the node map
| x | y | | z | | | v |
| a | b | | c | | | d |
Scenario: Testbot - Ferry duration, individual parts, slow
Given the node map
| x | y | | z | | | v |
| a | b | | c | | | d |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yb | primary | | |
| zc | primary | | |
| vd | primary | | |
| abcd | | ferry | 1:00 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yb | primary | | |
| zc | primary | | |
| vd | primary | | |
| abcd | | ferry | 1:00 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 3600s ~1% |
| a | b | abcd | 600s ~1% |
| b | c | abcd | 1200s ~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 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 3600s ~1% |
| a | b | abcd | 600s ~1% |
| b | c | abcd | 1200s ~1% |
| c | d | abcd | 1800s ~1% |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| abcd | | ferry | 0:30 |
| defg | | ferry | 0:30 |
Scenario: Testbot - Ferry duration, connected routes
Given the node map
| x | | | | d | | | | y |
| | a | b | c | | e | f | g | t |
When I route I should get
| from | to | route | time |
| a | g | abcd,defg | 3600s +-1 |
| g | a | defg,abcd | 3600s +-1 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| abcd | | ferry | 0:30 |
| defg | | ferry | 0:30 |
Scenario: Testbot - Prefer road when faster than ferry
Given the node map
| x | a | b | c | |
| | | | | d |
| y | g | f | e | |
When I route I should get
| from | to | route | time |
| a | g | abcd,defg | 3600s +-1 |
| g | a | defg,abcd | 3600s +-1 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| xy | primary | | |
| abcd | | ferry | 0:01 |
| defg | | ferry | 0:01 |
Scenario: Testbot - Prefer road when faster than ferry
Given the node map
| x | a | b | c | |
| | | | | d |
| y | g | f | e | |
When I route I should get
| from | to | route | time |
| a | g | xa,xy,yg | 60s +-25% |
| g | a | yg,xy,xa | 60s +-25% |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| xy | primary | | |
| abcd | | ferry | 0:01 |
| defg | | ferry | 0:01 |
Scenario: Testbot - Long winding ferry route
Given the node map
| x | | b | | d | | f | | y |
| | a | | c | | e | | g | |
When I route I should get
| from | to | route | time |
| a | g | xa,xy,yg | 60s +-25% |
| g | a | yg,xy,xa | 60s +-25% |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| abcdefg | | ferry | 6:30 |
Scenario: Testbot - Long winding ferry route
Given the node map
| x | | b | | d | | f | | y |
| | a | | c | | e | | g | |
When I route I should get
| from | to | route | time |
| a | g | abcdefg | 23400s +-1 |
| g | a | abcdefg | 23400s +-1 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| 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
Test the input data descibed on https://github.com/DennisOSRM/Project-OSRM/wiki/Graph-representation
Background:
Given the profile "testbot"
@smallest
Scenario: Graph transformation
Given the node map
| | | d |
| a | b | c |
| | | e |
And the ways
| nodes |
| abc |
| dce |
When I route I should get
| from | to | route |
| a | e | abc,dce |
Background:
Given the profile "testbot"
@smallest
Scenario: Graph transformation
Given the node map
| | | d |
| a | b | c |
| | | e |
And the ways
| nodes |
| abc |
| dce |
When I route I should get
| from | to | route |
| 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
Background:
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 |
Background:
Given the profile "testbot"
And the ways
| nodes | impedance |
| ab | 1.3 |
| asb | 1 |
| bc | 1.5 |
| btc | 1 |
| cd | 0.015 |
| cud | 0.010 |
| de | 150000 |
| dve | 100000 |
Scenario: Use impedance to pick route, even when longer/slower
Given the node map
| | s | | t | | u | | v | |
| a | | b | | c | | d | | e |
When I route I should get
| from | to | route | distance |
| a | b | ab | 200m +-1 |
| 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
| nodes | impedance |
| ab | 1.3 |
| asb | 1 |
| bc | 1.5 |
| btc | 1 |
| cd | 0.015 |
| cud | 0.010 |
| de | 150000 |
| dve | 100000 |
Scenario: Weight should default to 1
Given the node map
| | s | | t | |
| a | | b | | c |
When I route I should get
| from | to | route | distance |
| a | b | ab | 200m +-1 |
| 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
| nodes | impedance |
| ab | 1.40 |
| asb | |
| bc | 1.42 |
| btc | |
Scenario: Weight should default to 1
Given the node map
| | s | | t | |
| a | | b | | c |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | ab |
| b | c | btc |
| c | b | btc |
And the ways
| nodes | impedance |
| ab | 1.40 |
| asb | |
| bc | 1.42 |
| btc | |
Scenario: Use both impedance and speed (multiplied) when picking route
OSRM should not factor speed into impedance internally. However, the profile can choose to do so,
and this test expect the testbot profile to do it.
Given the node map
| | s | | t | |
| a | | b | | c |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | ab |
| b | c | btc |
| c | b | btc |
And the ways
| nodes | impedance | highway |
| ab | 2.80 | primary |
| asb | 1 | secondary |
| bc | 2.84 | primary |
| btc | 1 | secondary |
Scenario: Use both impedance and speed (multiplied) when picking route
OSRM should not factor speed into impedance internally. However, the profile can choose to do so,
and this test expect the testbot profile to do it.
Given the node map
| | s | | t | |
| a | | b | | c |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | ab |
| b | c | btc |
| c | b | btc |
And the ways
| nodes | impedance | highway |
| ab | 2.80 | primary |
| asb | 1 | secondary |
| bc | 2.84 | primary |
| btc | 1 | secondary |
Scenario: Weight should influence neither speed nor travel time.
Given the node map
| a | b | c |
| t | | |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | ab |
| b | c | btc |
| c | b | btc |
And the ways
| nodes |
| ab |
| bc |
| at |
Scenario: Weight should influence neither speed nor travel time.
Given the node map
| a | b | c |
| t | | |
When I route I should get
| 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 |
And the ways
| nodes |
| ab |
| bc |
| at |
When I route I should get
| 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
Feature: Car - Max speed restrictions
Background: Use specific speeds
Given the profile "testbot"
Scenario: Testbot - Respect maxspeeds when lower that way type speed
Given the node map
| a | b | c | d |
Background: Use specific speeds
Given the profile "testbot"
And the ways
| nodes | maxspeed |
| ab | |
| bc | 24 |
| cd | 18 |
Scenario: Testbot - Respect maxspeeds when lower that way type speed
Given the node map
| a | b | c | d |
When I route I should get
| from | to | route | time |
| 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
| nodes | maxspeed |
| ab | |
| bc | 24 |
| cd | 18 |
Scenario: Testbot - Ignore maxspeed when higher than way speed
Given the node map
| a | b | c |
When I route I should get
| from | to | route | time |
| 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
| nodes | maxspeed |
| ab | |
| bc | 200 |
Scenario: Testbot - Ignore maxspeed when higher than way speed
Given the node map
| a | b | c |
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 |
And the ways
| nodes | maxspeed |
| ab | |
| bc | 200 |
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
Scenario: Testbot - Forward/backward maxspeed
Then routability should be
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | 20s +-1 | 20s +-1 |
| 18 | | | 40s +-1 | 40s +-1 |
| | 18 | | 40s +-1 | 20s +-1 |
| | | 18 | 20s +-1 | 40s +-1 |
| 9 | 18 | | 40s +-1 | 80s +-1 |
| 9 | | 18 | 80s +-1 | 40s +-1 |
| 9 | 24 | 18 | 30s +-1 | 40s +-1 |
Then routability should be
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | 20s +-1 | 20s +-1 |
| 18 | | | 40s +-1 | 40s +-1 |
| | 18 | | 40s +-1 | 20s +-1 |
| | | 18 | 20s +-1 | 40s +-1 |
| 9 | 18 | | 40s +-1 | 80s +-1 |
| 9 | | 18 | 80s +-1 | 40s +-1 |
| 9 | 24 | 18 | 30s +-1 | 40s +-1 |

View File

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

View File

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

View File

@ -1,75 +1,75 @@
@routing @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
| nodes | oneway |
| abcd | yes |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route | distance |
| b | c | abcd | 100m +-1 |
| c | b | | |
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 |
Scenario: North-south oneways close to the origin
Given the node locations
| node | lat | lon |
| a | 0 | 0 |
| b | 0 | 0.0008990679362704611 |
| c | 0 | 0.0017981358725409223 |
| d | 0 | 0.0026972038088113833 |
And the ways
| nodes | oneway |
| abcd | yes |
And the ways
| nodes | oneway |
| abcd | yes |
When I route I should get
| from | to | route | distance |
| b | c | abcd | 100m +-1 |
| c | b | | |
When I route I should get
| from | to | route | distance |
| b | c | abcd | 100m +-1 |
| c | b | | |
Scenario: East-west oneways crossing the origin
Given the node locations
| node | lat | lon |
| a | -0.0017981358725409223 | 0 |
| b | -0.0008990679362704611 | 0 |
| c | 0 | 0 |
| d | 0.0008990679362704611 | 0 |
| e | 0.0017981358725409223 | 0 |
Scenario: North-south oneways close to the origin
Given the node locations
| node | lat | lon |
| a | 0 | 0 |
| b | 0 | 0.0008990679362704611 |
| c | 0 | 0.0017981358725409223 |
| d | 0 | 0.0026972038088113833 |
And the ways
| nodes | oneway |
| abcde | yes |
And the ways
| nodes | oneway |
| abcd | yes |
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 |
When I route I should get
| from | to | route | distance |
| b | c | abcd | 100m +-1 |
| c | b | | |
And the ways
| nodes | oneway |
| abcde | yes |
Scenario: East-west oneways crossing the origin
Given the node locations
| 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
| from | to | route | distance |
| b | d | abcde | 200m +-2 |
| d | b | | |
And the ways
| nodes | oneway |
| abcde | yes |
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
Testbot uses a signal penalty of 7s.
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Traffic signals should incur a delay, without changing distance
Given the node map
| a | b | c |
| d | e | f |
Scenario: Traffic signals should incur a delay, without changing distance
Given the node map
| a | b | c |
| d | e | f |
And the nodes
| node | highway |
| e | traffic_signals |
And the nodes
| node | highway |
| e | traffic_signals |
And the ways
| nodes |
| abc |
| def |
And the ways
| nodes |
| abc |
| def |
When I route I should get
| from | to | route | time | distance |
| a | c | abc | 20s +-1 | 200m +-1 |
| d | f | def | 27s +-1 | 200m +-1 |
When I route I should get
| from | to | route | time | distance |
| a | c | abc | 20s +-1 | 200m +-1 |
| d | f | def | 27s +-1 | 200m +-1 |
Scenario: Signal penalty should not depend on way type
Given the node map
| a | b | c |
| d | e | f |
| g | h | i |
Scenario: Signal penalty should not depend on way type
Given the node map
| a | b | c |
| d | e | f |
| g | h | i |
And the nodes
| node | highway |
| b | traffic_signals |
| e | traffic_signals |
| h | traffic_signals |
And the nodes
| node | highway |
| b | traffic_signals |
| e | traffic_signals |
| h | traffic_signals |
And the ways
| nodes | highway |
| abc | primary |
| def | secondary |
| ghi | tertiary |
And the ways
| nodes | highway |
| abc | primary |
| def | secondary |
| ghi | tertiary |
When I route I should get
| from | to | route | time |
| a | c | abc | 27s +-1 |
| d | f | def | 47s +-1 |
| g | i | ghi | 67s +-1 |
When I route I should get
| from | to | route | time |
| a | c | abc | 27s +-1 |
| d | f | def | 47s +-1 |
| g | i | ghi | 67s +-1 |
Scenario: Passing multiple traffic signals should incur a accumulated delay
Given the node map
| a | b | c | d | e |
Scenario: Passing multiple traffic signals should incur a accumulated delay
Given the node map
| a | b | c | d | e |
And the nodes
| node | highway |
| b | traffic_signals |
| c | traffic_signals |
| d | traffic_signals |
And the nodes
| node | highway |
| b | traffic_signals |
| c | traffic_signals |
| d | traffic_signals |
And the ways
| nodes |
| abcde |
And the ways
| nodes |
| abcde |
When I route I should get
| from | to | route | time |
| a | e | abcde | 61s +-1 |
When I route I should get
| from | to | route | time |
| a | e | abcde | 61s +-1 |
@todo
Scenario: Signal penalty should not depend on way type
Given the node map
| a | b | c |
| d | e | f |
| g | h | i |
@todo
Scenario: Signal penalty should not depend on way type
Given the node map
| a | b | c |
| d | e | f |
| g | h | i |
And the nodes
| node | highway |
| b | traffic_signals |
| e | traffic_signals |
| h | traffic_signals |
And the nodes
| node | highway |
| b | traffic_signals |
| e | traffic_signals |
| h | traffic_signals |
And the ways
| nodes | highway |
| abc | primary |
| def | secondary |
| ghi | tertiary |
And the ways
| nodes | highway |
| abc | primary |
| def | secondary |
| ghi | tertiary |
When I route I should get
| from | to | route | time |
| a | b | abc | 10s +-1 |
| a | c | abc | 27s +-1 |
| d | e | def | 20s +-1 |
| d | f | def | 47s +-1 |
| g | h | ghi | 30s +-1 |
| g | i | ghi | 67s +-1 |
When I route I should get
| from | to | route | time |
| a | b | abc | 10s +-1 |
| a | c | abc | 27s +-1 |
| d | e | def | 20s +-1 |
| d | f | def | 47s +-1 |
| g | h | ghi | 30s +-1 |
| g | i | ghi | 67s +-1 |
Scenario: Passing multiple traffic signals should incur a accumulated delay
Given the node map
| a | b | c | d | e |
Scenario: Passing multiple traffic signals should incur a accumulated delay
Given the node map
| a | b | c | d | e |
And the nodes
| node | highway |
| b | traffic_signals |
| c | traffic_signals |
| d | traffic_signals |
And the nodes
| node | highway |
| b | traffic_signals |
| c | traffic_signals |
| d | traffic_signals |
And the ways
| nodes |
| abcde |
And the ways
| nodes |
| abcde |
When I route I should get
| from | to | route | time |
| a | e | abcde | 61s +-1 |
When I route I should get
| from | to | route | time |
| a | e | abcde | 61s +-1 |
@todo
Scenario: Starting or ending at a traffic signal should not incur a delay
Given the node map
| a | b | c |
@todo
Scenario: Starting or ending at a traffic signal should not incur a delay
Given the node map
| a | b | c |
And the nodes
| node | highway |
| b | traffic_signals |
And the nodes
| node | highway |
| b | traffic_signals |
And the ways
| nodes |
| abc |
And the ways
| nodes |
| abc |
When I route I should get
| from | to | route | time |
| a | b | abc | 10s +-1 |
| b | a | abc | 10s +-1 |
When I route I should get
| from | to | route | time |
| a | b | abc | 10s +-1 |
| b | a | abc | 10s +-1 |
Scenario: Routing between signals on the same way should not incur a delay
Given the node map
| a | b | c | d |
Scenario: Routing between signals on the same way should not incur a delay
Given the node map
| a | b | c | d |
And the nodes
| node | highway |
| a | traffic_signals |
| d | traffic_signals |
And the nodes
| node | highway |
| a | traffic_signals |
| d | traffic_signals |
And the ways
| nodes | highway |
| abcd | primary |
And the ways
| nodes | highway |
| abcd | primary |
When I route I should get
| from | to | route | time |
| b | c | abcd | 10s +-1 |
| c | b | abcd | 10s +-1 |
When I route I should get
| from | to | route | time |
| b | c | abcd | 10s +-1 |
| c | b | abcd | 10s +-1 |
Scenario: Prefer faster route without traffic signals
Given a grid size of 50 meters
And the node map
| a | | b | | c |
| | | d | | |
Scenario: Prefer faster route without traffic signals
Given a grid size of 50 meters
And the node map
| a | | b | | c |
| | | d | | |
And the nodes
| node | highway |
| b | traffic_signals |
And the nodes
| node | highway |
| b | traffic_signals |
And the ways
| nodes | highway |
| abc | primary |
| adc | primary |
And the ways
| nodes | highway |
| abc | primary |
| adc | primary |
When I route I should get
| from | to | route |
| a | c | adc |
When I route I should get
| from | to | route |
| a | c | adc |

View File

@ -1,86 +1,86 @@
@routing @planetary
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
| nodes |
| ab |
Scenario: Approximated Longitudinal distances at equator
Given the node locations
| node | lat | lon |
| a | 0 | 80 |
| b | 0 | 0 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Longitudinal distances at latitude 45
Given the node locations
| node | lat | lon |
| c | 45 | 80 |
| d | 45 | 0 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| cd |
Scenario: Approximated Longitudinal distances at latitude 45
Given the node locations
| node | lat | lon |
| c | 45 | 80 |
| d | 45 | 0 |
When I route I should get
| from | to | route | distance |
| c | d | cd | 6028844m ~4.5% |
And the ways
| nodes |
| cd |
Scenario: Approximated Longitudinal distances at latitude 80
Given the node locations
| node | lat | lon |
| c | 80 | 80 |
| d | 80 | 0 |
When I route I should get
| from | to | route | distance |
| c | d | cd | 6028844m ~4.5% |
And the ways
| nodes |
| cd |
Scenario: Approximated Longitudinal distances at latitude 80
Given the node locations
| node | lat | lon |
| c | 80 | 80 |
| d | 80 | 0 |
When I route I should get
| from | to | route | distance |
| c | d | cd | 1431469m ~9.5% |
And the ways
| nodes |
| cd |
Scenario: Approximated Latitudinal distances at longitude 0
Given the node locations
| node | lat | lon |
| a | 80 | 0 |
| b | 0 | 0 |
When I route I should get
| from | to | route | distance |
| c | d | cd | 1431469m ~9.5% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 0
Given the node locations
| node | lat | lon |
| a | 80 | 0 |
| b | 0 | 0 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 45
Given the node locations
| node | lat | lon |
| a | 80 | 45 |
| b | 0 | 45 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 45
Given the node locations
| node | lat | lon |
| a | 80 | 45 |
| b | 0 | 45 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 80
Given the node locations
| node | lat | lon |
| a | 80 | 80 |
| b | 0 | 80 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 80
Given the node locations
| node | lat | lon |
| a | 80 | 80 |
| b | 0 | 80 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| 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
Feature: OSM Route Relation
Background:
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 |
Background:
Given the profile "testbot"
And the ways
| nodes |
| ab |
| bc |
| as |
| stb |
| bu |
| uvc |
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.
And the relations
| type | route | way:route |
| route | testbot | as,stb |
| route | testbot | bu,uvc |
Given the node map
| s | | | t | | | |
| a | | | b | | | c |
| | | | | | | |
| | | | u | | | v |
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 |
And the ways
| nodes |
| ab |
| bc |
| as |
| 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
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 | |
Feature: Snap start/end point to the nearest way
And the ways
| nodes |
| nc |
| ec |
| sc |
| wc |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route |
| 1 | c | nc |
| 2 | c | nc |
| 3 | c | ec |
| 4 | c | ec |
| 5 | c | sc |
| 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 |
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
| nodes |
| aub |
| adb |
And the ways
| nodes |
| nc |
| ec |
| sc |
| wc |
When I route I should get
| from | to | route |
| 1 | b | adb |
| 2 | b | adb |
| 6 | b | aub |
| 7 | b | aub |
When I route I should get
| from | to | route |
| 1 | c | nc |
| 2 | c | nc |
| 3 | c | ec |
| 4 | c | ec |
| 5 | c | sc |
| 6 | c | sc |
| 7 | c | wc |
| 8 | c | wc |
Scenario: Snap to edge right under start/end point
Given the node map
| d | e | f | g |
| c | | | h |
| b | | | i |
| a | l | k | j |
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
| nodes |
| abcd |
| defg |
| ghij |
| jkla |
And the ways
| nodes |
| aub |
| adb |
When I route I should get
| from | to | route |
| a | b | abcd |
| a | c | abcd |
| a | d | abcd |
| a | e | abcd,defg |
| a | f | abcd,defg |
| a | h | jkla,ghij |
| a | i | jkla,ghij |
| a | j | jkla |
| a | k | jkla |
| a | l | jkla |
When I route I should get
| from | to | route |
| 1 | b | adb |
| 2 | b | adb |
| 6 | b | aub |
| 7 | b | aub |
Scenario: Snap to correct way at large scales
Given a grid size of 1000 meters
Given the node map
| | | | a |
| x | | | b |
| | | | c |
Scenario: Snap to edge right under start/end point
Given the node map
| d | e | f | g |
| c | | | h |
| b | | | i |
| a | l | k | j |
And the ways
| nodes |
| xa |
| xb |
| xc |
And the ways
| nodes |
| abcd |
| defg |
| ghij |
| jkla |
When I route I should get
| from | to | route |
| x | a | xa |
| x | b | xb |
| x | c | xc |
| a | x | xa |
| b | x | xb |
| c | x | xc |
Scenario: Find edges within 1km, and the same from 10km
Given a grid size of 1000 meters
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 |
When I route I should get
| from | to | route |
| a | b | abcd |
| a | c | abcd |
| a | d | abcd |
| a | e | abcd,defg |
| a | f | abcd,defg |
| a | h | jkla,ghij |
| a | i | jkla,ghij |
| a | j | jkla |
| a | k | jkla |
| a | l | jkla |
Given the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
Scenario: Snap to correct way at large scales
Given a grid size of 1000 meters
Given the node map
| | | | a |
| x | | | b |
| | | | c |
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 |
And the ways
| nodes |
| xa |
| xb |
| xc |
When I route I should get
| from | to | route |
| x | a | xa |
| x | b | xb |
| x | c | xc |
| a | x | xa |
| b | x | xb |
| c | x | xc |
Scenario: Find edges within 1km, and the same from 10km
Given a grid size of 1000 meters
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
Feature: Estimation of travel time
Testbot speeds:
Primary road: 36km/h = 36000m/3600s = 100m/10s
Secondary road: 18km/h = 18000m/3600s = 100m/20s
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 |
Primary road: 36km/h = 36000m/3600s = 100m/10s
Secondary road: 18km/h = 18000m/3600s = 100m/20s
Tertiary road: 12km/h = 12000m/3600s = 100m/30s
And the ways
| nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
Background: Use specific speeds
Given the profile "testbot"
When I route I should get
| from | to | route | time |
| x | a | xa | 1s +-1 |
| x | b | xb | 1s +-1 |
| x | c | xc | 1s +-1 |
| x | d | xd | 1s +-1 |
| x | e | xe | 1s +-1 |
| x | f | xf | 1s +-1 |
| x | g | xg | 1s +-1 |
| x | h | xh | 1s +-1 |
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 |
Scenario: Basic travel time, 100m scale
Given a grid size of 100 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
And the ways
| nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
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 | 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 |
When I route I should get
| from | to | route | time |
| x | a | xa | 1s +-1 |
| x | b | xb | 1s +-1 |
| x | c | xc | 1s +-1 |
| x | d | xd | 1s +-1 |
| x | e | xe | 1s +-1 |
| x | f | xf | 1s +-1 |
| x | g | xg | 1s +-1 |
| x | h | xh | 1s +-1 |
Scenario: Basic travel time, 1km scale
Given a grid size of 1000 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
Scenario: Basic travel time, 100m scale
Given a grid size of 100 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
And the ways
| nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
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 | 100s +-1 |
| x | b | xb | 141s +-1 |
| x | c | xc | 100s +-1 |
| x | d | xd | 141s +-1 |
| x | e | xe | 100s +-1 |
| x | f | xf | 141s +-1 |
| x | g | xg | 100s +-1 |
| x | h | xh | 141s +-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, 10km scale
Given a grid size of 10000 meters
Given the node map
| h | a | b |
| g | x | c |
| 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: Basic travel time, 1km scale
Given a grid size of 1000 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
Scenario: Time of travel depending on way type
Given the node map
| a | b |
| c | d |
| e | f |
And the ways
| nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
And the ways
| nodes | highway |
| ab | primary |
| cd | secondary |
| ef | tertiary |
| ace | something |
When I route I should get
| from | to | route | time |
| a | b | ab | 10s +-1 |
| c | d | cd | 20s +-1 |
| e | f | ef | 30s +-1 |
When I route I should get
| from | to | route | time |
| x | a | xa | 100s +-1 |
| x | b | xb | 141s +-1 |
| x | c | xc | 100s +-1 |
| x | d | xd | 141s +-1 |
| x | e | xe | 100s +-1 |
| x | f | xf | 141s +-1 |
| x | g | xg | 100s +-1 |
| x | h | xh | 141s +-1 |
Scenario: Time of travel on a series of ways
Given the node map
| a | b | |
| | c | d |
Scenario: Basic travel time, 10km scale
Given a grid size of 10000 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
And the ways
| nodes | highway |
| ab | primary |
| bc | primary |
| cd | primary |
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 |
| a | b | ab | 10s +-1 |
| a | c | ab,bc | 20s +-1 |
| a | d | ab,bc,cd | 30s +-1 |
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 on a winding way
Given the node map
| a | | i | h |
| b | c | | g |
| | d | e | f |
Scenario: Time of travel depending on way type
Given the node map
| a | b |
| c | d |
| e | f |
And the ways
| nodes | highway |
| abcdefghi | primary |
And the ways
| nodes | highway |
| ab | primary |
| cd | secondary |
| ef | tertiary |
| ace | something |
When I route I should get
| from | to | route | time |
| a | b | abcdefghi | 10s +-1 |
| a | e | abcdefghi | 40s +-1 |
| a | i | abcdefghi | 80s +-1 |
When I route I should get
| from | to | route | time |
| a | b | ab | 10s +-1 |
| c | d | cd | 20s +-1 |
| e | f | ef | 30s +-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 |
Scenario: Time of travel on a series of ways
Given the node map
| a | b | |
| | c | d |
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 |
And the ways
| nodes | highway |
| ab | primary |
| bc | primary |
| cd | primary |
Scenario: Time of travel on part of a way
Given the node map
| a | 1 |
| | 2 |
| | 3 |
| b | 4 |
When I route I should get
| from | to | route | time |
| a | b | ab | 10s +-1 |
| a | c | ab,bc | 20s +-1 |
| a | d | ab,bc,cd | 30s +-1 |
And the ways
| nodes | highway |
| ab | primary |
Scenario: Time of travel on a winding way
Given the node map
| a | | i | h |
| b | c | | g |
| | d | e | f |
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 |
And the ways
| nodes | highway |
| abcdefghi | primary |
When I route I should get
| from | to | route | time |
| a | b | abcdefghi | 10s +-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
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
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
| xi |
| xj |
| xk |
| xl |
| xm |
| xn |
| xo |
| xp |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route | turns |
| i | k | xi,xk | head,sharp_left,destination |
| i | m | xi,xm | head,left,destination |
| i | o | xi,xo | head,slight_left,destination |
| i | a | xi,xa | head,straight,destination |
| i | c | xi,xc | head,slight_right,destination |
| i | e | xi,xe | head,right,destination |
| i | g | xi,xg | head,sharp_right,destination |
Scenario: Turn directions
Given the node map
| o | p | a | b | c |
| n | | | | d |
| m | | x | | e |
| l | | | | f |
| k | j | i | h | g |
| k | m | xk,xm | head,sharp_left,destination |
| k | o | xk,xo | head,left,destination |
| k | a | xk,xa | head,slight_left,destination |
| k | c | xk,xc | head,straight,destination |
| k | e | xk,xe | head,slight_right,destination |
| k | g | xk,xg | head,right,destination |
| k | i | xk,xi | head,sharp_right,destination |
And the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
| xi |
| xj |
| xk |
| xl |
| xm |
| xn |
| xo |
| xp |
| m | o | xm,xo | head,sharp_left,destination |
| m | a | xm,xa | head,left,destination |
| m | c | xm,xc | head,slight_left,destination |
| m | e | xm,xe | head,straight,destination |
| m | g | xm,xg | head,slight_right,destination |
| m | i | xm,xi | head,right,destination |
| m | k | xm,xk | head,sharp_right,destination |
When I route I should get
| from | to | route | turns |
| i | k | xi,xk | head,sharp_left,destination |
| i | m | xi,xm | head,left,destination |
| i | o | xi,xo | head,slight_left,destination |
| i | a | xi,xa | head,straight,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 |
| o | c | xo,xc | head,left,destination |
| o | e | xo,xe | head,slight_left,destination |
| o | g | xo,xg | head,straight,destination |
| o | i | xo,xi | head,slight_right,destination |
| o | k | xo,xk | head,right,destination |
| o | m | xo,xm | head,sharp_right,destination |
| k | m | xk,xm | head,sharp_left,destination |
| k | o | xk,xo | head,left,destination |
| k | a | xk,xa | head,slight_left,destination |
| k | c | xk,xc | head,straight,destination |
| k | e | xk,xe | head,slight_right,destination |
| k | g | xk,xg | head,right,destination |
| k | i | xk,xi | head,sharp_right,destination |
| a | c | xa,xc | head,sharp_left,destination |
| a | e | xa,xe | head,left,destination |
| a | g | xa,xg | head,slight_left,destination |
| a | i | xa,xi | head,straight,destination |
| a | k | xa,xk | head,slight_right,destination |
| a | m | xa,xm | head,right,destination |
| a | o | xa,xo | head,sharp_right,destination |
| m | o | xm,xo | head,sharp_left,destination |
| m | a | xm,xa | head,left,destination |
| m | c | xm,xc | head,slight_left,destination |
| m | e | xm,xe | head,straight,destination |
| m | g | xm,xg | head,slight_right,destination |
| m | i | xm,xi | head,right,destination |
| m | k | xm,xk | head,sharp_right,destination |
| c | e | xc,xe | head,sharp_left,destination |
| c | g | xc,xg | head,left,destination |
| c | i | xc,xi | head,slight_left,destination |
| c | k | xc,xk | head,straight,destination |
| c | m | xc,xm | head,slight_right,destination |
| c | o | xc,xo | head,right,destination |
| c | a | xc,xa | head,sharp_right,destination |
| o | a | xo,xa | head,sharp_left,destination |
| o | c | xo,xc | head,left,destination |
| o | e | xo,xe | head,slight_left,destination |
| o | g | xo,xg | head,straight,destination |
| o | i | xo,xi | head,slight_right,destination |
| o | k | xo,xk | head,right,destination |
| o | m | xo,xm | head,sharp_right,destination |
| e | g | xe,xg | head,sharp_left,destination |
| e | i | xe,xi | head,left,destination |
| e | k | xe,xk | head,slight_left,destination |
| e | m | xe,xm | head,straight,destination |
| e | o | xe,xo | head,slight_right,destination |
| e | a | xe,xa | head,right,destination |
| e | c | xe,xc | head,sharp_right,destination |
| a | c | xa,xc | head,sharp_left,destination |
| a | e | xa,xe | head,left,destination |
| a | g | xa,xg | head,slight_left,destination |
| a | i | xa,xi | head,straight,destination |
| a | k | xa,xk | head,slight_right,destination |
| a | m | xa,xm | head,right,destination |
| a | o | xa,xo | head,sharp_right,destination |
| g | i | xg,xi | head,sharp_left,destination |
| g | k | xg,xk | head,left,destination |
| g | m | xg,xm | head,slight_left,destination |
| g | o | xg,xo | head,straight,destination |
| g | a | xg,xa | head,slight_right,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 |
| c | e | xc,xe | head,sharp_left,destination |
| c | g | xc,xg | head,left,destination |
| c | i | xc,xi | head,slight_left,destination |
| c | k | xc,xk | head,straight,destination |
| c | m | xc,xm | head,slight_right,destination |
| c | o | xc,xo | head,right,destination |
| c | a | xc,xa | head,sharp_right,destination |
And the ways
| nodes |
| ab |
| bc |
| xy |
| yz |
| e | g | xe,xg | head,sharp_left,destination |
| e | i | xe,xi | head,left,destination |
| e | k | xe,xk | head,slight_left,destination |
| e | m | xe,xm | head,straight,destination |
| e | o | xe,xo | head,slight_right,destination |
| e | a | xe,xa | head,right,destination |
| e | c | xe,xc | head,sharp_right,destination |
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 |
| g | i | xg,xi | head,sharp_left,destination |
| g | k | xg,xk | head,left,destination |
| g | m | xg,xm | head,slight_left,destination |
| g | o | xg,xo | head,straight,destination |
| g | a | xg,xa | head,slight_right,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
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
| nodes | name |
| ab | Scandinavian København |
| bc | Japanese |
| cd | Cyrillic Москва |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route |
| a | b | Scandinavian København |
| b | c | Japanese |
| c | d | Cyrillic Москва |
Scenario: Streetnames with UTF characters
Given the node map
| a | b | c | d |
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:
Given the profile "testbot"
Scenario: Simple via point
Given the node map
| a | b | c |
Scenario: Simple via point
Given the node map
| a | b | c |
And the ways
| nodes |
| abc |
And the ways
| nodes |
| abc |
When I route I should get
| waypoints | route |
| a,b,c | abc |
| c,b,a | abc |
When I route I should get
| waypoints | route |
| a,b,c | abc |
| c,b,a | abc |
Scenario: Via point at a dead end
Given the node map
| a | b | c |
| | d | |
| a | b | c |
| | d | |
And the ways
| nodes |
| abc |
| bd |
| nodes |
| abc |
| bd |
When I route I should get
| waypoints | route |
| a,d,c | abc,bd,bd,abc |
| c,d,a | abc,bd,bd,abc |
| waypoints | route |
| a,d,c | abc,bd,bd,abc |
| c,d,a | abc,bd,bd,abc |
Scenario: Multiple via points
Given the node map
| a | | | | e | f | g | |
| | b | c | d | | | | h |
Scenario: Multiple via points
Given the node map
| a | | | | e | f | g | |
| | b | c | d | | | | h |
And the ways
| nodes |
| ae |
| ab |
| bcd |
| de |
| efg |
| gh |
| 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 |
And the ways
| nodes |
| ae |
| ab |
| bcd |
| de |
| efg |
| gh |
| dh |
When I route I should get
| waypoints | route |
| a,c,f,h | ab,bcd,de,efg,gh |

View File

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