more reorganizing of tests
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
@routing @bad
|
||||
Feature: Handle bad data in a graceful manner
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Empty dataset
|
||||
Given the node map
|
||||
| |
|
||||
|
||||
Given the ways
|
||||
| nodes |
|
||||
|
||||
When I preprocess data
|
||||
Then preparing should return code 255
|
||||
|
||||
Scenario: Only dead-end oneways
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
|
||||
Given the ways
|
||||
| nodes | oneway |
|
||||
| ab | yes |
|
||||
| cb | yes |
|
||||
|
||||
When I preprocess data
|
||||
Then preparing should return code 255
|
||||
|
||||
Scenario: Start/end point at the same location
|
||||
Given the node map
|
||||
| a | b |
|
||||
| 1 | 2 |
|
||||
|
||||
Given the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | a | |
|
||||
| b | b | |
|
||||
| 1 | 1 | |
|
||||
| 2 | 2 | |
|
||||
|
||||
@poles
|
||||
Scenario: Routing close to the north/south pole
|
||||
Mercator is undefined close to the poles.
|
||||
All nodes and request with latitude to close to either of the poles should therefore be ignored.
|
||||
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 89 | 0 |
|
||||
| b | 87 | 0 |
|
||||
| c | 82 | 0 |
|
||||
| d | 80 | 0 |
|
||||
| e | 78 | 0 |
|
||||
| k | -78 | 0 |
|
||||
| l | -80 | 0 |
|
||||
| m | -82 | 0 |
|
||||
| n | -87 | 0 |
|
||||
| o | -89 | 0 |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| cd |
|
||||
| de |
|
||||
| kl |
|
||||
| lm |
|
||||
| mn |
|
||||
| no |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | |
|
||||
| b | c | |
|
||||
| a | d | |
|
||||
| c | d | cd |
|
||||
| l | m | lm |
|
||||
| o | l | |
|
||||
| n | m | |
|
||||
| o | n | |
|
||||
@@ -0,0 +1,256 @@
|
||||
@routing @basic
|
||||
Feature: Basic Routing
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
@smallest
|
||||
Scenario: A single way with two nodes
|
||||
Given the node map
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | a | ab |
|
||||
|
||||
Scenario: Routing in between two nodes of way
|
||||
Given the node map
|
||||
| a | b | 1 | 2 | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcd |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| 1 | 2 | abcd |
|
||||
| 2 | 1 | abcd |
|
||||
|
||||
Scenario: Routing between the middle nodes of way
|
||||
Given the node map
|
||||
| a | b | c | d | e | f |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcdef |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | c | abcdef |
|
||||
| b | d | abcdef |
|
||||
| b | e | abcdef |
|
||||
| c | b | abcdef |
|
||||
| c | d | abcdef |
|
||||
| c | e | abcdef |
|
||||
| d | b | abcdef |
|
||||
| d | c | abcdef |
|
||||
| d | e | abcdef |
|
||||
| e | b | abcdef |
|
||||
| e | c | abcdef |
|
||||
| e | d | abcdef |
|
||||
|
||||
Scenario: Two ways connected in a straight line
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | ab,bc |
|
||||
| c | a | bc,ab |
|
||||
| a | b | ab |
|
||||
| b | a | ab |
|
||||
| b | c | bc |
|
||||
| c | b | bc |
|
||||
|
||||
Scenario: 2 unconnected parallel ways
|
||||
Given the node map
|
||||
| a | b |
|
||||
| c | d |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| cd |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | a | ab |
|
||||
| c | d | cd |
|
||||
| d | c | cd |
|
||||
| a | c | |
|
||||
| c | a | |
|
||||
| b | d | |
|
||||
| d | b | |
|
||||
| a | d | |
|
||||
| d | a | |
|
||||
|
||||
Scenario: 3 ways connected in a triangle
|
||||
Given the node map
|
||||
| a | | b |
|
||||
| | | |
|
||||
| | c | |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| ca |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ca |
|
||||
| b | c | bc |
|
||||
| b | a | ab |
|
||||
| c | a | ca |
|
||||
| c | b | bc |
|
||||
|
||||
Scenario: 3 connected triangles
|
||||
Given a grid size of 100 meters
|
||||
Given the node map
|
||||
| x | a | | b | s |
|
||||
| y | | | | t |
|
||||
| | | c | | |
|
||||
| | v | | w | |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| ca |
|
||||
| ax |
|
||||
| xy |
|
||||
| ya |
|
||||
| bs |
|
||||
| st |
|
||||
| tb |
|
||||
| cv |
|
||||
| vw |
|
||||
| wc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ca |
|
||||
| b | c | bc |
|
||||
| b | a | ab |
|
||||
| c | a | ca |
|
||||
| c | b | bc |
|
||||
|
||||
Scenario: To ways connected at a 45 degree angle
|
||||
Given the node map
|
||||
| a | | |
|
||||
| b | | |
|
||||
| c | d | e |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abc |
|
||||
| cde |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | d | abc,cde |
|
||||
| a | e | abc,cde |
|
||||
| a | c | abc |
|
||||
| c | a | abc |
|
||||
| c | e | cde |
|
||||
| e | c | cde |
|
||||
|
||||
Scenario: Grid city center
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
| e | f | g | h |
|
||||
| i | j | k | l |
|
||||
| m | n | o | p |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcd |
|
||||
| efgh |
|
||||
| ijkl |
|
||||
| mnop |
|
||||
| aeim |
|
||||
| bfjn |
|
||||
| cgko |
|
||||
| dhlp |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| f | g | efgh |
|
||||
| g | f | efgh |
|
||||
| f | j | bfjn |
|
||||
| j | f | bfjn |
|
||||
|
||||
Scenario: Grid city periphery
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
| e | f | g | h |
|
||||
| i | j | k | l |
|
||||
| m | n | o | p |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcd |
|
||||
| efgh |
|
||||
| ijkl |
|
||||
| mnop |
|
||||
| aeim |
|
||||
| bfjn |
|
||||
| cgko |
|
||||
| dhlp |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | abcd |
|
||||
| d | a | efgh |
|
||||
| a | m | 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 |
|
||||
@@ -0,0 +1,141 @@
|
||||
@routing @bearing
|
||||
Feature: Compass bearing
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Bearing when going northwest
|
||||
Given the node map
|
||||
| b | |
|
||||
| | a |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | b | ab | NW | 315 |
|
||||
|
||||
Scenario: Bearing when going west
|
||||
Given the node map
|
||||
| b | a |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | b | ab | W | 270 |
|
||||
|
||||
Scenario: Bearing af 45 degree intervals
|
||||
Given the node map
|
||||
| b | a | h |
|
||||
| c | x | g |
|
||||
| d | e | f |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| xa |
|
||||
| xb |
|
||||
| xc |
|
||||
| xd |
|
||||
| xe |
|
||||
| xf |
|
||||
| xg |
|
||||
| xh |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| x | a | xa | N | 0 |
|
||||
| x | b | xb | NW | 315 |
|
||||
| x | c | xc | W | 270 |
|
||||
| x | d | xd | SW | 225 |
|
||||
| x | e | xe | S | 180 |
|
||||
| x | f | xf | SE | 135 |
|
||||
| x | g | xg | E | 90 |
|
||||
| x | h | xh | NE | 45 |
|
||||
|
||||
Scenario: Bearing in a 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 | compass | bearing |
|
||||
| c | b | cd,de,ef,fg,gh,ha,ab | W,SW,S,SE,E,NE,N | 270,225,180,135,90,45,0 |
|
||||
| g | f | gh,ha,ab,bc,cd,de,ef | E,NE,N,NW,W,SW,S | 90,45,0,315,270,225,180 |
|
||||
|
||||
Scenario: Bearing should stay constant when zig-zagging
|
||||
Given the node map
|
||||
| b | d | f | h |
|
||||
| a | c | e | g |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| cd |
|
||||
| de |
|
||||
| ef |
|
||||
| fg |
|
||||
| gh |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | h | ab,bc,cd,de,ef,fg,gh | N,SE,N,SE,N,SE,N | 0,135,0,135,0,135,0 |
|
||||
|
||||
Scenario: Bearings on an east-west way.
|
||||
Given the node map
|
||||
| a | b | c | d | e | f |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcdef |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | b | abcdef | E | 90 |
|
||||
| a | c | abcdef | E | 90 |
|
||||
| a | d | abcdef | E | 90 |
|
||||
| a | e | abcdef | E | 90 |
|
||||
| a | f | abcdef | E | 90 |
|
||||
| b | a | abcdef | W | 270 |
|
||||
| b | c | abcdef | E | 90 |
|
||||
| b | d | abcdef | E | 90 |
|
||||
| b | e | abcdef | E | 90 |
|
||||
| b | f | abcdef | E | 90 |
|
||||
| c | a | abcdef | W | 270 |
|
||||
| c | b | abcdef | W | 270 |
|
||||
| c | d | abcdef | E | 90 |
|
||||
| c | e | abcdef | E | 90 |
|
||||
| c | f | abcdef | E | 90 |
|
||||
| d | a | abcdef | W | 270 |
|
||||
| d | b | abcdef | W | 270 |
|
||||
| d | c | abcdef | W | 270 |
|
||||
| d | e | abcdef | E | 90 |
|
||||
| d | f | abcdef | E | 90 |
|
||||
| e | a | abcdef | W | 270 |
|
||||
| e | b | abcdef | W | 270 |
|
||||
| e | c | abcdef | W | 270 |
|
||||
| e | d | abcdef | W | 270 |
|
||||
| e | f | abcdef | E | 90 |
|
||||
| f | a | abcdef | W | 270 |
|
||||
| f | b | abcdef | W | 270 |
|
||||
| f | c | abcdef | W | 270 |
|
||||
| f | d | abcdef | W | 270 |
|
||||
| f | e | abcdef | W | 270 |
|
||||
@@ -0,0 +1,218 @@
|
||||
@routing @distance
|
||||
Feature: Distance calculation
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Distance should equal sum of segments, leftwinded
|
||||
Given the node map
|
||||
| e | |
|
||||
| d | c |
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcde |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | d | abcde | 300 +-1 |
|
||||
|
||||
Scenario: Distance should equal sum of segments, rightwinded
|
||||
Given the node map
|
||||
| | e |
|
||||
| c | d |
|
||||
| b | a |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcde |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | d | abcde | 300 +-1 |
|
||||
|
||||
Scenario: 1m distances
|
||||
Given a grid size of 1 meters
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abc | 1 +-1 |
|
||||
| b | a | abc | 1 +-1 |
|
||||
| b | c | abc | 1 +-1 |
|
||||
| c | b | abc | 1 +-1 |
|
||||
| a | c | abc | 2 +-1 |
|
||||
| c | a | abc | 2 +-1 |
|
||||
|
||||
Scenario: 10m distances
|
||||
Given a grid size of 10 meters
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abc | 10 +-1 |
|
||||
| b | a | abc | 10 +-1 |
|
||||
| b | c | abc | 10 +-1 |
|
||||
| c | b | abc | 10 +-1 |
|
||||
| a | c | abc | 20 +-1 |
|
||||
| c | a | abc | 20 +-1 |
|
||||
|
||||
Scenario: 100m distances
|
||||
Given a grid size of 100 meters
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abc | 100 +-1 |
|
||||
| b | a | abc | 100 +-1 |
|
||||
| b | c | abc | 100 +-1 |
|
||||
| c | b | abc | 100 +-1 |
|
||||
| a | c | abc | 200 +-1 |
|
||||
| c | a | abc | 200 +-1 |
|
||||
|
||||
Scenario: 1km distance
|
||||
Given a grid size of 1000 meters
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abc | 1000 +-1 |
|
||||
| b | a | abc | 1000 +-1 |
|
||||
| b | c | abc | 1000 +-1 |
|
||||
| c | b | abc | 1000 +-1 |
|
||||
| a | c | abc | 2000 +-1 |
|
||||
| c | a | abc | 2000 +-1 |
|
||||
|
||||
@winding
|
||||
Scenario: Distance of a winding south-north path
|
||||
Given a grid size of 10 meters
|
||||
Given the node map
|
||||
| a | b |
|
||||
| d | c |
|
||||
| e | f |
|
||||
| h | g |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcdefgh |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abcdefgh | 10 +-1 |
|
||||
| a | c | abcdefgh | 20 +-1 |
|
||||
| a | d | abcdefgh | 30 +-1 |
|
||||
| a | e | abcdefgh | 40 +-1 |
|
||||
| a | f | abcdefgh | 50 +-1 |
|
||||
| a | g | abcdefgh | 60 +-1 |
|
||||
| a | h | abcdefgh | 70 +-1 |
|
||||
|
||||
@winding
|
||||
Scenario: Distance of a winding east-west path
|
||||
Given a grid size of 10 meters
|
||||
Given the node map
|
||||
| a | d | e | h |
|
||||
| b | c | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcdefgh |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abcdefgh | 10 +-1 |
|
||||
| a | c | abcdefgh | 20 +-1 |
|
||||
| a | d | abcdefgh | 30 +-1 |
|
||||
| a | e | abcdefgh | 40 +-1 |
|
||||
| a | f | abcdefgh | 50 +-1 |
|
||||
| a | g | abcdefgh | 60 +-1 |
|
||||
| a | h | abcdefgh | 70 +-1 |
|
||||
|
||||
Scenario: Geometric distances
|
||||
Given a grid size of 1000 meters
|
||||
Given the node map
|
||||
| v | w | y | a | b | c | d |
|
||||
| u | | | | | | e |
|
||||
| t | | | | | | f |
|
||||
| s | | | x | | | g |
|
||||
| r | | | | | | h |
|
||||
| q | | | | | | i |
|
||||
| p | o | n | m | l | k | j |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| xa |
|
||||
| xb |
|
||||
| xc |
|
||||
| xd |
|
||||
| xe |
|
||||
| xf |
|
||||
| xg |
|
||||
| xh |
|
||||
| xi |
|
||||
| xj |
|
||||
| xk |
|
||||
| xl |
|
||||
| xm |
|
||||
| xn |
|
||||
| xo |
|
||||
| xp |
|
||||
| xq |
|
||||
| xr |
|
||||
| xs |
|
||||
| xt |
|
||||
| xu |
|
||||
| xv |
|
||||
| xw |
|
||||
| xy |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| x | a | xa | 3000 +-1 |
|
||||
| x | b | xb | 3160 +-1 |
|
||||
| x | c | xc | 3610 +-1 |
|
||||
| x | d | xd | 4240 +-1 |
|
||||
| x | e | xe | 3610 +-1 |
|
||||
| x | f | xf | 3160 +-1 |
|
||||
| x | g | xg | 3000 +-1 |
|
||||
| x | h | xh | 3160 +-1 |
|
||||
| x | i | xi | 3610 +-1 |
|
||||
| x | j | xj | 4240 +-1 |
|
||||
| x | k | xk | 3610 +-1 |
|
||||
| x | l | xl | 3160 +-1 |
|
||||
| x | m | xm | 3000 +-1 |
|
||||
| x | n | xn | 3160 +-1 |
|
||||
| x | o | xo | 3610 +-1 |
|
||||
| x | p | xp | 4240 +-1 |
|
||||
| x | q | xq | 3610 +-1 |
|
||||
| x | r | xr | 3160 +-1 |
|
||||
| x | s | xs | 3000 +-1 |
|
||||
| x | t | xt | 3160 +-1 |
|
||||
| x | u | xu | 3610 +-1 |
|
||||
| x | v | xv | 4240 +-1 |
|
||||
| x | w | xw | 3610 +-1 |
|
||||
| x | y | xy | 3160 +-1 |
|
||||
@@ -0,0 +1,75 @@
|
||||
@routing @origin
|
||||
Feature: Routing close to the [0,0] origin
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: East-west oneways close to the origin
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 0 | 0 |
|
||||
| b | 0.0008990679362704611 | 0 |
|
||||
| c | 0.0017981358725409223 | 0 |
|
||||
| d | 0.0026972038088113833 | 0 |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abcd | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| b | c | abcd | 100 +-1 |
|
||||
| c | b | | |
|
||||
|
||||
Scenario: North-south oneways close to the origin
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 0 | 0 |
|
||||
| b | 0 | 0.0008990679362704611 |
|
||||
| c | 0 | 0.0017981358725409223 |
|
||||
| d | 0 | 0.0026972038088113833 |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abcd | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| b | c | abcd | 100 +-1 |
|
||||
| c | b | | |
|
||||
|
||||
Scenario: East-west oneways crossing the origin
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | -0.0017981358725409223 | 0 |
|
||||
| b | -0.0008990679362704611 | 0 |
|
||||
| c | 0 | 0 |
|
||||
| d | 0.0008990679362704611 | 0 |
|
||||
| e | 0.0017981358725409223 | 0 |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abcde | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| b | d | abcde | 200 +-1 |
|
||||
| d | b | | |
|
||||
|
||||
Scenario: North-south oneways crossing the origin
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 0 | -0.0017981358725409223 |
|
||||
| b | 0 | -0.0008990679362704611 |
|
||||
| c | 0 | 0 |
|
||||
| d | 0 | 0.0008990679362704611 |
|
||||
| e | 0 | 0.0017981358725409223 |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abcde | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| b | d | abcde | 200 +-1 |
|
||||
| d | b | | |
|
||||
@@ -0,0 +1,168 @@
|
||||
@routing @penalty @signal
|
||||
Feature: Penalties
|
||||
Testbot uses a signal penalty of 7s.
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Passing a traffic signal should incur a delay
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
| d | e | f |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| e | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abc |
|
||||
| def |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | c | abc | 20s +-1 |
|
||||
| d | f | def | 27s +-1 |
|
||||
|
||||
Scenario: Signal penalty should not depend on way type
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
| d | e | f |
|
||||
| g | h | i |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | traffic_signals |
|
||||
| e | traffic_signals |
|
||||
| h | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| def | secondary |
|
||||
| ghi | tertiary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | b | abc | 10s +-1 |
|
||||
| a | c | abc | 27s +-1 |
|
||||
| d | e | def | 20s +-1 |
|
||||
| d | f | def | 47s +-1 |
|
||||
| g | h | ghi | 30s +-1 |
|
||||
| g | i | ghi | 67s +-1 |
|
||||
|
||||
Scenario: Passing multiple traffic signals should incur a accumulated delay
|
||||
Given the node map
|
||||
| a | b | c | d | e |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | traffic_signals |
|
||||
| c | traffic_signals |
|
||||
| d | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcde |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | e | abcde | 61s +-1 |
|
||||
|
||||
Scenario: Signal penalty should not depend on way type
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
| d | e | f |
|
||||
| g | h | i |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | traffic_signals |
|
||||
| e | traffic_signals |
|
||||
| h | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| def | secondary |
|
||||
| ghi | tertiary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | b | abc | 10s +-1 |
|
||||
| a | c | abc | 27s +-1 |
|
||||
| d | e | def | 20s +-1 |
|
||||
| d | f | def | 47s +-1 |
|
||||
| g | h | ghi | 30s +-1 |
|
||||
| g | i | ghi | 67s +-1 |
|
||||
|
||||
Scenario: Passing multiple traffic signals should incur a accumulated delay
|
||||
Given the node map
|
||||
| a | b | c | d | e |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | traffic_signals |
|
||||
| c | traffic_signals |
|
||||
| d | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcde |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | e | abcde | 61s +-1 |
|
||||
|
||||
Scenario: Starting or ending at a traffic signal should not incur a delay
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | b | abc | 10s +-1 |
|
||||
| b | a | abc | 10s +-1 |
|
||||
|
||||
Scenario: Routing between signals on the same way should not incur a delay
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| a | traffic_signals |
|
||||
| d | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| b | c | abcd | 10s +-1 |
|
||||
| c | b | abcd | 10s +-1 |
|
||||
|
||||
Scenario: Prefer faster route without traffic signals
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
| | d | |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| adc | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | adc |
|
||||
@@ -0,0 +1,87 @@
|
||||
@routing @planetary
|
||||
Feature: Distance calculation
|
||||
Reference distances have been calculated usign http://seismo.cqu.edu.au/CQSRG/VDistance/
|
||||
|
||||
Scenario: Longitudinal distances at equator
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 0 | 80 |
|
||||
| b | 0 | 0 |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | ab | 8905559 ~0.1% |
|
||||
|
||||
Scenario: Longitudinal distances at latitude 45
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| c | 45 | 80 |
|
||||
| d | 45 | 0 |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| cd |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| c | d | cd | 6028844 ~0.5% |
|
||||
|
||||
Scenario: Longitudinal distances at latitude 80
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| c | 80 | 80 |
|
||||
| d | 80 | 0 |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| cd |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| c | d | cd | 1431469 ~0.5% |
|
||||
|
||||
Scenario: Latitudinal distances at longitude 0
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 80 | 0 |
|
||||
| b | 0 | 0 |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | ab | 8905559 ~0.1% |
|
||||
|
||||
Scenario: Latitudinal distances at longitude 45
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 80 | 45 |
|
||||
| b | 0 | 45 |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | ab | 8905559 ~0.1% |
|
||||
|
||||
Scenario: Latitudinal distances at longitude 80
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 80 | 80 |
|
||||
| b | 0 | 80 |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | ab | 8905559 ~0.1% |
|
||||
@@ -0,0 +1,156 @@
|
||||
@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 | | n | | 3 |
|
||||
| | w | c | e | |
|
||||
| 7 | | s | | 4 |
|
||||
| | 6 | | 5 | |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| nc |
|
||||
| ec |
|
||||
| sc |
|
||||
| wc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| 1 | c | nc |
|
||||
| 2 | c | nc |
|
||||
| 3 | c | ec |
|
||||
| 4 | c | ec |
|
||||
| 5 | c | sc |
|
||||
| 6 | c | sc |
|
||||
| 7 | c | wc |
|
||||
| 8 | c | wc |
|
||||
|
||||
Scenario: Snap to nearest edge of a square
|
||||
Given the node map
|
||||
| 4 | 5 | 6 | 7 |
|
||||
| 3 | a | | u |
|
||||
| 2 | | | |
|
||||
| 1 | d | | b |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| aub |
|
||||
| adb |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| 1 | b | adb |
|
||||
| 2 | b | adb |
|
||||
| 6 | b | aub |
|
||||
| 7 | b | aub |
|
||||
|
||||
Scenario: Snap to edge right under start/end point
|
||||
Given the node map
|
||||
| d | e | f | g |
|
||||
| c | | | h |
|
||||
| b | | | i |
|
||||
| a | l | k | j |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abcd |
|
||||
| defg |
|
||||
| ghij |
|
||||
| jkla |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | abcd |
|
||||
| a | c | abcd |
|
||||
| a | d | abcd |
|
||||
| a | e | abcd,defg |
|
||||
| a | f | abcd,defg |
|
||||
| a | h | jkla,ghij |
|
||||
| a | i | jkla,ghij |
|
||||
| a | j | jkla |
|
||||
| a | k | jkla |
|
||||
| a | l | jkla |
|
||||
|
||||
Scenario: Snap to correct way at large scales
|
||||
Given a grid size of 1000 meters
|
||||
Given the node map
|
||||
| | | | a |
|
||||
| x | | | b |
|
||||
| | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| xa |
|
||||
| xb |
|
||||
| xc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | a | xa |
|
||||
| x | b | xb |
|
||||
| x | c | xc |
|
||||
| a | x | xa |
|
||||
| b | x | xb |
|
||||
| c | x | xc |
|
||||
|
||||
@xx
|
||||
Scenario: Find edges within 1km, but not 10km
|
||||
Given a grid size of 1000 meters
|
||||
Given the node map
|
||||
| p | | | | | | | | | | | i | | | | | | | | | | | j |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | 8 | | 1 | | 2 | | | | | | | | | |
|
||||
| | | | | | | | | | | h | a | b | | | | | | | | | | |
|
||||
| o | | | | | | | | | 7 | g | x | c | 3 | | | | | | | | | k |
|
||||
| | | | | | | | | | | f | e | d | | | | | | | | | | |
|
||||
| | | | | | | | | | 6 | | 5 | | 4 | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | |
|
||||
| n | | | | | | | | | | | m | | | | | | | | | | | l |
|
||||
|
||||
Given the ways
|
||||
| nodes |
|
||||
| xa |
|
||||
| xb |
|
||||
| xc |
|
||||
| xd |
|
||||
| xe |
|
||||
| xf |
|
||||
| xg |
|
||||
| xh |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | 1 | xa |
|
||||
| x | 2 | xb |
|
||||
| x | 3 | xc |
|
||||
| x | 4 | xd |
|
||||
| x | 5 | xe |
|
||||
| x | 6 | xf |
|
||||
| x | 7 | xg |
|
||||
| x | 8 | xh |
|
||||
| x | i | |
|
||||
| x | j | |
|
||||
| x | k | |
|
||||
| x | l | |
|
||||
| x | m | |
|
||||
| x | n | |
|
||||
| x | o | |
|
||||
| x | p | |
|
||||
|
||||
@@ -0,0 +1,244 @@
|
||||
@routing @time
|
||||
Feature: Estimation of travel time
|
||||
Testbot speeds:
|
||||
Primary road: 36km/h = 36000m/3600s = 100m/10s
|
||||
Secondary road: 18km/h = 18000m/3600s = 100m/20s
|
||||
Tertiary road: 12km/h = 12000m/3600s = 100m/30s
|
||||
|
||||
Background: Use specific speeds
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Basic travel time, 1m scale
|
||||
Given a grid size of 1 meters
|
||||
Given the node map
|
||||
| h | a | b |
|
||||
| g | x | c |
|
||||
| f | e | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| xa | primary |
|
||||
| xb | primary |
|
||||
| xc | primary |
|
||||
| xd | primary |
|
||||
| xe | primary |
|
||||
| xf | primary |
|
||||
| xg | primary |
|
||||
| xh | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| x | a | xa | 0s +-1 |
|
||||
| x | b | xb | 0s +-1 |
|
||||
| x | c | xc | 0s +-1 |
|
||||
| x | d | xd | 0s +-1 |
|
||||
| x | e | xe | 0s +-1 |
|
||||
| x | f | xf | 0s +-1 |
|
||||
| x | g | xg | 0s +-1 |
|
||||
| x | h | xh | 0s +-1 |
|
||||
|
||||
Scenario: Basic travel time, 10m scale
|
||||
Given a grid size of 10 meters
|
||||
Given the node map
|
||||
| h | a | b |
|
||||
| g | x | c |
|
||||
| f | e | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| xa | primary |
|
||||
| xb | primary |
|
||||
| xc | primary |
|
||||
| xd | primary |
|
||||
| xe | primary |
|
||||
| xf | primary |
|
||||
| xg | primary |
|
||||
| xh | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| x | a | xa | 1s +-1 |
|
||||
| x | b | xb | 1s +-1 |
|
||||
| x | c | xc | 1s +-1 |
|
||||
| x | d | xd | 1s +-1 |
|
||||
| x | e | xe | 1s +-1 |
|
||||
| x | f | xf | 1s +-1 |
|
||||
| x | g | xg | 1s +-1 |
|
||||
| x | h | xh | 1s +-1 |
|
||||
|
||||
Scenario: Basic travel time, 100m scale
|
||||
Given a grid size of 100 meters
|
||||
Given the node map
|
||||
| h | a | b |
|
||||
| g | x | c |
|
||||
| f | e | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| xa | primary |
|
||||
| xb | primary |
|
||||
| xc | primary |
|
||||
| xd | primary |
|
||||
| xe | primary |
|
||||
| xf | primary |
|
||||
| xg | primary |
|
||||
| xh | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| x | a | xa | 10s +-1 |
|
||||
| x | b | xb | 14s +-1 |
|
||||
| x | c | xc | 10s +-1 |
|
||||
| x | d | xd | 14s +-1 |
|
||||
| x | e | xe | 10s +-1 |
|
||||
| x | f | xf | 14s +-1 |
|
||||
| x | g | xg | 10s +-1 |
|
||||
| x | h | xh | 14s +-1 |
|
||||
|
||||
Scenario: Basic travel time, 1km scale
|
||||
Given a grid size of 1000 meters
|
||||
Given the node map
|
||||
| h | a | b |
|
||||
| g | x | c |
|
||||
| f | e | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| xa | primary |
|
||||
| xb | primary |
|
||||
| xc | primary |
|
||||
| xd | primary |
|
||||
| xe | primary |
|
||||
| xf | primary |
|
||||
| xg | primary |
|
||||
| xh | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| x | a | xa | 100s +-1 |
|
||||
| x | b | xb | 141s +-1 |
|
||||
| x | c | xc | 100s +-1 |
|
||||
| x | d | xd | 141s +-1 |
|
||||
| x | e | xe | 100s +-1 |
|
||||
| x | f | xf | 141s +-1 |
|
||||
| x | g | xg | 100s +-1 |
|
||||
| x | h | xh | 141s +-1 |
|
||||
|
||||
Scenario: Basic travel time, 10km scale
|
||||
Given a grid size of 10000 meters
|
||||
Given the node map
|
||||
| h | a | b |
|
||||
| g | x | c |
|
||||
| f | e | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| xa | primary |
|
||||
| xb | primary |
|
||||
| xc | primary |
|
||||
| xd | primary |
|
||||
| xe | primary |
|
||||
| xf | primary |
|
||||
| xg | primary |
|
||||
| xh | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| x | a | xa | 1000s +-1 |
|
||||
| x | b | xb | 1414s +-1 |
|
||||
| x | c | xc | 1000s +-1 |
|
||||
| x | d | xd | 1414s +-1 |
|
||||
| x | e | xe | 1000s +-1 |
|
||||
| x | f | xf | 1414s +-1 |
|
||||
| x | g | xg | 1000s +-1 |
|
||||
| x | h | xh | 1414s +-1 |
|
||||
|
||||
Scenario: Time of travel depending on way type
|
||||
Given the node map
|
||||
| a | b |
|
||||
| c | d |
|
||||
| e | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cd | secondary |
|
||||
| ef | tertiary |
|
||||
| ace | something |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | b | ab | 10s +-1 |
|
||||
| c | d | cd | 20s +-1 |
|
||||
| e | f | ef | 30s +-1 |
|
||||
|
||||
Scenario: Time of travel on a series of ways
|
||||
Given the node map
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | primary |
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | b | ab | 10s +-1 |
|
||||
| a | c | ab,bc | 20s +-1 |
|
||||
| a | d | ab,bc,cd | 30s +-1 |
|
||||
|
||||
Scenario: Time of travel on a winding way
|
||||
Given the node map
|
||||
| a | | i | h |
|
||||
| b | c | | g |
|
||||
| | d | e | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcdefghi | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | b | abcdefghi | 10s +-1 |
|
||||
| a | e | abcdefghi | 40s +-1 |
|
||||
| a | i | abcdefghi | 80s +-1 |
|
||||
|
||||
Scenario: Time of travel on combination of road types
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
| | | d |
|
||||
| | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| cde | tertiary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| b | c | abc | 10s +-1 |
|
||||
| c | e | cde | 60s +-1 |
|
||||
| b | d | abc,cde | 40s +-1 |
|
||||
| a | e | abc,cde | 80s +-1 |
|
||||
|
||||
Scenario: Time of travel on part of a way
|
||||
Given the node map
|
||||
| a | 1 |
|
||||
| | 2 |
|
||||
| | 3 |
|
||||
| b | 4 |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| 1 | 2 | ab | 10s +-1 |
|
||||
| 1 | 3 | ab | 20s +-1 |
|
||||
| 1 | 4 | ab | 30s +-1 |
|
||||
| 4 | 3 | ab | 10s +-1 |
|
||||
| 4 | 2 | ab | 20s +-1 |
|
||||
| 4 | 1 | ab | 30s +-1 |
|
||||
@@ -0,0 +1,21 @@
|
||||
@routing @utf
|
||||
Feature: Handling of UTF characters
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Streetnames with UTF characters
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | Scandinavian København |
|
||||
| bc | Japanese 東京 |
|
||||
| cd | Cyrillic Москва |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | Scandinavian København |
|
||||
| b | c | Japanese 東京 |
|
||||
| c | d | Cyrillic Москва |
|
||||
@@ -0,0 +1,37 @@
|
||||
@routing @weight
|
||||
Feature: Choosing route based on length, speed, etc
|
||||
|
||||
Background:
|
||||
Given the speedprofile "testbot"
|
||||
|
||||
Scenario: Pick the geometrically shortest route, way types being equal
|
||||
Given the node map
|
||||
| | s | |
|
||||
| | t | |
|
||||
| a | | b |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| atb | primary |
|
||||
| asb | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | atb |
|
||||
| b | a | atb |
|
||||
|
||||
Scenario: Pick the shortest travel time, even when it's longer
|
||||
Given the node map
|
||||
| | p | |
|
||||
| a | s | b |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| apb | primary |
|
||||
| asb | secondary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | apb |
|
||||
| b | a | apb |
|
||||
|
||||
Reference in New Issue
Block a user