update foot profile, add tests for access, barriers, ferries, names, surface, more
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
@routing @foot @access
|
||||
Feature: Foot - Access tags on ways
|
||||
Reference: http://wiki.openstreetmap.org/wiki/Key:access
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
Scenario: Foot - Access tag hierachy on ways
|
||||
Then routability should be
|
||||
| highway | access | foot | bothw |
|
||||
| footway | | | x |
|
||||
| footway | | yes | x |
|
||||
| footway | | no | |
|
||||
| footway | yes | | x |
|
||||
| footway | yes | yes | x |
|
||||
| footway | yes | no | |
|
||||
| footway | no | | |
|
||||
| footway | no | yes | x |
|
||||
| footway | no | no | |
|
||||
| motorway | | | |
|
||||
| motorway | | yes | x |
|
||||
| motorway | | no | |
|
||||
| motorway | yes | | x |
|
||||
| motorway | yes | yes | x |
|
||||
| motorway | yes | no | |
|
||||
| motorway | no | | |
|
||||
| motorway | no | yes | x |
|
||||
| motorway | no | no | |
|
||||
|
||||
|
||||
Scenario: Foot - Overwriting implied acccess on ways
|
||||
Then routability should be
|
||||
| highway | access | foot | bothw |
|
||||
| footway | | | x |
|
||||
| motorway | | | |
|
||||
| footway | no | | |
|
||||
| footway | | | x |
|
||||
| footway | | no | |
|
||||
| motorway | yes | | x |
|
||||
| motorway | | | |
|
||||
| motorway | | yes | x |
|
||||
|
||||
Scenario: Foot - Access tags on ways
|
||||
Then routability should be
|
||||
| access | foot | bothw |
|
||||
| | | x |
|
||||
| yes | | x |
|
||||
| permissive | | x |
|
||||
| designated | | x |
|
||||
| some_tag | | x |
|
||||
| no | | |
|
||||
| private | | |
|
||||
| agricultural | | |
|
||||
| forestery | | |
|
||||
| | yes | x |
|
||||
| | permissive | x |
|
||||
| | designated | x |
|
||||
| | some_tag | x |
|
||||
| | no | |
|
||||
| | private | |
|
||||
| | agricultural | |
|
||||
| | forestery | |
|
||||
|
||||
Scenario: Foot - Access tags on both node and way
|
||||
Then routability should be
|
||||
| access | node/access | bothw |
|
||||
| yes | yes | x |
|
||||
| yes | no | |
|
||||
| yes | some_tag | x |
|
||||
| no | yes | |
|
||||
| no | no | |
|
||||
| no | some_tag | |
|
||||
| some_tag | yes | x |
|
||||
| some_tag | no | |
|
||||
| some_tag | some_tag | x |
|
||||
|
||||
Scenario: Foot - Access combinations
|
||||
Then routability should be
|
||||
| highway | access | foot | bothw |
|
||||
| motorway | private | yes | x |
|
||||
| footway | | permissive | x |
|
||||
| track | forestry | permissive | x |
|
||||
| footway | yes | no | |
|
||||
| primary | | private | |
|
||||
| residential | permissive | no | |
|
||||
|
||||
Scenario: Foot - Ignore access tags for other modes
|
||||
Then routability should be
|
||||
| highway | boat | motor_vehicle | moped | bothw |
|
||||
| river | yes | | | |
|
||||
| footway | no | | | x |
|
||||
| motorway | | yes | | |
|
||||
| footway | | no | | x |
|
||||
| motorway | | | yes | |
|
||||
| footway | | | no | x |
|
||||
@@ -0,0 +1,50 @@
|
||||
@routing @foot @access
|
||||
Feature: Foot - Access tags on nodes
|
||||
Reference: http://wiki.openstreetmap.org/wiki/Key:access
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
Scenario: Foot - Access tag hierachy on nodes
|
||||
Then routability should be
|
||||
| node/access | node/foot | bothw |
|
||||
| | | x |
|
||||
| | yes | x |
|
||||
| | no | |
|
||||
| yes | | x |
|
||||
| yes | yes | x |
|
||||
| yes | no | |
|
||||
| no | | |
|
||||
| no | yes | x |
|
||||
| no | no | |
|
||||
|
||||
Scenario: Foot - Overwriting implied acccess on nodes doesn't overwrite way
|
||||
Then routability should be
|
||||
| highway | node/access | node/foot | bothw |
|
||||
| footway | | | x |
|
||||
| footway | no | | |
|
||||
| footway | | no | |
|
||||
| motorway | | | |
|
||||
| motorway | yes | | |
|
||||
| motorway | | yes | |
|
||||
|
||||
Scenario: Foot - Access tags on nodes
|
||||
Then routability should be
|
||||
| node/access | node/foot | bothw |
|
||||
| | | x |
|
||||
| yes | | x |
|
||||
| permissive | | x |
|
||||
| designated | | x |
|
||||
| some_tag | | x |
|
||||
| no | | |
|
||||
| private | | |
|
||||
| agricultural | | |
|
||||
| forestery | | |
|
||||
| no | yes | x |
|
||||
| no | permissive | x |
|
||||
| no | designated | x |
|
||||
| no | some_tag | x |
|
||||
| yes | no | |
|
||||
| yes | private | |
|
||||
| yes | agricultural | |
|
||||
| yes | forestery | |
|
||||
@@ -0,0 +1,103 @@
|
||||
@routing @foot @area
|
||||
Feature: Foot - Squares and other areas
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
@square
|
||||
Scenario: Foot - Route along edge of a squares
|
||||
Given the node map
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
|
||||
And the ways
|
||||
| nodes | area | highway |
|
||||
| xa | | primary |
|
||||
| abcda | yes | residential |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
|
||||
@building
|
||||
Scenario: Foot - Don't route on buildings
|
||||
Given the node map
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | area | building | access |
|
||||
| xa | primary | | | |
|
||||
| abcda | (nil) | yes | yes | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | xa |
|
||||
| a | d | xa |
|
||||
| b | c | xa |
|
||||
| c | b | xa |
|
||||
| c | d | xa |
|
||||
| d | c | xa |
|
||||
| d | a | xa |
|
||||
| a | d | xa |
|
||||
|
||||
@parking
|
||||
Scenario: Foot - parking areas
|
||||
Given the node map
|
||||
| e | | | f |
|
||||
| x | a | b | y |
|
||||
| | d | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | amenity |
|
||||
| xa | primary | |
|
||||
| by | primary | |
|
||||
| xefy | primary | |
|
||||
| abcda | (nil) | parking |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
|
||||
@train @platform
|
||||
Scenario: Foot - railway platforms
|
||||
Given the node map
|
||||
| x | a | b | y |
|
||||
| | d | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway |
|
||||
| xa | primary | |
|
||||
| by | primary | |
|
||||
| abcda | (nil) | platform |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
@@ -0,0 +1,39 @@
|
||||
@routing @foot @barrier
|
||||
Feature: Barriers
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
Scenario: Foot - Barriers
|
||||
Then routability should be
|
||||
| node/barrier | bothw |
|
||||
| | x |
|
||||
| bollard | x |
|
||||
| gate | x |
|
||||
| cycle_barrier | x |
|
||||
| cattle_grid | x |
|
||||
| border_control | x |
|
||||
| toll_booth | x |
|
||||
| sally_port | x |
|
||||
| entrance | x |
|
||||
| wall | |
|
||||
| fence | |
|
||||
| some_tag | |
|
||||
|
||||
Scenario: Foot - Access tag trumphs barriers
|
||||
Then routability should be
|
||||
| node/barrier | node/access | bothw |
|
||||
| bollard | | x |
|
||||
| bollard | yes | x |
|
||||
| bollard | permissive | x |
|
||||
| bollard | designated | x |
|
||||
| bollard | no | |
|
||||
| bollard | private | |
|
||||
| bollard | agricultural | |
|
||||
| wall | | |
|
||||
| wall | yes | x |
|
||||
| wall | permissive | x |
|
||||
| wall | designated | x |
|
||||
| gate | no | |
|
||||
| gate | private | |
|
||||
| gate | agricultural | |
|
||||
@@ -0,0 +1,33 @@
|
||||
@routing @foot @names
|
||||
Feature: Foot - Street names in instructions
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
Scenario: Foot - A named street
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | My Way |
|
||||
| bc | Your Way |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way |
|
||||
|
||||
@unnamed
|
||||
Scenario: Foot - Use way type to describe unnamed ways
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ab | footway | |
|
||||
| bcd | track | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | {highway:footway},{highway:track} |
|
||||
@@ -0,0 +1,41 @@
|
||||
@routing @foot @ref @name
|
||||
Feature: Foot - Way ref
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
Scenario: Foot - Way with both name and ref
|
||||
Given the node map
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | Utopia Drive | E7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive / E7 |
|
||||
|
||||
Scenario: Foot - Way with only ref
|
||||
Given the node map
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | | E7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | E7 |
|
||||
|
||||
Scenario: Foot - Way with only name
|
||||
Given the node map
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | Utopia Drive |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive |
|
||||
@@ -0,0 +1,34 @@
|
||||
@routing @foot @roundabout @instruction
|
||||
Feature: Roundabout Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
@todo
|
||||
Scenario: Foot - Roundabout instructions
|
||||
You can walk in both directions on a roundabout, bu the normal roundabout instructions don't
|
||||
make sense when you're going the opposite way around the roundabout.
|
||||
|
||||
Given the node map
|
||||
| | | v | | |
|
||||
| | | d | | |
|
||||
| s | a | | c | u |
|
||||
| | | b | | |
|
||||
| | | t | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| sa | |
|
||||
| tb | |
|
||||
| uc | |
|
||||
| vd | |
|
||||
| abcda | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| s | t | sa,tb | head,enter_roundabout-1,destination |
|
||||
| s | u | sa,uc | head,enter_roundabout-2,destination |
|
||||
| s | v | sa,vd | head,enter_roundabout-3,destination |
|
||||
| u | v | uc,vd | head,enter_roundabout-1,destination |
|
||||
| u | s | uc,sa | head,enter_roundabout-2,destination |
|
||||
| u | t | uc,tb | head,enter_roundabout-3,destination |
|
||||
@@ -0,0 +1,15 @@
|
||||
@routing @foot @surface
|
||||
Feature: Foot - Surfaces
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
Scenario: Foot - Slow surfaces
|
||||
Then routability should be
|
||||
| highway | surface | bothw |
|
||||
| footway | | 145s ~10% |
|
||||
| footway | fine_gravel | 193s ~10% |
|
||||
| footway | gravel | 193s ~10% |
|
||||
| footway | pebbelstone | 193s ~10% |
|
||||
| footway | mud | 289s ~10% |
|
||||
| footway | sand | 289s ~10% |
|
||||
Reference in New Issue
Block a user