cleanup indentation of cuke files

This commit is contained in:
Emil Tin
2013-08-29 19:29:13 +02:00
parent 58b7ef8431
commit b5bfdb56dc
63 changed files with 4486 additions and 4509 deletions
+72 -72
View File
@@ -1,86 +1,86 @@
@routing @bad
Feature: Handle bad data in a graceful manner
Background:
Given the profile "testbot"
Scenario: Empty dataset
Given the node map
| |
Background:
Given the profile "testbot"
Given the ways
| nodes |
When I preprocess data
Then "osrm-extract" should return code 255
Scenario: Empty dataset
Given the node map
| |
Scenario: Only dead-end oneways
Given the node map
| a | b | c | d | e |
Given the ways
| nodes |
Given the ways
| nodes | oneway |
| abcde | yes |
When I preprocess data
Then "osrm-extract" should return code 255
Scenario: Only dead-end oneways
Given the node map
| a | b | c | d | e |
Given the ways
| nodes | oneway |
| abcde | yes |
When I route I should get
| from | to | route |
| b | d | abcde |
When I route I should get
| from | to | route |
| b | d | abcde |
@todo
Scenario: Start/end point at the same location
Given the node map
| a | b |
| 1 | 2 |
Scenario: Start/end point at the same location
Given the node map
| a | b |
| 1 | 2 |
Given the ways
| nodes |
| ab |
Given the ways
| nodes |
| ab |
When I route I should get
| from | to | route |
| a | a | |
| b | b | |
| 1 | 1 | |
| 2 | 2 | |
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.
@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 |
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 |
And the ways
| nodes |
# | ab |
| bc |
| cd |
| de |
| kl |
| lm |
# | mn |
# | no |
When I route I should get
| from | to | route |
# | a | b | cd |
# | b | c | cd |
# | a | d | cd |
# | c | d | cd |
| d | e | de |
# | k | l | kl |
# | l | m | lm |
# | o | l | lm |
# | n | m | lm |
# | o | n | lm |
When I route I should get
| from | to | route |
# | a | b | cd |
# | b | c | cd |
# | a | d | cd |
# | c | d | cd |
| d | e | de |
# | k | l | kl |
# | l | m | lm |
# | o | l | lm |
# | n | m | lm |
# | o | n | lm |
+202 -202
View File
@@ -1,235 +1,235 @@
@routing @basic
Feature: Basic Routing
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
@smallest
Scenario: A single way with two nodes
Given the node map
| a | b |
@smallest
Scenario: A single way with two nodes
Given the node map
| a | b |
And the ways
| nodes |
| ab |
And the ways
| nodes |
| ab |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | 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 |
Scenario: Routing in between two nodes of way
Given the node map
| a | b | 1 | 2 | c | d |
And the ways
| nodes |
| abcd |
And the ways
| nodes |
| abcd |
When I route I should get
| from | to | route |
| 1 | 2 | abcd |
| 2 | 1 | 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 |
Scenario: Routing between the middle nodes of way
Given the node map
| a | b | c | d | e | f |
And the ways
| nodes |
| abcdef |
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 |
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 |
Scenario: Two ways connected in a straight line
Given the node map
| a | b | c |
And the ways
| nodes |
| ab |
| bc |
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 |
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 | e | f |
Scenario: 2 unconnected parallel ways
Given the node map
| a | b | c |
| d | e | f |
And the ways
| nodes |
| abc |
| def |
And the ways
| nodes |
| abc |
| def |
When I route I should get
| from | to | route |
| a | b | abc |
| b | a | abc |
| b | c | abc |
| c | b | abc |
| d | e | def |
| e | d | def |
| e | f | def |
| f | e | def |
| a | d | |
| d | a | |
| b | d | |
| d | b | |
| c | d | |
| d | c | |
| a | e | |
| e | a | |
| b | e | |
| e | b | |
| c | e | |
| e | c | |
| a | f | |
| f | a | |
| b | f | |
| f | b | |
| c | f | |
| f | c | |
When I route I should get
| from | to | route |
| a | b | abc |
| b | a | abc |
| b | c | abc |
| c | b | abc |
| d | e | def |
| e | d | def |
| e | f | def |
| f | e | def |
| a | d | |
| d | a | |
| b | d | |
| d | b | |
| c | d | |
| d | c | |
| a | e | |
| e | a | |
| b | e | |
| e | b | |
| c | e | |
| e | c | |
| a | f | |
| f | a | |
| b | f | |
| f | b | |
| c | f | |
| f | c | |
Scenario: 3 ways connected in a triangle
Given the node map
| a | | b |
| | | |
| | c | |
Scenario: 3 ways connected in a triangle
Given the node map
| a | | b |
| | | |
| | c | |
And the ways
| nodes |
| ab |
| bc |
| ca |
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 |
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 | |
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 |
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 |
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 |
Scenario: To ways connected at a 45 degree angle
Given the node map
| a | | |
| b | | |
| c | d | e |
And the ways
| nodes |
| abc |
| cde |
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 |
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 |
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 |
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 |
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 |
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 |
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 | abcd |
| a | m | aeim |
| m | a | aeim |
When I route I should get
| from | to | route |
| a | d | abcd |
| d | a | abcd |
| a | m | aeim |
| m | a | aeim |
+123 -123
View File
@@ -1,141 +1,141 @@
@routing @bearing
Feature: Compass bearing
Background:
Given the profile "testbot"
Scenario: Bearing when going northwest
Given the node map
| b | |
| | a |
And the ways
| nodes |
| ab |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route | compass | bearing |
| a | b | ab | NW | 315 |
Scenario: Bearing when going northwest
Given the node map
| b | |
| | a |
Scenario: Bearing when going west
Given the node map
| b | a |
And the ways
| nodes |
| ab |
And the ways
| nodes |
| ab |
When I route I should get
| from | to | route | compass | bearing |
| a | b | ab | NW | 315 |
When I route I should get
| from | to | route | compass | bearing |
| a | b | ab | W | 270 |
Scenario: Bearing when going west
Given the node map
| b | a |
Scenario: Bearing af 45 degree intervals
Given the node map
| b | a | h |
| c | x | g |
| d | e | f |
And the ways
| nodes |
| ab |
And the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
When I route I should get
| from | to | route | compass | bearing |
| a | b | ab | W | 270 |
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 af 45 degree intervals
Given the node map
| b | a | h |
| c | x | g |
| d | e | f |
Scenario: Bearing in a roundabout
Given the node map
| | d | c | |
| e | | | b |
| f | | | a |
| | g | h | |
And the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
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 |
| 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 |
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 in a roundabout
Given the node map
| | d | c | |
| e | | | b |
| f | | | a |
| | g | h | |
Scenario: Bearing should stay constant when zig-zagging
Given the node map
| b | d | f | h |
| a | c | e | g |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
And the ways
| nodes |
| ab |
| bc |
| cd |
| de |
| ef |
| fg |
| gh |
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 |
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 |
Scenario: Bearing should stay constant when zig-zagging
Given the node map
| b | d | f | h |
| a | c | e | g |
And the ways
| nodes |
| abcdef |
And the ways
| nodes |
| ab |
| bc |
| cd |
| de |
| ef |
| fg |
| gh |
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 |
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 |
+85 -85
View File
@@ -1,93 +1,93 @@
@routing @bearing_param @todo
Feature: Bearing parameter
Background:
Given the profile "testbot"
And a grid size of 10 meters
Scenario: Testbot - Intial bearing in simple case
Given the node map
| a | |
| 0 | c |
| b | |
And the ways
| nodes |
| ac |
| bc |
Feature: Bearing parameter
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | c | 0 | bc | 45 |
| 0 | c | 45 | bc | 45 |
| 0 | c | 85 | bc | 45 |
| 0 | c | 95 | ac | 135 |
| 0 | c | 135 | ac | 135 |
| 0 | c | 180 | ac | 135 |
Scenario: Testbot - Initial bearing on split way
Given the node map
Background:
Given the profile "testbot"
And a grid size of 10 meters
Scenario: Testbot - Intial bearing in simple case
Given the node map
| a | |
| 0 | c |
| b | |
And the ways
| nodes |
| ac |
| bc |
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | c | 0 | bc | 45 |
| 0 | c | 45 | bc | 45 |
| 0 | c | 85 | bc | 45 |
| 0 | c | 95 | ac | 135 |
| 0 | c | 135 | ac | 135 |
| 0 | c | 180 | ac | 135 |
Scenario: Testbot - Initial bearing on split way
Given the node map
| d | | | | | 1 | | | | | c |
| a | | | | | 0 | | | | | b |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| da | yes |
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| da | yes |
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | b | 10 | ab | 90 |
| 0 | b | 90 | ab | 90 |
| 0 | b | 170 | ab | 90 |
| 0 | b | 190 | cd,da,ab | 270 |
| 0 | b | 270 | cd,da,ab | 270 |
| 0 | b | 350 | cd,da,ab | 270 |
| 1 | d | 10 | cd | 90 |
| 1 | d | 90 | cd | 90 |
| 1 | d | 170 | cd | 90 |
| 1 | d | 190 | ab,bc,cd | 270 |
| 1 | d | 270 | ab,bc,cd | 270 |
| 1 | d | 350 | ab,bc,cd | 270 |
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | b | 10 | ab | 90 |
| 0 | b | 90 | ab | 90 |
| 0 | b | 170 | ab | 90 |
| 0 | b | 190 | cd,da,ab | 270 |
| 0 | b | 270 | cd,da,ab | 270 |
| 0 | b | 350 | cd,da,ab | 270 |
| 1 | d | 10 | cd | 90 |
| 1 | d | 90 | cd | 90 |
| 1 | d | 170 | cd | 90 |
| 1 | d | 190 | ab,bc,cd | 270 |
| 1 | d | 270 | ab,bc,cd | 270 |
| 1 | d | 350 | ab,bc,cd | 270 |
Scenario: Testbot - Initial bearing in all direction
Given the node map
| h | | | a | | | b |
| | | | | | | |
| | | p | i | j | | |
| g | | o | 0 | k | | c |
| | | n | m | l | | |
| | | | | | | |
| f | | | e | | | d |
And the ways
| nodes | oneway |
| ia | yes |
| jb | yes |
| kc | yes |
| ld | yes |
| me | yes |
| nf | yes |
| og | yes |
| ph | yes |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
Scenario: Testbot - Initial bearing in all direction
Given the node map
| h | | | a | | | b |
| | | | | | | |
| | | p | i | j | | |
| g | | o | 0 | k | | c |
| | | n | m | l | | |
| | | | | | | |
| f | | | e | | | d |
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | a | 0 | ia | 0 |
| 0 | a | 45 | jb,bc,cd,de,ef,fg,gh,ha | 45 |
| 0 | a | 90 | kc,cd,de,ef,fg,gh,ha | 90 |
| 0 | a | 135 | ld,de,ef,fg,gh,ha | 135 |
| 0 | a | 180 | me,de,ef,fg,gh,ha | 180 |
| 0 | a | 225 | nf,ef,fg,gh,ha | 225 |
| 0 | a | 270 | og,gh,ha | 270 |
| 0 | a | 315 | pn,ha | 315 |
And the ways
| nodes | oneway |
| ia | yes |
| jb | yes |
| kc | yes |
| ld | yes |
| me | yes |
| nf | yes |
| og | yes |
| ph | yes |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fg | yes |
| gh | yes |
| ha | yes |
When I route I should get
| from | to | param:bearing | route | bearing |
| 0 | a | 0 | ia | 0 |
| 0 | a | 45 | jb,bc,cd,de,ef,fg,gh,ha | 45 |
| 0 | a | 90 | kc,cd,de,ef,fg,gh,ha | 90 |
| 0 | a | 135 | ld,de,ef,fg,gh,ha | 135 |
| 0 | a | 180 | me,de,ef,fg,gh,ha | 180 |
| 0 | a | 225 | nf,ef,fg,gh,ha | 225 |
| 0 | a | 270 | og,gh,ha | 270 |
| 0 | a | 315 | pn,ha | 315 |
+17 -17
View File
@@ -1,23 +1,23 @@
@routing @testbot @bug @todo
Feature: Testbot - Things that looks like bugs
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Testbot - Triangle problem
Given the node map
| | | | d |
| a | b | c | |
| | | | e |
Given the node map
| | | | d |
| a | b | c | |
| | | | e |
And the ways
| nodes | highway | oneway |
| abc | primary | |
| cd | primary | yes |
| ce | river | |
| de | primary | |
And the ways
| nodes | highway | oneway |
| abc | primary | |
| cd | primary | yes |
| ce | river | |
| de | primary | |
When I route I should get
| from | to | route |
| d | c | de,ce |
| e | d | de |
When I route I should get
| from | to | route |
| d | c | de,ce |
| e | d | de |
+199 -199
View File
@@ -1,228 +1,228 @@
@routing @distance
Feature: Distance calculation
Background:
Given the profile "testbot"
Scenario: 100m distance
Given a grid size of 100 meters
Given the node map
| a | b |
And the ways
| nodes |
| ab |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route | distance |
| a | b | ab | 100m +- 2 |
Scenario: 100m distance
Given a grid size of 100 meters
Given the node map
| a | b |
Scenario: Distance should equal sum of segments, leftwinded
Given the node map
| e | |
| d | c |
| a | b |
And the ways
| nodes |
| ab |
And the ways
| nodes |
| abcde |
When I route I should get
| from | to | route | distance |
| a | b | ab | 100m +- 2 |
When I route I should get
| from | to | route | distance |
| a | d | abcde | 300m +-2 |
Scenario: Distance should equal sum of segments, leftwinded
Given the node map
| e | |
| d | c |
| a | b |
Scenario: Distance should equal sum of segments, rightwinded
Given the node map
| | e |
| c | d |
| b | a |
And the ways
| nodes |
| abcde |
And the ways
| nodes |
| abcde |
When I route I should get
| from | to | route | distance |
| a | d | abcde | 300m +-2 |
When I route I should get
| from | to | route | distance |
| a | d | abcde | 300m +-2 |
Scenario: Distance should equal sum of segments, rightwinded
Given the node map
| | e |
| c | d |
| b | a |
Scenario: 10m distances
Given a grid size of 10 meters
Given the node map
| a | b |
| | c |
And the ways
| nodes |
| abcde |
And the ways
| nodes |
| abc |
When I route I should get
| from | to | route | distance |
| a | d | abcde | 300m +-2 |
When I route I should get
| from | to | route | distance |
| a | b | abc | 10m +-2 |
| b | a | abc | 10m +-2 |
| b | c | abc | 10m +-2 |
| c | b | abc | 10m +-2 |
| a | c | abc | 20m +-4 |
| c | a | abc | 20m +-4 |
Scenario: 10m distances
Given a grid size of 10 meters
Given the node map
| a | b |
| | c |
Scenario: 100m distances
Given a grid size of 100 meters
Given the node map
| a | b |
| | c |
And the ways
| nodes |
| abc |
And the ways
| nodes |
| abc |
When I route I should get
| from | to | route | distance |
| a | b | abc | 10m +-2 |
| b | a | abc | 10m +-2 |
| b | c | abc | 10m +-2 |
| c | b | abc | 10m +-2 |
| a | c | abc | 20m +-4 |
| c | a | abc | 20m +-4 |
When I route I should get
| from | to | route | distance |
| a | b | abc | 100m +-2 |
| b | a | abc | 100m +-2 |
| b | c | abc | 100m +-2 |
| c | b | abc | 100m +-2 |
| a | c | abc | 200m +-4 |
| c | a | abc | 200m +-4 |
Scenario: 100m distances
Given a grid size of 100 meters
Given the node map
| a | b |
| | c |
Scenario: 1km distance
Given a grid size of 1000 meters
Given the node map
| a | b |
| | c |
And the ways
| nodes |
| abc |
And the ways
| nodes |
| abc |
When I route I should get
| from | to | route | distance |
| a | b | abc | 100m +-2 |
| b | a | abc | 100m +-2 |
| b | c | abc | 100m +-2 |
| c | b | abc | 100m +-2 |
| a | c | abc | 200m +-4 |
| c | a | abc | 200m +-4 |
When I route I should get
| from | to | route | distance |
| a | b | abc | 1000m +-2 |
| b | a | abc | 1000m +-2 |
| b | c | abc | 1000m +-2 |
| c | b | abc | 1000m +-2 |
| a | c | abc | 2000m +-4 |
| c | a | abc | 2000m +-4 |
Scenario: 1km distance
Given a grid size of 1000 meters
Given the node map
| a | b |
| | c |
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 |
| abc |
And the ways
| nodes |
| abcdefgh |
When I route I should get
| from | to | route | distance |
| a | b | abc | 1000m +-2 |
| b | a | abc | 1000m +-2 |
| b | c | abc | 1000m +-2 |
| c | b | abc | 1000m +-2 |
| a | c | abc | 2000m +-4 |
| c | a | abc | 2000m +-4 |
When I route I should get
| from | to | route | distance |
| a | b | abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 |
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 |
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 |
And the ways
| nodes |
| abcdefgh |
When I route I should get
| from | to | route | distance |
| a | b | abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 |
When I route I should get
| from | to | route | distance |
| a | b | abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 |
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 |
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 |
When I route I should get
| from | to | route | distance |
| x | a | xa | 3000m +-2 |
| x | b | xb | 3162m +-2 |
| x | c | xc | 3606m +-2 |
| x | d | xd | 4243m +-2 |
| x | e | xe | 3606m +-2 |
| x | f | xf | 3162m +-2 |
| x | g | xg | 3000m +-2 |
| x | h | xh | 3162m +-2 |
| x | i | xi | 3606m +-2 |
| x | j | xj | 4243m +-2 |
| x | k | xk | 3606m +-2 |
| x | l | xl | 3162m +-2 |
| x | m | xm | 3000m +-2 |
| x | n | xn | 3162m +-2 |
| x | o | xo | 3606m +-2 |
| x | p | xp | 4243m +-2 |
| x | q | xq | 3606m +-2 |
| x | r | xr | 3162m +-2 |
| x | s | xs | 3000m +-2 |
| x | t | xt | 3162m +-2 |
| x | u | xu | 3606m +-2 |
| x | v | xv | 4243m +-2 |
| x | w | xw | 3606m +-2 |
| x | y | xy | 3162m +-2 |
And the ways
| nodes |
| abcdefgh |
@maze
Scenario: Distance of a maze of short segments
Given a grid size of 7 meters
Given the node map
| a | b | s | t |
| d | c | r | q |
| e | f | o | p |
| h | g | n | m |
| i | j | k | l |
When I route I should get
| from | to | route | distance |
| a | b | abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 |
And the ways
| nodes |
| abcdefghijklmnopqrst |
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 |
When I route I should get
| from | to | route | distance |
| a | t | abcdefghijklmnopqrst | 133m +-2 |
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 | 3000m +-2 |
| x | b | xb | 3162m +-2 |
| x | c | xc | 3606m +-2 |
| x | d | xd | 4243m +-2 |
| x | e | xe | 3606m +-2 |
| x | f | xf | 3162m +-2 |
| x | g | xg | 3000m +-2 |
| x | h | xh | 3162m +-2 |
| x | i | xi | 3606m +-2 |
| x | j | xj | 4243m +-2 |
| x | k | xk | 3606m +-2 |
| x | l | xl | 3162m +-2 |
| x | m | xm | 3000m +-2 |
| x | n | xn | 3162m +-2 |
| x | o | xo | 3606m +-2 |
| x | p | xp | 4243m +-2 |
| x | q | xq | 3606m +-2 |
| x | r | xr | 3162m +-2 |
| x | s | xs | 3000m +-2 |
| x | t | xt | 3162m +-2 |
| x | u | xu | 3606m +-2 |
| x | v | xv | 4243m +-2 |
| x | w | xw | 3606m +-2 |
| x | y | xy | 3162m +-2 |
@maze
Scenario: Distance of a maze of short segments
Given a grid size of 7 meters
Given the node map
| a | b | s | t |
| d | c | r | q |
| e | f | o | p |
| h | g | n | m |
| i | j | k | l |
And the ways
| nodes |
| abcdefghijklmnopqrst |
When I route I should get
| from | to | route | distance |
| a | t | abcdefghijklmnopqrst | 133m +-2 |
+30 -30
View File
@@ -1,42 +1,42 @@
@routing @testbot @routes @duration
Feature: Durations
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Duration of ways
Given the node map
| a | b | | | | f |
| | | | e | | |
| | c | | | d | |
Given the node map
| a | b | | | | f |
| | | | e | | |
| | c | | | d | |
And the ways
| nodes | highway | duration |
| ab | primary | 0:01 |
| bc | primary | 0:10 |
| cd | primary | 1:00 |
| de | primary | 10:00 |
| ef | primary | 01:02:03 |
And the ways
| nodes | highway | duration |
| ab | primary | 0:01 |
| bc | primary | 0:10 |
| cd | primary | 1:00 |
| de | primary | 10:00 |
| ef | primary | 01:02:03 |
When I route I should get
| from | to | route | distance | time |
| a | b | ab | 100m +-1 | 60s +-1 |
| b | c | bc | 200m +-1 | 600s +-1 |
| c | d | cd | 300m +-1 | 3600s +-1 |
| d | e | de | 141m +-2 | 36000s +-1 |
| e | f | ef | 224m +-2 | 3723s +-1 |
When I route I should get
| from | to | route | distance | time |
| a | b | ab | 100m +-1 | 60s +-1 |
| b | c | bc | 200m +-1 | 600s +-1 |
| c | d | cd | 300m +-1 | 3600s +-1 |
| d | e | de | 141m +-2 | 36000s +-1 |
| e | f | ef | 224m +-2 | 3723s +-1 |
@todo
Scenario: Partial duration of ways
Given the node map
| a | b | | c |
Given the node map
| a | b | | c |
And the ways
| nodes | highway | duration |
| abc | primary | 0:01 |
And the ways
| nodes | highway | duration |
| abc | primary | 0:01 |
When I route I should get
| from | to | route | distance | time |
| a | c | abc | 300m +-1 | 60s +-1 |
| a | b | ab | 100m +-1 | 20s +-1 |
| b | c | bc | 200m +-1 | 40s +-1 |
When I route I should get
| from | to | route | distance | time |
| a | c | abc | 300m +-1 | 60s +-1 |
| a | b | ab | 100m +-1 | 20s +-1 |
| b | c | bc | 200m +-1 | 40s +-1 |
+29 -29
View File
@@ -4,35 +4,35 @@ Feature: Testbot - Walkthrough
# A complete walk-through of how this data is processed can be found at:
# https://github.com/DennisOSRM/Project-OSRM/wiki/Processing-Flow
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Testbot - Processing Flow
Given the node map
| | | | d |
| a | b | c | |
| | | | e |
Given the node map
| | | | d |
| a | b | c | |
| | | | e |
And the ways
| nodes | highway | oneway |
| abc | primary | |
| cd | primary | yes |
| ce | river | |
| de | primary | |
And the ways
| nodes | highway | oneway |
| abc | primary | |
| cd | primary | yes |
| ce | river | |
| de | primary | |
When I route I should get
| from | to | route |
| a | b | abc |
| a | c | abc |
| a | d | abc,cd |
| a | e | abc,ce |
| b | a | abc |
| b | c | abc |
| b | d | abc,cd |
| b | e | abc,ce |
| d | a | de,ce,abc |
| d | b | de,ce,abc |
| d | e | de |
| e | a | ce,abc |
| e | b | ce,abc |
| e | c | ce |
When I route I should get
| from | to | route |
| a | b | abc |
| a | c | abc |
| a | d | abc,cd |
| a | e | abc,ce |
| b | a | abc |
| b | c | abc |
| b | d | abc,cd |
| b | e | abc,ce |
| d | a | de,ce,abc |
| d | b | de,ce,abc |
| d | e | de |
| e | a | ce,abc |
| e | b | ce,abc |
| e | c | ce |
+31 -31
View File
@@ -1,38 +1,38 @@
@routing @fastest
Feature: Choosing fastest route
Background:
Given the profile "testbot"
Scenario: Pick the geometrically shortest route, way types being equal
Given the node map
| | | s | | |
| | | t | | |
| x | a | | b | y |
And the ways
| nodes | highway |
| xa | primary |
| by | primary |
| atb | primary |
| asb | primary |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route |
| x | y | xa,atb,by |
| y | x | by,atb,xa |
Scenario: Pick the geometrically shortest route, way types being equal
Given the node map
| | | s | | |
| | | t | | |
| x | a | | b | y |
Scenario: Pick the fastest route, even when it's longer
Given the node map
| | p | |
| a | s | b |
And the ways
| nodes | highway |
| xa | primary |
| by | primary |
| atb | primary |
| asb | primary |
And the ways
| nodes | highway |
| apb | primary |
| asb | secondary |
When I route I should get
| from | to | route |
| x | y | xa,atb,by |
| y | x | by,atb,xa |
When I route I should get
| from | to | route |
| a | b | apb |
| b | a | apb |
Scenario: Pick the fastest route, 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 |
+148 -148
View File
@@ -1,175 +1,175 @@
@routing @testbot @ferry
Feature: Testbot - Handle ferry routes
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Testbot - Ferry duration, single node
Given the node map
| a | b | c | d |
| e | f | g | h |
| i | j | k | l |
| m | n | o | p |
| q | r | s | t |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| ij | primary | | |
| kl | primary | | |
| mn | primary | | |
| op | primary | | |
| qr | primary | | |
| st | primary | | |
| bc | | ferry | 0:01 |
| fg | | ferry | 0:10 |
| jk | | ferry | 1:00 |
| no | | ferry | 24:00 |
| rs | | ferry | 96:00 |
Scenario: Testbot - Ferry duration, single node
Given the node map
| a | b | c | d |
| e | f | g | h |
| i | j | k | l |
| m | n | o | p |
| q | r | s | t |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| ij | primary | | |
| kl | primary | | |
| mn | primary | | |
| op | primary | | |
| qr | primary | | |
| st | primary | | |
| bc | | ferry | 0:01 |
| fg | | ferry | 0:10 |
| jk | | ferry | 1:00 |
| no | | ferry | 24:00 |
| rs | | ferry | 96:00 |
When I route I should get
| from | to | route | time |
| b | c | bc | 60s +-1 |
| f | g | fg | 600s +-1 |
| j | k | jk | 3600s +-1 |
| n | o | no | 86400s +-1 |
| r | s | rs | 345600s +-1 |
| from | to | route | time |
| b | c | bc | 60s +-1 |
| f | g | fg | 600s +-1 |
| j | k | jk | 3600s +-1 |
| n | o | no | 86400s +-1 |
| r | s | rs | 345600s +-1 |
@todo
Scenario: Testbot - Week long ferry routes
Given the node map
| a | b | c | d |
| e | f | g | h |
| i | j | k | l |
Scenario: Testbot - Week long ferry routes
Given the node map
| a | b | c | d |
| e | f | g | h |
| i | j | k | l |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| ij | primary | | |
| kl | primary | | |
| bc | | ferry | 24:00 |
| fg | | ferry | 168:00 |
| jk | | ferry | 720:00 |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| ij | primary | | |
| kl | primary | | |
| bc | | ferry | 24:00 |
| fg | | ferry | 168:00 |
| jk | | ferry | 720:00 |
When I route I should get
| from | to | route | time |
| b | c | bc | 86400s +-1 |
| f | g | fg | 604800s +-1 |
| j | k | jk | 259200s +-1 |
When I route I should get
| from | to | route | time |
| b | c | bc | 86400s +-1 |
| f | g | fg | 604800s +-1 |
| j | k | jk | 259200s +-1 |
Scenario: Testbot - Ferry duration, multiple nodes
Given the node map
| x | | | | | y |
| | a | b | c | d | |
Scenario: Testbot - Ferry duration, multiple nodes
Given the node map
| x | | | | | y |
| | a | b | c | d | |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yd | primary | | |
| ad | | ferry | 1:00 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yd | primary | | |
| ad | | ferry | 1:00 |
When I route I should get
| from | to | route | time |
| a | d | ad | 3600s +-1 |
| d | a | ad | 3600s +-1 |
When I route I should get
| from | to | route | time |
| a | d | ad | 3600s +-1 |
| d | a | ad | 3600s +-1 |
@todo
Scenario: Testbot - Ferry duration, individual parts, fast
Scenario: Testbot - Ferry duration, individual parts, fast
Given a grid size of 10000 meters
Given the node map
| x | y | | z | | | v |
| a | b | | c | | | d |
Given the node map
| x | y | | z | | | v |
| a | b | | c | | | d |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yb | primary | | |
| zc | primary | | |
| vd | primary | | |
| abcd | | ferry | 0:06 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yb | primary | | |
| zc | primary | | |
| vd | primary | | |
| abcd | | ferry | 0:06 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 360s +-1 |
| a | b | abcd | 60s +-1 |
| b | c | abcd | 120s +-1 |
| c | d | abcd | 180s +-1 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 360s +-1 |
| a | b | abcd | 60s +-1 |
| b | c | abcd | 120s +-1 |
| c | d | abcd | 180s +-1 |
@todo
Scenario: Testbot - Ferry duration, individual parts, slow
Given the node map
| x | y | | z | | | v |
| a | b | | c | | | d |
Scenario: Testbot - Ferry duration, individual parts, slow
Given the node map
| x | y | | z | | | v |
| a | b | | c | | | d |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yb | primary | | |
| zc | primary | | |
| vd | primary | | |
| abcd | | ferry | 1:00 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yb | primary | | |
| zc | primary | | |
| vd | primary | | |
| abcd | | ferry | 1:00 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 3600s ~1% |
| a | b | abcd | 600s ~1% |
| b | c | abcd | 1200s ~1% |
| c | d | abcd | 1800s ~1% |
Scenario: Testbot - Ferry duration, connected routes
Given the node map
| x | | | | d | | | | y |
| | a | b | c | | e | f | g | t |
When I route I should get
| from | to | route | time |
| a | d | abcd | 3600s ~1% |
| a | b | abcd | 600s ~1% |
| b | c | abcd | 1200s ~1% |
| c | d | abcd | 1800s ~1% |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| abcd | | ferry | 0:30 |
| defg | | ferry | 0:30 |
Scenario: Testbot - Ferry duration, connected routes
Given the node map
| x | | | | d | | | | y |
| | a | b | c | | e | f | g | t |
When I route I should get
| from | to | route | time |
| a | g | abcd,defg | 3600s +-1 |
| g | a | defg,abcd | 3600s +-1 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| abcd | | ferry | 0:30 |
| defg | | ferry | 0:30 |
Scenario: Testbot - Prefer road when faster than ferry
Given the node map
| x | a | b | c | |
| | | | | d |
| y | g | f | e | |
When I route I should get
| from | to | route | time |
| a | g | abcd,defg | 3600s +-1 |
| g | a | defg,abcd | 3600s +-1 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| xy | primary | | |
| abcd | | ferry | 0:01 |
| defg | | ferry | 0:01 |
Scenario: Testbot - Prefer road when faster than ferry
Given the node map
| x | a | b | c | |
| | | | | d |
| y | g | f | e | |
When I route I should get
| from | to | route | time |
| a | g | xa,xy,yg | 60s +-25% |
| g | a | yg,xy,xa | 60s +-25% |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| xy | primary | | |
| abcd | | ferry | 0:01 |
| defg | | ferry | 0:01 |
Scenario: Testbot - Long winding ferry route
Given the node map
| x | | b | | d | | f | | y |
| | a | | c | | e | | g | |
When I route I should get
| from | to | route | time |
| a | g | xa,xy,yg | 60s +-25% |
| g | a | yg,xy,xa | 60s +-25% |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| abcdefg | | ferry | 6:30 |
Scenario: Testbot - Long winding ferry route
Given the node map
| x | | b | | d | | f | | y |
| | a | | c | | e | | g | |
When I route I should get
| from | to | route | time |
| a | g | abcdefg | 23400s +-1 |
| g | a | abcdefg | 23400s +-1 |
And the ways
| nodes | highway | route | duration |
| xa | primary | | |
| yg | primary | | |
| abcdefg | | ferry | 6:30 |
When I route I should get
| from | to | route | time |
| a | g | abcdefg | 23400s +-1 |
| g | a | abcdefg | 23400s +-1 |
+18 -18
View File
@@ -2,21 +2,21 @@
Feature: Basic Routing
Test the input data descibed on https://github.com/DennisOSRM/Project-OSRM/wiki/Graph-representation
Background:
Given the profile "testbot"
@smallest
Scenario: Graph transformation
Given the node map
| | | d |
| a | b | c |
| | | e |
And the ways
| nodes |
| abc |
| dce |
When I route I should get
| from | to | route |
| a | e | abc,dce |
Background:
Given the profile "testbot"
@smallest
Scenario: Graph transformation
Given the node map
| | | d |
| a | b | c |
| | | e |
And the ways
| nodes |
| abc |
| dce |
When I route I should get
| from | to | route |
| a | e | abc,dce |
+78 -78
View File
@@ -5,92 +5,92 @@ Instead the speed can optionally be factored into the weiht in the lua profile.
Note: With the default grid size of 100m, the diagonals has a length if 141.42m
Background:
Given the profile "testbot"
Scenario: Use impedance to pick route, even when longer/slower
Given the node map
| | s | | t | | u | | v | |
| a | | b | | c | | d | | e |
Background:
Given the profile "testbot"
And the ways
| nodes | impedance |
| ab | 1.3 |
| asb | 1 |
| bc | 1.5 |
| btc | 1 |
| cd | 0.015 |
| cud | 0.010 |
| de | 150000 |
| dve | 100000 |
Scenario: Use impedance to pick route, even when longer/slower
Given the node map
| | s | | t | | u | | v | |
| a | | b | | c | | d | | e |
When I route I should get
| from | to | route | distance |
| a | b | ab | 200m +-1 |
| b | a | ab | 200m +-1 |
| b | c | btc | 282m +-1 |
| c | b | btc | 282m +-1 |
| c | d | cud | 282m +-1 |
| d | c | cud | 282m +-1 |
| d | e | dve | 282m +-1 |
| e | d | dve | 282m +-1 |
And the ways
| nodes | impedance |
| ab | 1.3 |
| asb | 1 |
| bc | 1.5 |
| btc | 1 |
| cd | 0.015 |
| cud | 0.010 |
| de | 150000 |
| dve | 100000 |
Scenario: Weight should default to 1
Given the node map
| | s | | t | |
| a | | b | | c |
When I route I should get
| from | to | route | distance |
| a | b | ab | 200m +-1 |
| b | a | ab | 200m +-1 |
| b | c | btc | 282m +-1 |
| c | b | btc | 282m +-1 |
| c | d | cud | 282m +-1 |
| d | c | cud | 282m +-1 |
| d | e | dve | 282m +-1 |
| e | d | dve | 282m +-1 |
And the ways
| nodes | impedance |
| ab | 1.40 |
| asb | |
| bc | 1.42 |
| btc | |
Scenario: Weight should default to 1
Given the node map
| | s | | t | |
| a | | b | | c |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | ab |
| b | c | btc |
| c | b | btc |
And the ways
| nodes | impedance |
| ab | 1.40 |
| asb | |
| bc | 1.42 |
| btc | |
Scenario: Use both impedance and speed (multiplied) when picking route
OSRM should not factor speed into impedance internally. However, the profile can choose to do so,
and this test expect the testbot profile to do it.
Given the node map
| | s | | t | |
| a | | b | | c |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | ab |
| b | c | btc |
| c | b | btc |
And the ways
| nodes | impedance | highway |
| ab | 2.80 | primary |
| asb | 1 | secondary |
| bc | 2.84 | primary |
| btc | 1 | secondary |
Scenario: Use both impedance and speed (multiplied) when picking route
OSRM should not factor speed into impedance internally. However, the profile can choose to do so,
and this test expect the testbot profile to do it.
Given the node map
| | s | | t | |
| a | | b | | c |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | ab |
| b | c | btc |
| c | b | btc |
And the ways
| nodes | impedance | highway |
| ab | 2.80 | primary |
| asb | 1 | secondary |
| bc | 2.84 | primary |
| btc | 1 | secondary |
Scenario: Weight should influence neither speed nor travel time.
Given the node map
| a | b | c |
| t | | |
When I route I should get
| from | to | route |
| a | b | ab |
| b | a | ab |
| b | c | btc |
| c | b | btc |
And the ways
| nodes |
| ab |
| bc |
| at |
Scenario: Weight should influence neither speed nor travel time.
Given the node map
| a | b | c |
| t | | |
When I route I should get
| from | to | route | distance | time |
| a | b | ab | 100m +-1 | 10s +-1 |
| b | a | ab | 100m +-1 | 10s +-1 |
| b | c | bc | 100m +-1 | 10s +-1 |
| c | b | bc | 100m +-1 | 10s +-1 |
| a | c | ab,bc | 200m +-1 | 20s +-1 |
| c | a | bc,ab | 200m +-1 | 20s +-1 |
And the ways
| nodes |
| ab |
| bc |
| at |
When I route I should get
| from | to | route | distance | time |
| a | b | ab | 100m +-1 | 10s +-1 |
| b | a | ab | 100m +-1 | 10s +-1 |
| b | c | bc | 100m +-1 | 10s +-1 |
| c | b | bc | 100m +-1 | 10s +-1 |
| a | c | ab,bc | 200m +-1 | 20s +-1 |
| c | a | bc,ab | 200m +-1 | 20s +-1 |
+41 -41
View File
@@ -1,52 +1,52 @@
@routing @maxspeed @testbot
Feature: Car - Max speed restrictions
Background: Use specific speeds
Given the profile "testbot"
Scenario: Testbot - Respect maxspeeds when lower that way type speed
Given the node map
| a | b | c | d |
Background: Use specific speeds
Given the profile "testbot"
And the ways
| nodes | maxspeed |
| ab | |
| bc | 24 |
| cd | 18 |
Scenario: Testbot - Respect maxspeeds when lower that way type speed
Given the node map
| a | b | c | d |
When I route I should get
| from | to | route | time |
| a | b | ab | 10s +-1 |
| b | a | ab | 10s +-1 |
| b | c | bc | 15s +-1 |
| c | b | bc | 15s +-1 |
| c | d | cd | 20s +-1 |
| d | c | cd | 20s +-1 |
And the ways
| nodes | maxspeed |
| ab | |
| bc | 24 |
| cd | 18 |
Scenario: Testbot - Ignore maxspeed when higher than way speed
Given the node map
| a | b | c |
When I route I should get
| from | to | route | time |
| a | b | ab | 10s +-1 |
| b | a | ab | 10s +-1 |
| b | c | bc | 15s +-1 |
| c | b | bc | 15s +-1 |
| c | d | cd | 20s +-1 |
| d | c | cd | 20s +-1 |
And the ways
| nodes | maxspeed |
| ab | |
| bc | 200 |
Scenario: Testbot - Ignore maxspeed when higher than way speed
Given the node map
| a | b | c |
When I route I should get
| from | to | route | time |
| a | b | ab | 10s +-1 |
| b | a | ab | 10s +-1 |
| b | c | bc | 10s +-1 |
| c | b | bc | 10s +-1 |
And the ways
| nodes | maxspeed |
| ab | |
| bc | 200 |
When I route I should get
| from | to | route | time |
| a | b | ab | 10s +-1 |
| b | a | ab | 10s +-1 |
| b | c | bc | 10s +-1 |
| c | b | bc | 10s +-1 |
@opposite
Scenario: Testbot - Forward/backward maxspeed
Then routability should be
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | 20s +-1 | 20s +-1 |
| 18 | | | 40s +-1 | 40s +-1 |
| | 18 | | 40s +-1 | 20s +-1 |
| | | 18 | 20s +-1 | 40s +-1 |
| 9 | 18 | | 40s +-1 | 80s +-1 |
| 9 | | 18 | 80s +-1 | 40s +-1 |
| 9 | 24 | 18 | 30s +-1 | 40s +-1 |
Then routability should be
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| | | | 20s +-1 | 20s +-1 |
| 18 | | | 40s +-1 | 40s +-1 |
| | 18 | | 40s +-1 | 20s +-1 |
| | | 18 | 20s +-1 | 40s +-1 |
| 9 | 18 | | 40s +-1 | 80s +-1 |
| 9 | | 18 | 80s +-1 | 40s +-1 |
| 9 | 24 | 18 | 30s +-1 | 40s +-1 |
+20 -20
View File
@@ -1,26 +1,26 @@
@routing @testbot @mode
Feature: Testbot - Mode flag
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
@todo
Scenario: Bike - Mode
Given the node map
| a | b | |
| | c | d |
Scenario: Bike - Mode
Given the node map
| a | b | |
| | c | d |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| bc | | ferry | 0:01 |
| cd | primary | | |
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| bc | | ferry | 0:01 |
| cd | primary | | |
When I route I should get
| from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | bot,ferry,bot |
| d | a | cd,bc,ab | head,right left,destination | bot,ferry,bot |
| c | a | bc,ab | head,left,destination | ferry,bot |
| d | b | cd,bc | head,right,destination | bot,ferry |
| a | c | ab,bc | head,right,destination | bot,ferry |
| b | d | bc,cd | head,left,destination | ferry,bot |
When I route I should get
| from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | bot,ferry,bot |
| d | a | cd,bc,ab | head,right left,destination | bot,ferry,bot |
| c | a | bc,ab | head,left,destination | ferry,bot |
| d | b | cd,bc | head,right,destination | bot,ferry |
| a | c | ab,bc | head,right,destination | bot,ferry |
| b | d | bc,cd | head,left,destination | ferry,bot |
+12 -12
View File
@@ -1,18 +1,18 @@
@routing @testbot @opposite
Feature: Separate settings for forward/backward direction
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Testbot - Going against the flow
Given the node map
| a | b | c | d |
Scenario: Testbot - Going against the flow
Given the node map
| a | b | c | d |
And the ways
| nodes | highway |
| abcd | river |
And the ways
| nodes | highway |
| abcd | river |
When I route I should get
| from | to | route | distance | time |
| a | d | abcd | 300 +- 1m | 31s |
| d | a | abcd | 300 +- 1m | 68s |
When I route I should get
| from | to | route | distance | time |
| a | d | abcd | 300 +- 1m | 31s |
| d | a | abcd | 300 +- 1m | 68s |
+64 -64
View File
@@ -1,75 +1,75 @@
@routing @origin
Feature: Routing close to the [0,0] origin
Background:
Given the profile "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 |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route | distance |
| b | c | abcd | 100m +-1 |
| c | b | | |
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 |
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 |
And the ways
| nodes | oneway |
| abcd | yes |
When I route I should get
| from | to | route | distance |
| b | c | abcd | 100m +-1 |
| c | b | | |
When I route I should get
| from | to | route | distance |
| b | c | abcd | 100m +-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 |
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 |
| abcde | yes |
And the ways
| nodes | oneway |
| abcd | yes |
When I route I should get
| from | to | route | distance |
| b | d | abcde | 200m +-2 |
| 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 |
When I route I should get
| from | to | route | distance |
| b | c | abcd | 100m +-1 |
| c | b | | |
And the ways
| nodes | oneway |
| abcde | yes |
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 |
When I route I should get
| from | to | route | distance |
| b | d | abcde | 200m +-2 |
| d | b | | |
And the ways
| nodes | oneway |
| abcde | yes |
When I route I should get
| from | to | route | distance |
| b | d | abcde | 200m +-2 |
| 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 | 200m +-2 |
| d | b | | |
+132 -132
View File
@@ -2,167 +2,167 @@
Feature: Penalties
Testbot uses a signal penalty of 7s.
Background:
Given the profile "testbot"
Background:
Given the profile "testbot"
Scenario: Traffic signals should incur a delay, without changing distance
Given the node map
| a | b | c |
| d | e | f |
Scenario: Traffic signals should incur a delay, without changing distance
Given the node map
| a | b | c |
| d | e | f |
And the nodes
| node | highway |
| e | traffic_signals |
And the nodes
| node | highway |
| e | traffic_signals |
And the ways
| nodes |
| abc |
| def |
And the ways
| nodes |
| abc |
| def |
When I route I should get
| from | to | route | time | distance |
| a | c | abc | 20s +-1 | 200m +-1 |
| d | f | def | 27s +-1 | 200m +-1 |
When I route I should get
| from | to | route | time | distance |
| a | c | abc | 20s +-1 | 200m +-1 |
| d | f | def | 27s +-1 | 200m +-1 |
Scenario: Signal penalty should not depend on way type
Given the node map
| a | b | c |
| d | e | f |
| g | h | i |
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 nodes
| node | highway |
| b | traffic_signals |
| e | traffic_signals |
| h | traffic_signals |
And the ways
| nodes | highway |
| abc | primary |
| def | secondary |
| ghi | tertiary |
And the ways
| nodes | highway |
| abc | primary |
| def | secondary |
| ghi | tertiary |
When I route I should get
| from | to | route | time |
| a | c | abc | 27s +-1 |
| d | f | def | 47s +-1 |
| g | i | ghi | 67s +-1 |
When I route I should get
| from | to | route | time |
| a | c | abc | 27s +-1 |
| d | f | def | 47s +-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 |
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 nodes
| node | highway |
| b | traffic_signals |
| c | traffic_signals |
| d | traffic_signals |
And the ways
| nodes |
| abcde |
And the ways
| nodes |
| abcde |
When I route I should get
| from | to | route | time |
| a | e | abcde | 61s +-1 |
When I route I should get
| from | to | route | time |
| a | e | abcde | 61s +-1 |
@todo
Scenario: Signal penalty should not depend on way type
Given the node map
| a | b | c |
| d | e | f |
| g | h | i |
@todo
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 nodes
| node | highway |
| b | traffic_signals |
| e | traffic_signals |
| h | traffic_signals |
And the ways
| nodes | highway |
| abc | primary |
| def | secondary |
| ghi | tertiary |
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 |
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 |
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 nodes
| node | highway |
| b | traffic_signals |
| c | traffic_signals |
| d | traffic_signals |
And the ways
| nodes |
| abcde |
And the ways
| nodes |
| abcde |
When I route I should get
| from | to | route | time |
| a | e | abcde | 61s +-1 |
When I route I should get
| from | to | route | time |
| a | e | abcde | 61s +-1 |
@todo
Scenario: Starting or ending at a traffic signal should not incur a delay
Given the node map
| a | b | c |
@todo
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 nodes
| node | highway |
| b | traffic_signals |
And the ways
| nodes |
| abc |
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 |
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 |
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 nodes
| node | highway |
| a | traffic_signals |
| d | traffic_signals |
And the ways
| nodes | highway |
| abcd | primary |
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 |
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 a grid size of 50 meters
And the node map
| a | | b | | c |
| | | d | | |
Scenario: Prefer faster route without traffic signals
Given a grid size of 50 meters
And the node map
| a | | b | | c |
| | | d | | |
And the nodes
| node | highway |
| b | traffic_signals |
And the nodes
| node | highway |
| b | traffic_signals |
And the ways
| nodes | highway |
| abc | primary |
| adc | primary |
And the ways
| nodes | highway |
| abc | primary |
| adc | primary |
When I route I should get
| from | to | route |
| a | c | adc |
When I route I should get
| from | to | route |
| a | c | adc |
+67 -67
View File
@@ -1,86 +1,86 @@
@routing @planetary
Feature: Distance calculation
Scenario: Approximated Longitudinal distances at equator
Given the node locations
| node | lat | lon |
| a | 0 | 80 |
| b | 0 | 0 |
And the ways
| nodes |
| ab |
Scenario: Approximated Longitudinal distances at equator
Given the node locations
| node | lat | lon |
| a | 0 | 80 |
| b | 0 | 0 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Longitudinal distances at latitude 45
Given the node locations
| node | lat | lon |
| c | 45 | 80 |
| d | 45 | 0 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| cd |
Scenario: Approximated Longitudinal distances at latitude 45
Given the node locations
| node | lat | lon |
| c | 45 | 80 |
| d | 45 | 0 |
When I route I should get
| from | to | route | distance |
| c | d | cd | 6028844m ~4.5% |
And the ways
| nodes |
| cd |
Scenario: Approximated Longitudinal distances at latitude 80
Given the node locations
| node | lat | lon |
| c | 80 | 80 |
| d | 80 | 0 |
When I route I should get
| from | to | route | distance |
| c | d | cd | 6028844m ~4.5% |
And the ways
| nodes |
| cd |
Scenario: Approximated Longitudinal distances at latitude 80
Given the node locations
| node | lat | lon |
| c | 80 | 80 |
| d | 80 | 0 |
When I route I should get
| from | to | route | distance |
| c | d | cd | 1431469m ~9.5% |
And the ways
| nodes |
| cd |
Scenario: Approximated Latitudinal distances at longitude 0
Given the node locations
| node | lat | lon |
| a | 80 | 0 |
| b | 0 | 0 |
When I route I should get
| from | to | route | distance |
| c | d | cd | 1431469m ~9.5% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 0
Given the node locations
| node | lat | lon |
| a | 80 | 0 |
| b | 0 | 0 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 45
Given the node locations
| node | lat | lon |
| a | 80 | 45 |
| b | 0 | 45 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 45
Given the node locations
| node | lat | lon |
| a | 80 | 45 |
| b | 0 | 45 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 80
Given the node locations
| node | lat | lon |
| a | 80 | 80 |
| b | 0 | 80 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
Scenario: Approximated Latitudinal distances at longitude 80
Given the node locations
| node | lat | lon |
| a | 80 | 80 |
| b | 0 | 80 |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
And the ways
| nodes |
| ab |
When I route I should get
| from | to | route | distance |
| a | b | ab | 8905559m ~0.1% |
+29 -29
View File
@@ -1,35 +1,35 @@
@routing @testbot @routes @todo
Feature: OSM Route Relation
Background:
Given the profile "testbot"
Scenario: Prioritize ways that are part of route relations
This scenario assumes that the testbot uses an impedance of 0.5 for ways that are part of 'testbot' routes.
Given the node map
| s | | | t | | | |
| a | | | b | | | c |
| | | | | | | |
| | | | u | | | v |
Background:
Given the profile "testbot"
And the ways
| nodes |
| ab |
| bc |
| as |
| stb |
| bu |
| uvc |
Scenario: Prioritize ways that are part of route relations
This scenario assumes that the testbot uses an impedance of 0.5 for ways that are part of 'testbot' routes.
And the relations
| type | route | way:route |
| route | testbot | as,stb |
| route | testbot | bu,uvc |
Given the node map
| s | | | t | | | |
| a | | | b | | | c |
| | | | | | | |
| | | | u | | | v |
When I route I should get
| from | to | route | distance | time |
| b | c | bc | 300m +-1 | 30s +-1 |
| c | b | bc | 300m +-1 | 30s +-1 |
| a | b | as,stb | 500m +-1 | 50s +-1 |
| b | a | stb,as | 500m +-1 | 50s +-1 |
And the ways
| nodes |
| ab |
| bc |
| as |
| stb |
| bu |
| uvc |
And the relations
| type | route | way:route |
| route | testbot | as,stb |
| route | testbot | bu,uvc |
When I route I should get
| from | to | route | distance | time |
| b | c | bc | 300m +-1 | 30s +-1 |
| c | b | bc | 300m +-1 | 30s +-1 |
| a | b | as,stb | 500m +-1 | 50s +-1 |
| b | a | stb,as | 500m +-1 | 50s +-1 |
+141 -141
View File
@@ -1,154 +1,154 @@
@routing @snap
Feature: Snap start/end point to the nearest way
Background:
Given the profile "testbot"
Scenario: Snap to nearest protruding oneway
Given the node map
| | 1 | | 2 | |
| 8 | | n | | 3 |
| | w | c | e | |
| 7 | | s | | 4 |
| | 6 | | 5 | |
Feature: Snap start/end point to the nearest way
And the ways
| nodes |
| nc |
| ec |
| sc |
| wc |
Background:
Given the profile "testbot"
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 |
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 |
| aub |
| adb |
And the ways
| nodes |
| nc |
| ec |
| sc |
| wc |
When I route I should get
| from | to | route |
| 1 | b | adb |
| 2 | b | adb |
| 6 | b | aub |
| 7 | b | aub |
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 edge right under start/end point
Given the node map
| d | e | f | g |
| c | | | h |
| b | | | i |
| a | l | k | j |
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 |
| abcd |
| defg |
| ghij |
| jkla |
And the ways
| nodes |
| aub |
| adb |
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 |
When I route I should get
| from | to | route |
| 1 | b | adb |
| 2 | b | adb |
| 6 | b | aub |
| 7 | b | aub |
Scenario: Snap to correct way at large scales
Given a grid size of 1000 meters
Given the node map
| | | | a |
| x | | | b |
| | | | c |
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 |
| xa |
| xb |
| xc |
And the ways
| nodes |
| abcd |
| defg |
| ghij |
| jkla |
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 |
Scenario: Find edges within 1km, and the same from 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 |
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 |
Given the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
Scenario: Snap to correct way at large scales
Given a grid size of 1000 meters
Given the node map
| | | | a |
| x | | | b |
| | | | c |
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 | xa |
| x | j | xb |
| x | k | xc |
| x | l | xd |
| x | m | xe |
| x | n | xf |
| x | o | xg |
| x | p | xh |
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 |
Scenario: Find edges within 1km, and the same from 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 | xa |
| x | j | xb |
| x | k | xc |
| x | l | xd |
| x | m | xe |
| x | n | xf |
| x | o | xg |
| x | p | xh |
+191 -191
View File
@@ -1,215 +1,215 @@
@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 profile "testbot"
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 |
Primary road: 36km/h = 36000m/3600s = 100m/10s
Secondary road: 18km/h = 18000m/3600s = 100m/20s
Tertiary road: 12km/h = 12000m/3600s = 100m/30s
And the ways
| nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
Background: Use specific speeds
Given the profile "testbot"
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, 10m scale
Given a grid size of 10 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
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 |
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 |
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, 1km scale
Given a grid size of 1000 meters
Given the node map
| h | a | b |
| g | x | c |
| f | e | d |
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 |
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 |
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, 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: 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 |
Scenario: Time of travel depending on way type
Given the node map
| a | b |
| c | d |
| e | f |
And the ways
| nodes | highway |
| xa | primary |
| xb | primary |
| xc | primary |
| xd | primary |
| xe | primary |
| xf | primary |
| xg | primary |
| xh | primary |
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 |
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: Time of travel on a series of ways
Given the node map
| a | b | |
| | c | d |
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 |
| ab | primary |
| bc | primary |
| cd | primary |
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 |
| a | b | ab | 10s +-1 |
| a | c | ab,bc | 20s +-1 |
| a | d | ab,bc,cd | 30s +-1 |
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 on a winding way
Given the node map
| a | | i | h |
| b | c | | g |
| | d | e | f |
Scenario: Time of travel depending on way type
Given the node map
| a | b |
| c | d |
| e | f |
And the ways
| nodes | highway |
| abcdefghi | primary |
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 | abcdefghi | 10s +-1 |
| a | e | abcdefghi | 40s +-1 |
| a | i | abcdefghi | 80s +-1 |
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 combination of road types
Given the node map
| a | b | c |
| | | d |
| | | e |
And the ways
| nodes | highway |
| abc | primary |
| cde | tertiary |
Scenario: Time of travel on a series of ways
Given the node map
| a | b | |
| | c | d |
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 |
And the ways
| nodes | highway |
| ab | primary |
| bc | primary |
| cd | primary |
Scenario: Time of travel on part of a way
Given the node map
| a | 1 |
| | 2 |
| | 3 |
| b | 4 |
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 |
And the ways
| nodes | highway |
| ab | primary |
Scenario: Time of travel on a winding way
Given the node map
| a | | i | h |
| b | c | | g |
| | d | e | f |
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 |
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 |
+110 -110
View File
@@ -1,123 +1,123 @@
@routing @turns
Feature: Turn directions/codes
Background:
Given the profile "testbot"
Scenario: Turn directions
Given the node map
| o | p | a | b | c |
| n | | | | d |
| m | | x | | e |
| l | | | | f |
| k | j | i | h | g |
And the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
| xi |
| xj |
| xk |
| xl |
| xm |
| xn |
| xo |
| xp |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route | turns |
| i | k | xi,xk | head,sharp_left,destination |
| i | m | xi,xm | head,left,destination |
| i | o | xi,xo | head,slight_left,destination |
| i | a | xi,xa | head,straight,destination |
| i | c | xi,xc | head,slight_right,destination |
| i | e | xi,xe | head,right,destination |
| i | g | xi,xg | head,sharp_right,destination |
Scenario: Turn directions
Given the node map
| o | p | a | b | c |
| n | | | | d |
| m | | x | | e |
| l | | | | f |
| k | j | i | h | g |
| k | m | xk,xm | head,sharp_left,destination |
| k | o | xk,xo | head,left,destination |
| k | a | xk,xa | head,slight_left,destination |
| k | c | xk,xc | head,straight,destination |
| k | e | xk,xe | head,slight_right,destination |
| k | g | xk,xg | head,right,destination |
| k | i | xk,xi | head,sharp_right,destination |
And the ways
| nodes |
| xa |
| xb |
| xc |
| xd |
| xe |
| xf |
| xg |
| xh |
| xi |
| xj |
| xk |
| xl |
| xm |
| xn |
| xo |
| xp |
| m | o | xm,xo | head,sharp_left,destination |
| m | a | xm,xa | head,left,destination |
| m | c | xm,xc | head,slight_left,destination |
| m | e | xm,xe | head,straight,destination |
| m | g | xm,xg | head,slight_right,destination |
| m | i | xm,xi | head,right,destination |
| m | k | xm,xk | head,sharp_right,destination |
When I route I should get
| from | to | route | turns |
| i | k | xi,xk | head,sharp_left,destination |
| i | m | xi,xm | head,left,destination |
| i | o | xi,xo | head,slight_left,destination |
| i | a | xi,xa | head,straight,destination |
| i | c | xi,xc | head,slight_right,destination |
| i | e | xi,xe | head,right,destination |
| i | g | xi,xg | head,sharp_right,destination |
| o | a | xo,xa | head,sharp_left,destination |
| o | c | xo,xc | head,left,destination |
| o | e | xo,xe | head,slight_left,destination |
| o | g | xo,xg | head,straight,destination |
| o | i | xo,xi | head,slight_right,destination |
| o | k | xo,xk | head,right,destination |
| o | m | xo,xm | head,sharp_right,destination |
| k | m | xk,xm | head,sharp_left,destination |
| k | o | xk,xo | head,left,destination |
| k | a | xk,xa | head,slight_left,destination |
| k | c | xk,xc | head,straight,destination |
| k | e | xk,xe | head,slight_right,destination |
| k | g | xk,xg | head,right,destination |
| k | i | xk,xi | head,sharp_right,destination |
| a | c | xa,xc | head,sharp_left,destination |
| a | e | xa,xe | head,left,destination |
| a | g | xa,xg | head,slight_left,destination |
| a | i | xa,xi | head,straight,destination |
| a | k | xa,xk | head,slight_right,destination |
| a | m | xa,xm | head,right,destination |
| a | o | xa,xo | head,sharp_right,destination |
| m | o | xm,xo | head,sharp_left,destination |
| m | a | xm,xa | head,left,destination |
| m | c | xm,xc | head,slight_left,destination |
| m | e | xm,xe | head,straight,destination |
| m | g | xm,xg | head,slight_right,destination |
| m | i | xm,xi | head,right,destination |
| m | k | xm,xk | head,sharp_right,destination |
| c | e | xc,xe | head,sharp_left,destination |
| c | g | xc,xg | head,left,destination |
| c | i | xc,xi | head,slight_left,destination |
| c | k | xc,xk | head,straight,destination |
| c | m | xc,xm | head,slight_right,destination |
| c | o | xc,xo | head,right,destination |
| c | a | xc,xa | head,sharp_right,destination |
| o | a | xo,xa | head,sharp_left,destination |
| o | c | xo,xc | head,left,destination |
| o | e | xo,xe | head,slight_left,destination |
| o | g | xo,xg | head,straight,destination |
| o | i | xo,xi | head,slight_right,destination |
| o | k | xo,xk | head,right,destination |
| o | m | xo,xm | head,sharp_right,destination |
| e | g | xe,xg | head,sharp_left,destination |
| e | i | xe,xi | head,left,destination |
| e | k | xe,xk | head,slight_left,destination |
| e | m | xe,xm | head,straight,destination |
| e | o | xe,xo | head,slight_right,destination |
| e | a | xe,xa | head,right,destination |
| e | c | xe,xc | head,sharp_right,destination |
| a | c | xa,xc | head,sharp_left,destination |
| a | e | xa,xe | head,left,destination |
| a | g | xa,xg | head,slight_left,destination |
| a | i | xa,xi | head,straight,destination |
| a | k | xa,xk | head,slight_right,destination |
| a | m | xa,xm | head,right,destination |
| a | o | xa,xo | head,sharp_right,destination |
| g | i | xg,xi | head,sharp_left,destination |
| g | k | xg,xk | head,left,destination |
| g | m | xg,xm | head,slight_left,destination |
| g | o | xg,xo | head,straight,destination |
| g | a | xg,xa | head,slight_right,destination |
| g | c | xg,xc | head,right,destination |
| g | e | xg,xe | head,sharp_right,destination |
Scenario: Turn instructions at high latitude
https://github.com/DennisOSRM/Project-OSRM/issues/532
Given the node locations
| node | lat | lon |
| a | 55.68740 | 12.52430 |
| b | 55.68745 | 12.52409 |
| c | 55.68711 | 12.52383 |
| x | -55.68740 | 12.52430 |
| y | -55.68745 | 12.52409 |
| z | -55.68711 | 12.52383 |
| c | e | xc,xe | head,sharp_left,destination |
| c | g | xc,xg | head,left,destination |
| c | i | xc,xi | head,slight_left,destination |
| c | k | xc,xk | head,straight,destination |
| c | m | xc,xm | head,slight_right,destination |
| c | o | xc,xo | head,right,destination |
| c | a | xc,xa | head,sharp_right,destination |
And the ways
| nodes |
| ab |
| bc |
| xy |
| yz |
| e | g | xe,xg | head,sharp_left,destination |
| e | i | xe,xi | head,left,destination |
| e | k | xe,xk | head,slight_left,destination |
| e | m | xe,xm | head,straight,destination |
| e | o | xe,xo | head,slight_right,destination |
| e | a | xe,xa | head,right,destination |
| e | c | xe,xc | head,sharp_right,destination |
When I route I should get
| from | to | route | turns |
| a | c | ab,bc | head,left,destination |
| c | a | bc,ab | head,right,destination |
| x | z | xy,yz | head,right,destination |
| z | x | yz,xy | head,left,destination |
| g | i | xg,xi | head,sharp_left,destination |
| g | k | xg,xk | head,left,destination |
| g | m | xg,xm | head,slight_left,destination |
| g | o | xg,xo | head,straight,destination |
| g | a | xg,xa | head,slight_right,destination |
| g | c | xg,xc | head,right,destination |
| g | e | xg,xe | head,sharp_right,destination |
Scenario: Turn instructions at high latitude
https://github.com/DennisOSRM/Project-OSRM/issues/532
Given the node locations
| node | lat | lon |
| a | 55.68740 | 12.52430 |
| b | 55.68745 | 12.52409 |
| c | 55.68711 | 12.52383 |
| x | -55.68740 | 12.52430 |
| y | -55.68745 | 12.52409 |
| z | -55.68711 | 12.52383 |
And the ways
| nodes |
| ab |
| bc |
| xy |
| yz |
When I route I should get
| from | to | route | turns |
| a | c | ab,bc | head,left,destination |
| c | a | bc,ab | head,right,destination |
| x | z | xy,yz | head,right,destination |
| z | x | yz,xy | head,left,destination |
+17 -17
View File
@@ -1,21 +1,21 @@
@routing @utf
Feature: Handling of UTF characters
Background:
Given the profile "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 Москва |
Background:
Given the profile "testbot"
When I route I should get
| from | to | route |
| a | b | Scandinavian København |
| b | c | Japanese |
| c | d | Cyrillic Москва |
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 Москва |
+34 -52
View File
@@ -4,67 +4,49 @@ Feature: Via points
Background:
Given the profile "testbot"
Scenario: Simple via point
Given the node map
| a | b | c |
Scenario: Simple via point
Given the node map
| a | b | c |
And the ways
| nodes |
| abc |
And the ways
| nodes |
| abc |
When I route I should get
| waypoints | route |
| a,b,c | abc |
| c,b,a | abc |
When I route I should get
| waypoints | route |
| a,b,c | abc |
| c,b,a | abc |
Scenario: Via point at a dead end
Given the node map
| a | b | c |
| | d | |
| a | b | c |
| | d | |
And the ways
| nodes |
| abc |
| bd |
| nodes |
| abc |
| bd |
When I route I should get
| waypoints | route |
| a,d,c | abc,bd,bd,abc |
| c,d,a | abc,bd,bd,abc |
| waypoints | route |
| a,d,c | abc,bd,bd,abc |
| c,d,a | abc,bd,bd,abc |
Scenario: Multiple via points
Given the node map
| a | | | | e | f | g | |
| | b | c | d | | | | h |
Scenario: Multiple via points
Given the node map
| a | | | | e | f | g | |
| | b | c | d | | | | h |
And the ways
| nodes |
| ae |
| ab |
| bcd |
| de |
| efg |
| gh |
| dh |
When I route I should get
| waypoints | route |
| a,c,f,h | ab,bcd,de,efg,gh |
@bug @todo
Scenario: U-turn should be allowed at via point
Given the node map
| a | b | c |
| | d | |
| | e | |
And the ways
| nodes |
| abc |
| bd |
| de |
When I route I should get
| waypoints | route |
| a,d,c | abc,bd,bd,abc |
And the ways
| nodes |
| ae |
| ab |
| bcd |
| de |
| efg |
| gh |
| dh |
When I route I should get
| waypoints | route |
| a,c,f,h | ab,bcd,de,efg,gh |