Add files via upload

This commit is contained in:
tombay 2024-08-09 10:25:02 +10:00 committed by GitHub
parent 1e6c213e4a
commit e66d1f4231
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 969 additions and 0 deletions

View File

@ -0,0 +1,119 @@
@routing @countryfoot @access
Feature: Countryfoot - Access tags on ways
# Reference: http://wiki.openstreetmap.org/wiki/Key:access
Background:
Given the profile "countryfoot"
Scenario: Countryfoot - Access tag hierarchy 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: Countryfoot - 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: Countryfoot - Access tags on ways
Then routability should be
| access | foot | bothw |
| | | x |
| yes | | x |
| permissive | | x |
| designated | | x |
| some_tag | | x |
| no | | |
| private | | |
| agricultural | | |
| forestry | | |
| delivery | | |
| | yes | x |
| | permissive | x |
| | designated | x |
| | some_tag | x |
| | no | |
| | private | |
| | agricultural | |
| | forestry | |
| | delivery | |
Scenario: Countryfoot - 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: Countryfoot - 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: Countryfoot - 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 |
Scenario: Countryfoot - Bridleways when access is explicit
Then routability should be
| highway | horse | bicycle | foot | bothw |
| bridleway | | | yes | x |
| bridleway | | yes | | |
| bridleway | designated | | | |
| bridleway | | | | |
Scenario: Countryfoot - a way with missing :forward tag
Then routability should be
| highway | bicycle:backward | foot:backward | forw | backw |
| cycleway | designated | designated | | x |
Scenario: Countryfoot - Access combinations
Then routability should be
| highway | access | bothw |
| primary | permissive | x |
| steps | permissive | x |
| footway | permissive | x |
| garbagetag | permissive | x |

View File

@ -0,0 +1,52 @@
@routing @countryfoot @access
Feature: Countryfoot - Access tags on nodes
# Reference: http://wiki.openstreetmap.org/wiki/Key:access
Background:
Given the profile "countryfoot"
Scenario: Countryfoot - Access tag hierarchy 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: Countryfoot - 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: Countryfoot - 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 | | |
| forestry | | |
| delivery | | |
| no | yes | x |
| no | permissive | x |
| no | designated | x |
| no | some_tag | x |
| yes | no | |
| yes | private | |
| yes | agricultural | |
| yes | forestry | |
| yes | delivery | |

View File

@ -0,0 +1,112 @@
@routing @countryfoot @area
Feature: Countryfoot - Squares and other areas
Background:
Given the profile "countryfoot"
Given a grid size of 200 meters
@square
Scenario: Countryfoot - 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,abcda |
| a | d | abcda,abcda |
| b | c | abcda,abcda |
| c | b | abcda,abcda |
| c | d | abcda,abcda |
| d | c | abcda,abcda |
| d | a | abcda,abcda |
| a | d | abcda,abcda |
@building
Scenario: Countryfoot - 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,xa |
| a | d | xa,xa |
| b | c | xa,xa |
| c | b | xa,xa |
| c | d | xa,xa |
| d | c | xa,xa |
| d | a | xa,xa |
| a | d | xa,xa |
@parking
Scenario: Countryfoot - 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,by |
| y | x | by,abcda,xa,xa |
| a | b | abcda,abcda |
| a | d | abcda,abcda |
| b | c | abcda,abcda |
| c | b | abcda,abcda |
| c | d | abcda,abcda |
| d | c | abcda,abcda |
| d | a | abcda,abcda |
| a | d | abcda,abcda |
@train @platform
Scenario: Countryfoot - 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,by |
| y | x | by,abcda,xa,xa |
| a | b | abcda,abcda |
| a | d | abcda,abcda |
| b | c | abcda,abcda |
| c | b | abcda,abcda |
| c | d | abcda,abcda |
| d | c | abcda,abcda |
| d | a | abcda,abcda |
| a | d | abcda,abcda |

View File

@ -0,0 +1,41 @@
@routing @countryfoot @barrier
Feature: Barriers
Background:
Given the profile "countryfoot"
Scenario: Countryfoot - Barriers
Then routability should be
| node/barrier | bothw |
| | x |
| bollard | x |
| gate | x |
| lift_gate | x |
| cycle_barrier | x |
| cattle_grid | x |
| border_control | x |
| toll_booth | x |
| sally_port | x |
| entrance | x |
| wall | |
| fence | |
| some_tag | x |
| block | x |
Scenario: Countryfoot - 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 | |

View File

@ -0,0 +1,101 @@
@routing @countryfoot @countryspeeds
Feature: Testbot - Country Profile Selection
# Check that country date is being collected
# CHE (a) and FIN (c) support foot on cycleway
# FRA (g) does not support foot on cycleway
# BEL (i) and FIN (c) support foot on cycleway
# BEL (i) and IRL (o) support Bridleway
# GRC (m) and IRL (o) support trunk and bridleway
# LIU (s) is not a country in list so looks like worldwide
# so
# GRC (m) and LIU (s) support trunk
# LIU (s) does not support cycleway or bridleway
# Worldwide (u) is an area without boundaries (so like s)
Scenario: Country Profile Selection - highway chosen for country
Given the extract extra arguments "--location-dependent-data data/countrytest.geojson"
And the partition extra arguments "--threads 1"
And the customize extra arguments "--threads 1"
And the profile file "countryfoot" initialized with
"""
profile.uselocationtags.countryspeeds = true
"""
And the node locations
| node | lat | lon |
| a | 9.5 | 5.0 |
| b | 9.5 | 10.0 |
| c | 9.5 | 15.0 |
| d | 9.0 | 5.0 |
| e | 9.0 | 10.0 |
| f | 9.0 | 15.0 |
| g | 8.5 | 5.0 |
| h | 8.5 | 10.0 |
| i | 8.5 | 15.0 |
| j | 8.0 | 5.0 |
| k | 8.0 | 10.0 |
| l | 8.0 | 15.0 |
| m | 7.5 | 5.0 |
| n | 7.5 | 10.0 |
| o | 7.5 | 15.0 |
| p | 7.0 | 5.0 |
| q | 7.0 | 10.0 |
| r | 7.0 | 15.0 |
| s | 6.5 | 5.0 |
| t | 6.5 | 10.0 |
| u | 6.5 | 15.0 |
And the ways
| nodes | highway | comment
| ab | cycleway | CHE - FIN yes
| bc | cycleway |
| ad | cycleway | CHE - FRA no
| dg | cycleway |
| gj | cycleway |
| cf | bridleway | FIN - BEL no
| fi | bridleway |
| gh | trunk | FRA - BEL no
| hi | trunk |
| il | bridleway | BEL - IRL yes
| lo | bridleway |
| or | trunk | IRL - world yes
| ru | trunk |
| mn | trunk | GRC - IRL yes
| no | trunk |
| mp | trunk | GRC - liu yes
| ps | trunk |
And the partition extra arguments "--threads 1"
And the customize extra arguments "--threads 1"
When I route I should get
| waypoints | route | status | message |
| a,c | ab,bc,bc | 200 | |
| a,j | | 400 | Impossible route between points |
| c,i | | 400 | Impossible route between points |
| g,i | | 400 | Impossible route between points |
| i,o | il,lo,lo | 200 | |
| o,u | or,ru,ru | 200 | |
| m,o | mn,no,no | 200 | |
| m,s | mp,ps,ps | 200 | |

View File

@ -0,0 +1,41 @@
@routing @countryfoot @countryway
Feature: Countryfoot - Accessability of different way types with countryspeeds
Background:
Given the profile file "countryfoot" initialized with
"""
profile.uselocationtags.countryspeeds = true
"""
Scenario: Countryfoot - Basic access
Then routability should be
| highway | forw |
| motorway | |
| motorway_link | |
| trunk | x |
| trunk_link | x |
| primary | x |
| primary_link | x |
| secondary | x |
| secondary_link | x |
| tertiary | x |
| tertiary_link | x |
| residential | x |
| service | x |
| unclassified | x |
| living_street | x |
| road | x |
| track | x |
| path | x |
| footway | x |
| pedestrian | x |
| steps | x |
| pier | x |
| cycleway | |
| bridleway | |
Scenario: Countryfoot - Basic access
Then routability should be
| highway | leisure | forw |
| (nil) | track | x |

View File

@ -0,0 +1,35 @@
@routing @countryfoot
Feature: Countryfoot - Use distance weight
Background:
Given a grid size of 200 meters
Scenario: Countryfoot - Check distance weight
Given the profile file
"""
local functions = require('countryfoot')
functions.setup_testbot = functions.setup
functions.setup = function()
local profile = functions.setup_testbot()
profile.properties.weight_name = 'distance'
return profile
end
return functions
"""
Given the node map
"""
a-b-c
"""
And the ways
| nodes | highway |
| abc | residential |
When I route I should get
| from | to | route | weight | time | distance |
| a | b | abc,abc | 200 | 144s | 200m +-1 |
| a | c | abc,abc | 400 | 288s | 400m +-1 |

View File

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

View File

@ -0,0 +1,31 @@
@routing @countryfoot
Feature: Countryfoot - Intersections
Background:
Given the profile "countryfoot"
Given a grid size of 2 meters
# https://github.com/Project-OSRM/osrm-backend/issues/6218
Scenario: Countryfoot - Handles non-planar intersections
Given the node map
"""
f
|
a
|
b---c---d
|
e
"""
And the ways
| nodes | highway | foot | layer |
| ac | footway | yes | 0 |
| bc | footway | yes | 0 |
| cd | footway | yes | 0 |
| cef | footway | yes | 1 |
When I route I should get
| from | to | route |
| a | d | ac,cd,cd |

View File

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

View File

@ -0,0 +1,39 @@
@routing @countryfoot @names
Feature: Countryfoot - Street names in instructions
Background:
Given the profile "countryfoot"
Given a grid size of 200 meters
Scenario: Countryfoot - A named street
Given the node map
"""
a b
c
"""
And the ways
| nodes | name | ref |
| ab | My Way | |
| bc | | A7 |
When I route I should get
| from | to | route | ref |
| a | c | My Way,, | ,A7,A7 |
Scenario: Countryfoot - Combines named roads with suffix changes
Given the node map
"""
a b c d
"""
And the ways
| nodes | name |
| ab | High Street W |
| bc | High Street E |
| cd | Market Street |
When I route I should get
| from | to | route |
| a | d | High Street W,Market Street,Market Street |

View File

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

View File

@ -0,0 +1,131 @@
@routing @countryfoot @restrictions
Feature: Countryfoot - Turn restrictions
# Ignore turn restrictions on foot.
Background:
Given the profile "countryfoot"
Given a grid size of 200 meters
@no_turning
Scenario: Countryfoot - No left turn
Given the node map
"""
n
w j e
s
"""
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_left_turn |
When I route I should get
| from | to | route |
| s | w | sj,wj,wj |
| s | n | sj,nj |
| s | e | sj,ej,ej |
@only_turning
Scenario: Countryfoot - Only left turn
Given the node map
"""
n
w j e
s
"""
And the ways
| nodes | oneway |
| sj | yes |
| nj | -1 |
| wj | -1 |
| ej | -1 |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | only_left_turn |
When I route I should get
| from | to | route |
| s | w | sj,wj,wj |
| s | n | sj,nj |
| s | e | sj,ej,ej |
@except
Scenario: Countryfoot - Except tag and on no_ restrictions
Given the node map
"""
b x c
a j d
s
"""
And the ways
| nodes | oneway |
| sj | no |
| xj | -1 |
| aj | -1 |
| bj | no |
| cj | -1 |
| dj | -1 |
And the relations
| type | way:from | way:to | node:via | restriction | except |
| restriction | sj | aj | j | no_left_turn | foot |
| restriction | sj | bj | j | no_left_turn | |
| restriction | sj | cj | j | no_right_turn | |
| restriction | sj | dj | j | no_right_turn | foot |
When I route I should get
| from | to | route |
| s | a | sj,aj,aj |
| s | b | sj,bj,bj |
| s | c | sj,cj,cj |
| s | d | sj,dj,dj |
@except
Scenario: Countryfoot - Multiple except tag values
Given the node map
"""
s j a
b
c
d
e
f
"""
And the ways
| nodes | oneway |
| sj | yes |
| ja | yes |
| jb | yes |
| jc | yes |
| jd | yes |
| je | yes |
| jf | yes |
And the relations
| type | way:from | way:to | node:via | restriction | except |
| restriction | sj | ja | j | no_straight_on | |
| restriction | sj | jb | j | no_straight_on | foot |
| restriction | sj | jc | j | no_straight_on | bus; foot |
| restriction | sj | jd | j | no_straight_on | foot; motocar |
| restriction | sj | je | j | no_straight_on | bus, foot |
| restriction | sj | jf | j | no_straight_on | foot, bus |
When I route I should get
| from | to | route |
| s | a | sj,ja,ja |
| s | b | sj,jb,jb |
| s | c | sj,jc,jc |
| s | d | sj,jd,jd |
| s | e | sj,je,je |
| s | f | sj,jf,jf |

View File

@ -0,0 +1,35 @@
@routing @countryfoot @roundabout @instruction @todo
Feature: Roundabout Instructions
Background:
Given the profile "countryfoot"
Scenario: Countryfoot - 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 | depart,roundabout-exit-1,arrive |
| s | u | sa,uc | depart,roundabout-exit-2,arrive |
| s | v | sa,vd | depart,roundabout-exit-3,arrive |
| u | v | uc,vd | depart,roundabout-exit-1,arrive |
| u | s | uc,sa | depart,roundabout-exit-2,arrive |
| u | t | uc,tb | depart,roundabout-exit-3,arrive |

View File

@ -0,0 +1,37 @@
@routing @countryfoot @startpoint
Feature: Countryfoot - Allowed start/end modes
Background:
Given the profile "countryfoot"
Scenario: Countryfoot - Don't start/stop on ferries
Given the node map
"""
a 1 b 2 c
"""
And the ways
| nodes | highway | route | bicycle |
| ab | primary | | |
| bc | | ferry | yes |
When I route I should get
| from | to | route | modes |
| 1 | 2 | ab,ab | walking,walking |
| 2 | 1 | ab,ab | walking,walking |
Scenario: Countryfoot - Don't start/stop on trains
Given the node map
"""
a 1 b 2 c
"""
And the ways
| nodes | highway | railway | bicycle |
| ab | primary | | |
| bc | | train | yes |
When I route I should get
| from | to | route | modes |
| 1 | 2 | ab,ab | walking,walking |
| 2 | 1 | ab,ab | walking,walking |

View File

@ -0,0 +1,15 @@
@routing @countryfoot @surface
Feature: Countryfoot - Surfaces
Background:
Given the profile "countryfoot"
Scenario: Countryfoot - Slow surfaces
Then routability should be
| highway | surface | bothw |
| footway | | 145 s ~10% |
| footway | fine_gravel | 193 s ~10% |
| footway | gravel | 193 s ~10% |
| footway | pebblestone | 193 s ~10% |
| footway | mud | 289 s ~10% |
| footway | sand | 289 s ~10% |

View File

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