more reorganizing of tests
This commit is contained in:
parent
57d6af5486
commit
1ad274ed2e
@ -1,10 +1,10 @@
|
||||
@routing @bicycle @access
|
||||
Feature: Restricted access
|
||||
Feature: Bike - Restricted access
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Access tags on ways
|
||||
Scenario: Bike - Access tags on ways
|
||||
Then routability should be
|
||||
| access | bothw |
|
||||
| yes | x |
|
||||
@ -20,7 +20,7 @@ Feature: Restricted access
|
||||
| designated | |
|
||||
| some_tag | x |
|
||||
|
||||
Scenario: Access tags for other modes should have no effect
|
||||
Scenario: Bike - Access tags for other modes should have no effect
|
||||
Then routability should be
|
||||
| access | bothw |
|
||||
| ufo:yes | x |
|
||||
@ -36,7 +36,7 @@ Feature: Restricted access
|
||||
| ufo:designated | x |
|
||||
| ufo:some_tag | x |
|
||||
|
||||
Scenario: Access tags on nodes
|
||||
Scenario: Bike - Access tags on nodes
|
||||
Then routability should be
|
||||
| node:access | bothw |
|
||||
| yes | x |
|
||||
@ -52,7 +52,7 @@ Feature: Restricted access
|
||||
| designated | |
|
||||
| some_tag | x |
|
||||
|
||||
Scenario: Access tags on both nodes and way
|
||||
Scenario: Bike - Access tags on both nodes and way
|
||||
Then routability should be
|
||||
| access | node:access | bothw |
|
||||
| yes | yes | x |
|
||||
|
@ -4,7 +4,7 @@ Feature: Barriers
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Barriers
|
||||
Scenario: Bike - Barriers
|
||||
Then routability should be
|
||||
| highway | node/barrier | node/access | bothw |
|
||||
| primary | | | x |
|
||||
@ -16,7 +16,7 @@ Feature: Barriers
|
||||
| primary | bollard | | x |
|
||||
| primary | some_tag | | |
|
||||
|
||||
Scenario: Access tag trumphs barriers
|
||||
Scenario: Bike - Access tag trumphs barriers
|
||||
Then routability should be
|
||||
| highway | node/barrier | node/access | bothw |
|
||||
| primary | bollard | yes | x |
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @bicycle @destination
|
||||
Feature: Destination only, no passing through
|
||||
Feature: Bike - Destination only, no passing through
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Destination only street
|
||||
Scenario: Bike - Destination only street
|
||||
Given the node map
|
||||
| a | | | | |
|
||||
| | b | c | d | |
|
||||
@ -31,7 +31,7 @@ Feature: Destination only, no passing through
|
||||
| d | c | bcd |
|
||||
| d | b | bcd |
|
||||
|
||||
Scenario: Series of destination only streets
|
||||
Scenario: Bike - Series of destination only streets
|
||||
Given the node map
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
@ -50,7 +50,7 @@ Feature: Destination only, no passing through
|
||||
| a | d | ab |
|
||||
| a | e | ab |
|
||||
|
||||
Scenario: Routing inside a destination only area
|
||||
Scenario: Bike - Routing inside a destination only area
|
||||
Given the node map
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @bicycle @ferry
|
||||
Feature: Handle ferry routes
|
||||
Feature: Bike - Handle ferry routes
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Use a ferry route
|
||||
Scenario: Bike - Use a ferry route
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @bicycle @names
|
||||
Feature: Street names in instructions
|
||||
Feature: Bike - Street names in instructions
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: A named street
|
||||
Scenario: Bike - A named street
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
@ -18,7 +18,7 @@ Feature: Street names in instructions
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way |
|
||||
|
||||
Scenario: Use way type to describe unnamed ways
|
||||
Scenario: Bike - Use way type to describe unnamed ways
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
|
||||
@ -31,7 +31,7 @@ Feature: Street names in instructions
|
||||
| from | to | route |
|
||||
| a | c | cycleway,track |
|
||||
|
||||
Scenario: Don't create instructions for every node of unnamed ways
|
||||
Scenario: Bike - Don't create instructions for every node of unnamed ways
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
@routing @bicycle @oneway
|
||||
Feature: Oneway streets
|
||||
Feature: Bike - Oneway streets
|
||||
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Simple oneway
|
||||
Scenario: Bike - Simple oneway
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| primary | yes | x | |
|
||||
@ -15,7 +15,7 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| highway | oneway | forw | backw |
|
||||
| primary | -1 | | x |
|
||||
|
||||
Scenario: Around the Block
|
||||
Scenario: Bike - Around the Block
|
||||
Given the node map
|
||||
| a | b |
|
||||
| d | c |
|
||||
@ -32,7 +32,7 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| a | b | ab |
|
||||
| b | a | bc,cd,da |
|
||||
|
||||
Scenario: Handle various oneway tag values
|
||||
Scenario: Bike - Handle various oneway tag values
|
||||
Then routability should be
|
||||
| oneway | forw | backw |
|
||||
| | x | x |
|
||||
@ -45,7 +45,7 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| 1 | x | |
|
||||
| -1 | | x |
|
||||
|
||||
Scenario: Implied oneways
|
||||
Scenario: Bike - Implied oneways
|
||||
Then routability should be
|
||||
| junction | forw | backw |
|
||||
| | x | x |
|
||||
@ -60,7 +60,7 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| roundabout | x | |
|
||||
| roundabout | x | |
|
||||
|
||||
Scenario: Overriding implied oneways
|
||||
Scenario: Bike - Overriding implied oneways
|
||||
Then routability should be
|
||||
| highway | junction | oneway | forw | backw |
|
||||
| primary | roundabout | no | x | x |
|
||||
@ -69,8 +69,7 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| trunk_link | | -1 | | |
|
||||
| primary | roundabout | -1 | | x |
|
||||
|
||||
@bicycle
|
||||
Scenario: Oneway:bicycle should override normal oneways tags
|
||||
Scenario: Bike - Oneway:bicycle should override normal oneways tags
|
||||
Then routability should be
|
||||
| oneway:bicycle | oneway | junction | forw | backw |
|
||||
| yes | | | x | |
|
||||
@ -89,8 +88,7 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| -1 | -1 | | | x |
|
||||
| -1 | | roundabout | | x |
|
||||
|
||||
@bicycle
|
||||
Scenario: Bicycles and contra flow
|
||||
Scenario: Bike - Contra flow
|
||||
Then routability should be
|
||||
| oneway | cycleway | forw | backw |
|
||||
| yes | opposite | x | x |
|
||||
@ -103,7 +101,7 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| no | opposite_track | x | x |
|
||||
| no | opposite_lane | x | x |
|
||||
|
||||
Scenario: Bikes should not be affected by car tags
|
||||
Scenario: Bike - Should not be affected by car tags
|
||||
Then routability should be
|
||||
| junction | oneway | oneway:car | forw | backw |
|
||||
| | yes | yes | x | |
|
||||
|
@ -1,5 +1,5 @@
|
||||
@routing @bicycle @restrictions
|
||||
Feature: Turn restrictions
|
||||
Feature: Bike - Turn restrictions
|
||||
Handle turn restrictions as defined by http://wiki.openstreetmap.org/wiki/Relation:restriction
|
||||
Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
|
||||
|
||||
@ -7,7 +7,7 @@ Feature: Turn restrictions
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
@no_turning
|
||||
Scenario: No left turn
|
||||
Scenario: Bike - No left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -31,7 +31,7 @@ Feature: Turn restrictions
|
||||
| s | e | sj,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: No right turn
|
||||
Scenario: Bike - No right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -55,7 +55,7 @@ Feature: Turn restrictions
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: No u-turn
|
||||
Scenario: Bike - No u-turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -79,7 +79,7 @@ Feature: Turn restrictions
|
||||
| s | e | sj,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Handle any no_* relation
|
||||
Scenario: Bike - Handle any no_* relation
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -103,7 +103,7 @@ Feature: Turn restrictions
|
||||
| s | e | sj,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Only left turn
|
||||
Scenario: Bike - Only left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -127,7 +127,7 @@ Feature: Turn restrictions
|
||||
| s | e | |
|
||||
|
||||
@only_turning
|
||||
Scenario: Only right turn
|
||||
Scenario: Bike - Only right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -151,7 +151,7 @@ Feature: Turn restrictions
|
||||
| s | e | sj,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Only straight on
|
||||
Scenario: Bike - Only straight on
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -175,7 +175,7 @@ Feature: Turn restrictions
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: Handle any only_* restriction
|
||||
Scenario: Bike - Handle any only_* restriction
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @bicycle @way
|
||||
Feature: Accessability of different way types
|
||||
Feature: Bike - Accessability of different way types
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Basic access for bicycles
|
||||
Scenario: Bike - Basic access
|
||||
Bikes are allowed on footways etc because you can pull your bike at a lower speed.
|
||||
Given the speedprofile "bicycle"
|
||||
Then routability should be
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @car @access
|
||||
Feature: Restricted access
|
||||
Feature: Car - Restricted access
|
||||
|
||||
Background:
|
||||
Given the speedprofile "car"
|
||||
|
||||
Scenario: Access tags on ways
|
||||
Scenario: Car - Access tags on ways
|
||||
Then routability should be
|
||||
| access | bothw |
|
||||
| yes | x |
|
||||
@ -20,7 +20,7 @@ Feature: Restricted access
|
||||
| designated | |
|
||||
| some_tag | x |
|
||||
|
||||
Scenario: Access tags for other modes should have no effect
|
||||
Scenario: Car - Access tags for other modes should have no effect
|
||||
Then routability should be
|
||||
| access | bothw |
|
||||
| ufo:yes | x |
|
||||
@ -36,7 +36,7 @@ Feature: Restricted access
|
||||
| ufo:designated | x |
|
||||
| ufo:some_tag | x |
|
||||
|
||||
Scenario: Access tags on nodes
|
||||
Scenario: Car - Access tags on nodes
|
||||
Then routability should be
|
||||
| node:access | bothw |
|
||||
| yes | x |
|
||||
@ -52,7 +52,7 @@ Feature: Restricted access
|
||||
| designated | |
|
||||
| some_tag | x |
|
||||
|
||||
Scenario: Access tags on both nodes and way
|
||||
Scenario: Car - Access tags on both nodes and way
|
||||
Then routability should be
|
||||
| access | node:access | bothw |
|
||||
| yes | yes | x |
|
||||
@ -63,4 +63,4 @@ Feature: Restricted access
|
||||
| no | some_tag | |
|
||||
| some_tag | yes | |
|
||||
| some_tag | no | |
|
||||
| some_tag | some_tag | |
|
||||
| some_tag | some_tag | |
|
@ -1,10 +1,10 @@
|
||||
@routing @car @barrier
|
||||
Feature: Barriers
|
||||
Feature: Car - Barriers
|
||||
|
||||
Background:
|
||||
Given the speedprofile "car"
|
||||
|
||||
Scenario: Barriers
|
||||
Scenario: Car - Barriers
|
||||
Then routability should be
|
||||
| highway | node/barrier | node/access | bothw |
|
||||
| primary | | | x |
|
||||
@ -16,7 +16,7 @@ Feature: Barriers
|
||||
| primary | bollard | | |
|
||||
| primary | some_tag | | |
|
||||
|
||||
Scenario: Access tag trumphs barriers
|
||||
Scenario: Car - Access tag trumphs barriers
|
||||
Then routability should be
|
||||
| highway | node/barrier | node/access | bothw |
|
||||
| primary | bollard | yes | x |
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @car @destination
|
||||
Feature: Destination only, no passing through
|
||||
Feature: Car - Destination only, no passing through
|
||||
|
||||
Background:
|
||||
Given the speedprofile "car"
|
||||
|
||||
Scenario: Destination only street
|
||||
Scenario: Car - Destination only street
|
||||
Given the node map
|
||||
| a | | | | |
|
||||
| | b | c | d | |
|
||||
@ -31,7 +31,7 @@ Feature: Destination only, no passing through
|
||||
| d | c | bcd |
|
||||
| d | b | bcd |
|
||||
|
||||
Scenario: Series of destination only streets
|
||||
Scenario: Car - Series of destination only streets
|
||||
Given the node map
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
@ -50,7 +50,7 @@ Feature: Destination only, no passing through
|
||||
| a | d | ab |
|
||||
| a | e | ab |
|
||||
|
||||
Scenario: Routing inside a destination only area
|
||||
Scenario: Car - Routing inside a destination only area
|
||||
Given the node map
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @car @ferry
|
||||
Feature: Handle ferry routes
|
||||
Feature: Car - Handle ferry routes
|
||||
|
||||
Background:
|
||||
Given the speedprofile "car"
|
||||
|
||||
Scenario: Use a ferry route
|
||||
Scenario: Car - Use a ferry route
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @car @names
|
||||
Feature: Street names in instructions
|
||||
Feature: Car - Street names in instructions
|
||||
|
||||
Background:
|
||||
Given the speedprofile "car"
|
||||
|
||||
Scenario: A named street
|
||||
Scenario: Car - A named street
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
@ -18,7 +18,7 @@ Feature: Street names in instructions
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way |
|
||||
|
||||
Scenario: Use way type to describe unnamed ways
|
||||
Scenario: Car - Use way type to describe unnamed ways
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
|
||||
@ -31,7 +31,7 @@ Feature: Street names in instructions
|
||||
| from | to | route |
|
||||
| a | c | tertiary,residential |
|
||||
|
||||
Scenario: Don't create instructions for every node of unnamed ways
|
||||
Scenario: Car - Don't create instructions for every node of unnamed ways
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
|
||||
|
@ -1,21 +1,21 @@
|
||||
@routing @car @oneway
|
||||
Feature: Oneway streets
|
||||
Feature: Car - Oneway streets
|
||||
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
||||
|
||||
Background:
|
||||
Given the speedprofile "car"
|
||||
|
||||
Scenario: Simple oneway
|
||||
Scenario: Car - Simple oneway
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| primary | yes | x | |
|
||||
|
||||
Scenario: Simple reverse oneway
|
||||
Scenario: Car - Simple reverse oneway
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| primary | -1 | | x |
|
||||
|
||||
Scenario: Around the Block
|
||||
Scenario: Car - Around the Block
|
||||
Given the node map
|
||||
| a | b |
|
||||
| d | c |
|
||||
@ -32,7 +32,7 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| a | b | ab |
|
||||
| b | a | bc,cd,da |
|
||||
|
||||
Scenario: Cars should not be affected by bicycle tags
|
||||
Scenario: Car - Cars should not be affected by bicycle tags
|
||||
Then routability should be
|
||||
| highway | junction | oneway | oneway:bicycle | forw | backw |
|
||||
| primary | | yes | yes | x | |
|
||||
|
@ -1,5 +1,5 @@
|
||||
@routing @car @restrictions
|
||||
Feature: Turn restrictions
|
||||
Feature: Car - Turn restrictions
|
||||
Handle turn restrictions as defined by http://wiki.openstreetmap.org/wiki/Relation:restriction
|
||||
Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
|
||||
|
||||
@ -7,7 +7,7 @@ Feature: Turn restrictions
|
||||
Given the speedprofile "car"
|
||||
|
||||
@no_turning
|
||||
Scenario: No left turn
|
||||
Scenario: Car - No left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -31,7 +31,7 @@ Feature: Turn restrictions
|
||||
| s | e | sj,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: No right turn
|
||||
Scenario: Car - No right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -55,7 +55,7 @@ Feature: Turn restrictions
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: No u-turn
|
||||
Scenario: Car - No u-turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -79,7 +79,7 @@ Feature: Turn restrictions
|
||||
| s | e | sj,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Handle any no_* relation
|
||||
Scenario: Car - Handle any no_* relation
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -103,7 +103,7 @@ Feature: Turn restrictions
|
||||
| s | e | sj,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Only left turn
|
||||
Scenario: Car - Only left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -127,7 +127,7 @@ Feature: Turn restrictions
|
||||
| s | e | |
|
||||
|
||||
@only_turning
|
||||
Scenario: Only right turn
|
||||
Scenario: Car - Only right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -151,7 +151,7 @@ Feature: Turn restrictions
|
||||
| s | e | sj,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Only straight on
|
||||
Scenario: Car - Only straight on
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
@ -175,7 +175,7 @@ Feature: Turn restrictions
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: Handle any only_* restriction
|
||||
Scenario: Car - Handle any only_* restriction
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @car @way
|
||||
Feature: Accessability of different way types
|
||||
Feature: Car - Accessability of different way types
|
||||
|
||||
Background:
|
||||
Given the speedprofile "car"
|
||||
|
||||
Scenario: Basic access for cars
|
||||
Scenario: Car - Basic access
|
||||
Then routability should be
|
||||
| highway | forw |
|
||||
| motorway | x |
|
||||
@ -29,4 +29,4 @@ Feature: Accessability of different way types
|
||||
| steps | |
|
||||
| pier | |
|
||||
| cycleway | |
|
||||
| bridleway | |
|
||||
| bridleway | |
|
@ -1,11 +1,11 @@
|
||||
@routing @foot @oneway
|
||||
Feature: Oneway streets
|
||||
Feature: Foot - Oneway streets
|
||||
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
||||
|
||||
Background:
|
||||
Given the speedprofile "foot"
|
||||
|
||||
Scenario: Walking should not be affected by oneways
|
||||
Scenario: Foot - Walking should not be affected by oneways
|
||||
Then routability should be
|
||||
| oneway | bothw |
|
||||
| | x |
|
||||
@ -18,12 +18,12 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| 1 | x |
|
||||
| -1 | x |
|
||||
|
||||
Scenario: Walking and roundabouts
|
||||
Scenario: Foot - Walking and roundabouts
|
||||
Then routability should be
|
||||
| junction | bothw |
|
||||
| roundarout | x |
|
||||
|
||||
Scenario: 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
|
||||
| highway | oneway:foot | bothw |
|
||||
| motorway | yes | |
|
||||
@ -39,7 +39,7 @@ Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tag
|
||||
| trunk | -1 | |
|
||||
| trunk_link | -1 | |
|
||||
|
||||
Scenario: Walking should respect oneway:foot
|
||||
Scenario: Foot - Walking should respect oneway:foot
|
||||
Then routability should be
|
||||
| oneway:foot | oneway | junction | forw | backw |
|
||||
| yes | | | x | |
|
||||
|
@ -1,10 +1,10 @@
|
||||
@routing @foot @way
|
||||
Feature: Accessability of different way types
|
||||
Feature: Foot - Accessability of different way types
|
||||
|
||||
Background:
|
||||
Given the speedprofile "foot"
|
||||
|
||||
Scenario: Basic access for walking
|
||||
Scenario: Foot - Basic access
|
||||
Then routability should be
|
||||
| highway | forw |
|
||||
| motorway | |
|
||||
|
@ -1,39 +0,0 @@
|
||||
@routing @weird
|
||||
Feature: Weird routings discovered
|
||||
|
||||
Scenario: Routing on a oneway roundabout
|
||||
Given the node map
|
||||
| | d | c | |
|
||||
| e | | | b |
|
||||
| f | | | a |
|
||||
| | g | h | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| ab | yes |
|
||||
| bc | yes |
|
||||
| cd | yes |
|
||||
| de | yes |
|
||||
| ef | yes |
|
||||
| fg | yes |
|
||||
| gh | yes |
|
||||
| ha | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | c | bc |
|
||||
| c | d | cd |
|
||||
| d | e | de |
|
||||
| e | f | ef |
|
||||
| f | g | fg |
|
||||
| g | h | gh |
|
||||
| h | a | ha |
|
||||
| b | a | bc,cd,de,ef,fg,gh,ha |
|
||||
| c | b | cd,de,ef,fg,gh,ha,ab |
|
||||
| d | c | de,ef,fg,gh,ha,ab,bc |
|
||||
| e | d | ef,fg,gh,ha,ab,bc,cd |
|
||||
| f | e | fg,gh,ha,ab,bc,cd,de |
|
||||
| g | f | gh,ha,ab,bc,cd,de,ef |
|
||||
| h | g | ha,ab,bc,cd,de,ef,fg |
|
||||
| a | h | ab,bc,cd,de,ef,fg,gh |
|
42
features/investigate/weird.feature
Normal file
42
features/investigate/weird.feature
Normal file
@ -0,0 +1,42 @@
|
||||
@routing @weird
|
||||
Feature: Weird routings discovered
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Routing on a oneway roundabout
|
||||
Given the node map
|
||||
| | d | c | |
|
||||
| e | | | b |
|
||||
| f | | | a |
|
||||
| | g | h | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| ab | yes |
|
||||
| bc | yes |
|
||||
| cd | yes |
|
||||
| de | yes |
|
||||
| ef | yes |
|
||||
| fg | yes |
|
||||
| gh | yes |
|
||||
| ha | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | c | bc |
|
||||
| c | d | cd |
|
||||
| d | e | de |
|
||||
| e | f | ef |
|
||||
| f | g | fg |
|
||||
| g | h | gh |
|
||||
| h | a | ha |
|
||||
| b | a | bc,cd,de,ef,fg,gh,ha |
|
||||
| c | b | cd,de,ef,fg,gh,ha,ab |
|
||||
| d | c | de,ef,fg,gh,ha,ab,bc |
|
||||
| e | d | ef,fg,gh,ha,ab,bc,cd |
|
||||
| f | e | fg,gh,ha,ab,bc,cd,de |
|
||||
| g | f | gh,ha,ab,bc,cd,de,ef |
|
||||
| h | g | ha,ab,bc,cd,de,ef,fg |
|
||||
| a | h | ab,bc,cd,de,ef,fg,gh |
|
@ -1,6 +1,9 @@
|
||||
@routing @bad
|
||||
Feature: Handle bad data in a graceful manner
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Empty dataset
|
||||
Given the node map
|
||||
| |
|
@ -1,6 +1,9 @@
|
||||
@routing @basic
|
||||
Feature: Basic Routing
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
@smallest
|
||||
Scenario: A single way with two nodes
|
||||
Given the node map
|
||||
@ -213,4 +216,41 @@ Feature: Basic Routing
|
||||
| a | d | abcd |
|
||||
| d | a | efgh |
|
||||
| a | m | aeim |
|
||||
| m | a | aeim |
|
||||
| m | a | aeim |
|
||||
|
||||
Scenario: Routing on a oneway roundabout
|
||||
Given the node map
|
||||
| | d | c | |
|
||||
| e | | | b |
|
||||
| f | | | a |
|
||||
| | g | h | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| ab | yes |
|
||||
| bc | yes |
|
||||
| cd | yes |
|
||||
| de | yes |
|
||||
| ef | yes |
|
||||
| fg | yes |
|
||||
| gh | yes |
|
||||
| ha | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | c | bc |
|
||||
| c | d | cd |
|
||||
| d | e | de |
|
||||
| e | f | ef |
|
||||
| f | g | fg |
|
||||
| g | h | gh |
|
||||
| h | a | ha |
|
||||
| b | a | bc,cd,de,ef,fg,gh,ha |
|
||||
| c | b | cd,de,ef,fg,gh,ha,ab |
|
||||
| d | c | de,ef,fg,gh,ha,ab,bc |
|
||||
| e | d | ef,fg,gh,ha,ab,bc,cd |
|
||||
| f | e | fg,gh,ha,ab,bc,cd,de |
|
||||
| g | f | gh,ha,ab,bc,cd,de,ef |
|
||||
| h | g | ha,ab,bc,cd,de,ef,fg |
|
||||
| a | h | ab,bc,cd,de,ef,fg,gh |
|
@ -1,7 +1,9 @@
|
||||
@routing @bearing
|
||||
Feature: Compass bearing
|
||||
|
||||
@northwest
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Bearing when going northwest
|
||||
Given the node map
|
||||
| b | |
|
||||
@ -15,7 +17,6 @@ Feature: Compass bearing
|
||||
| from | to | route | compass | bearing |
|
||||
| a | b | ab | NW | 315 |
|
||||
|
||||
@west
|
||||
Scenario: Bearing when going west
|
||||
Given the node map
|
||||
| b | a |
|
@ -1,7 +1,9 @@
|
||||
@routing @distance
|
||||
Feature: Distance calculation
|
||||
|
||||
@winding
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Distance should equal sum of segments, leftwinded
|
||||
Given the node map
|
||||
| e | |
|
||||
@ -16,7 +18,6 @@ Feature: Distance calculation
|
||||
| from | to | route | distance |
|
||||
| a | d | abcde | 300 +-1 |
|
||||
|
||||
@winding
|
||||
Scenario: Distance should equal sum of segments, rightwinded
|
||||
Given the node map
|
||||
| | e |
|
@ -1,6 +1,8 @@
|
||||
@routing @origin
|
||||
Feature: Routing close to the [0,0] origin
|
||||
Reference distances have been calculated usign http://seismo.cqu.edu.au/CQSRG/VDistance/
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: East-west oneways close to the origin
|
||||
Given the node locations
|
@ -1,6 +1,6 @@
|
||||
@routing @penalty @signal
|
||||
Feature: Penalties
|
||||
Testbot uses a signal penalty of 7s
|
||||
Testbot uses a signal penalty of 7s.
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
@ -1,6 +1,6 @@
|
||||
@routing @planetary
|
||||
Feature: Distance calculation
|
||||
#reference distances have been calculated usign http://seismo.cqu.edu.au/CQSRG/VDistance/
|
||||
Reference distances have been calculated usign http://seismo.cqu.edu.au/CQSRG/VDistance/
|
||||
|
||||
Scenario: Longitudinal distances at equator
|
||||
Given the node locations
|
@ -1,6 +1,9 @@
|
||||
@routing @snap
|
||||
Feature: Snap start/end point to the nearest way
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Snap to nearest protruding oneway
|
||||
Given the node map
|
||||
| | 1 | | 2 | |
|
@ -8,7 +8,6 @@ Tertiary road: 12km/h = 12000m/3600s = 100m/30s
|
||||
Background: Use specific speeds
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
@basic_time
|
||||
Scenario: Basic travel time, 1m scale
|
||||
Given a grid size of 1 meters
|
||||
Given the node map
|
||||
@ -38,7 +37,6 @@ Tertiary road: 12km/h = 12000m/3600s = 100m/30s
|
||||
| x | g | xg | 0s +-1 |
|
||||
| x | h | xh | 0s +-1 |
|
||||
|
||||
@basic_time
|
||||
Scenario: Basic travel time, 10m scale
|
||||
Given a grid size of 10 meters
|
||||
Given the node map
|
||||
@ -68,7 +66,6 @@ Tertiary road: 12km/h = 12000m/3600s = 100m/30s
|
||||
| x | g | xg | 1s +-1 |
|
||||
| x | h | xh | 1s +-1 |
|
||||
|
||||
@basic_time
|
||||
Scenario: Basic travel time, 100m scale
|
||||
Given a grid size of 100 meters
|
||||
Given the node map
|
||||
@ -98,7 +95,6 @@ Tertiary road: 12km/h = 12000m/3600s = 100m/30s
|
||||
| x | g | xg | 10s +-1 |
|
||||
| x | h | xh | 14s +-1 |
|
||||
|
||||
@basic_time
|
||||
Scenario: Basic travel time, 1km scale
|
||||
Given a grid size of 1000 meters
|
||||
Given the node map
|
||||
@ -128,7 +124,6 @@ Tertiary road: 12km/h = 12000m/3600s = 100m/30s
|
||||
| x | g | xg | 100s +-1 |
|
||||
| x | h | xh | 141s +-1 |
|
||||
|
||||
@basic_time
|
||||
Scenario: Basic travel time, 10km scale
|
||||
Given a grid size of 10000 meters
|
||||
Given the node map
|
@ -1,5 +1,8 @@
|
||||
@routing @utf
|
||||
Feature: Basic Routing
|
||||
Feature: Handling of UTF characters
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Streetnames with UTF characters
|
||||
Given the node map
|
@ -42,9 +42,21 @@ function way_function (way, numberOfNodesInWay)
|
||||
|
||||
local highway = way.tags:Find("highway")
|
||||
local name = way.tags:Find("name")
|
||||
local oneway = way.tags:Find("oneway")
|
||||
|
||||
way.name = name
|
||||
way.speed = speed_profile[highway] or speed_profile['default']
|
||||
way.direction = Way.bidirectional
|
||||
|
||||
if oneway == "no" or oneway == "0" or oneway == "false" then
|
||||
way.direction = Way.bidirectional
|
||||
elseif oneway == "-1" then
|
||||
way.direction = Way.opposite
|
||||
elseif oneway == "yes" or oneway == "1" or oneway == "true" then
|
||||
way.direction = Way.oneway
|
||||
else
|
||||
way.direction = Way.bidirectional
|
||||
end
|
||||
|
||||
way.type = 1
|
||||
return 1
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user