cleanup indentation of cuke files

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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