modify turn angles and instructions
This commit is contained in:
@@ -62,13 +62,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,1,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,1 |
|
||||
| b | d | bc,cd | head,left,destination | 1,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,straight,straight,destination | 1,1,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,straight,destination | 1,1 |
|
||||
| b | d | bc,cd | head,straight,destination | 1,1 |
|
||||
|
||||
Scenario: Bike - Mode when pushing on pedestrain streets
|
||||
Given the node map
|
||||
|
||||
@@ -98,11 +98,11 @@ Feature: Bike - Accessability of different way types
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | ab,bc,cd | head,right,left,destination |
|
||||
| d | a | cd,bc,ab | head,right,left,destination |
|
||||
| c | a | bc,ab | head,left,destination |
|
||||
| d | b | cd,bc | head,right,destination |
|
||||
| from | to | route | turns |
|
||||
| a | d | ab,bc,cd | head,straight,straight,destination |
|
||||
| d | a | cd,bc,ab | head,right,left,destination |
|
||||
| c | a | bc,ab | head,left,destination |
|
||||
| d | b | cd,bc | head,right,destination |
|
||||
|
||||
@todo
|
||||
Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc.
|
||||
|
||||
@@ -155,8 +155,9 @@ def turn_list instructions
|
||||
13 => :stay_roundabout,
|
||||
14 => :start_end_of_street,
|
||||
15 => :destination,
|
||||
16 => :enter_contraflow,
|
||||
17 => :leave_contraflow
|
||||
16 => :name_changes,
|
||||
17 => :enter_contraflow,
|
||||
18 => :leave_contraflow
|
||||
}
|
||||
# replace instructions codes with strings
|
||||
# "11-3" (enter roundabout and leave a 3rd exit) gets converted to "enter_roundabout-3"
|
||||
|
||||
@@ -36,5 +36,5 @@ Feature: Basic Routing
|
||||
| fy | last |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| x | y | first,compr,last | head,right,left,destination |
|
||||
| from | to | route | turns |
|
||||
| x | y | first,compr,last | head,straight,straight,destination |
|
||||
|
||||
@@ -92,6 +92,6 @@ Feature: Avoid weird loops caused by rounding errors
|
||||
| cf | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,2,d | ab,be,ef,ef,cf,cd | head,left,right,via,right,left,destination |
|
||||
| a,1,d | ab,be,ef,ef,cf,cd | head,left,right,via,right,left,destination |
|
||||
| waypoints | route | turns |
|
||||
| a,2,d | ab,be,ef,ef,cf,cd | head,left,straight,via,straight,left,destination |
|
||||
| a,1,d | ab,be,ef,ef,cf,cd | head,left,straight,via,straight,left,destination |
|
||||
|
||||
@@ -17,21 +17,13 @@ Feature: Turn directions/codes
|
||||
And the ways
|
||||
| nodes |
|
||||
| xa |
|
||||
| xb |
|
||||
| xc |
|
||||
| xd |
|
||||
| xe |
|
||||
| xf |
|
||||
| xg |
|
||||
| xh |
|
||||
| xi |
|
||||
| xj |
|
||||
| xk |
|
||||
| xl |
|
||||
| xm |
|
||||
| xn |
|
||||
| xo |
|
||||
| xp |
|
||||
|
||||
When I match I should get
|
||||
| trace | route | turns | matchings |
|
||||
@@ -40,7 +32,7 @@ Feature: Turn directions/codes
|
||||
| ia | xi,xa | head,straight,destination | ia |
|
||||
| ic | xi,xc | head,slight_right,destination | ic |
|
||||
| ie | xi,xe | head,right,destination | ie |
|
||||
|
||||
|
||||
| ko | xk,xo | head,left,destination | ko |
|
||||
| ka | xk,xa | head,slight_left,destination | ka |
|
||||
| kc | xk,xc | head,straight,destination | kc |
|
||||
@@ -96,21 +88,13 @@ Feature: Turn directions/codes
|
||||
And the ways
|
||||
| nodes |
|
||||
| xa |
|
||||
| xb |
|
||||
| xc |
|
||||
| xd |
|
||||
| xe |
|
||||
| xf |
|
||||
| xg |
|
||||
| xh |
|
||||
| xi |
|
||||
| xj |
|
||||
| xk |
|
||||
| xl |
|
||||
| xm |
|
||||
| xn |
|
||||
| xo |
|
||||
| xp |
|
||||
|
||||
When I match I should get
|
||||
| trace | route | turns | matchings | duration |
|
||||
|
||||
@@ -174,14 +174,14 @@ Feature: Testbot - Travel mode
|
||||
| ef | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| a | f | ab,bc,cd,de,ef | head,right,left,straight,straight,destination | 1,2,1,1,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| a | f | ab,bc,cd,de,ef | head,right,left,straight,straight,destination | 1,2,1,1,1 |
|
||||
|
||||
Scenario: Testbot - Modes, triangle map
|
||||
Given the node map
|
||||
|
||||
@@ -21,13 +21,13 @@ Feature: POST request
|
||||
| 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 |
|
||||
| from | to | route | turns |
|
||||
| a | c | ab,bc | head,straight,destination |
|
||||
| c | a | bc,ab | head,straight,destination |
|
||||
| x | z | xy,yz | head,straight,destination |
|
||||
| z | x | yz,xy | head,straight,destination |
|
||||
|
||||
Scenario: Testbot - match POST request
|
||||
Given a grid size of 10 meters
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
@routing @testbot @via
|
||||
Feature: Via points
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
|
||||
And a grid size of 4 meters
|
||||
|
||||
Scenario: Basic Right Turn
|
||||
Given the node map
|
||||
| a | b | c | d | e | f | g |
|
||||
| | | | | | h | |
|
||||
| | | | | | i | |
|
||||
| | | | | | j | |
|
||||
| | | | | | k | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abcdefg | yes |
|
||||
| ehijk | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance | turns |
|
||||
| a | k | abcdefg,ehijk | 34m +-1 | head,right,destination |
|
||||
|
||||
Scenario: Slight Turn
|
||||
Given the node map
|
||||
| a | b | c | d | e | f | g | |
|
||||
| | | | | | h | i | |
|
||||
| | | | | | | | j |
|
||||
| | | | | | | | k |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abcdefg | yes |
|
||||
| ehijk | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance | turns |
|
||||
| a | k | abcdefg,ehijk | 34m +-1 | head,slight_right,destination |
|
||||
|
||||
Scenario: Nearly Slight Turn
|
||||
Given the node map
|
||||
| a | b | c | d | e | f | g | |
|
||||
| | | | | | h | | |
|
||||
| | | | | | | i | |
|
||||
| | | | | | | | j |
|
||||
| | | | | | | | k |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abcdefg | yes |
|
||||
| ehijk | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance | turns |
|
||||
| a | k | abcdefg,ehijk | 37m +-1 | head,right,destination |
|
||||
|
||||
Scenario: Nearly Slight Turn (Variation)
|
||||
Given the node map
|
||||
| a | b | c | d | e | f | g | |
|
||||
| | | | | | h | | |
|
||||
| | | | | | | i | |
|
||||
| | | | | | | j | |
|
||||
| | | | | | | | k |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abcdefg | yes |
|
||||
| ehijk | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance | turns |
|
||||
| a | k | abcdefg,ehijk | 37m +-1 | head,right,destination |
|
||||
@@ -14,22 +14,14 @@ Feature: Turn directions/codes
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| xa |
|
||||
| xb |
|
||||
| xc |
|
||||
| xd |
|
||||
| xe |
|
||||
| xf |
|
||||
| xg |
|
||||
| xh |
|
||||
| xi |
|
||||
| xj |
|
||||
| xk |
|
||||
| xl |
|
||||
| xm |
|
||||
| xn |
|
||||
| xo |
|
||||
| xp |
|
||||
| xa |
|
||||
| xc |
|
||||
| xe |
|
||||
| xg |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
@@ -116,8 +108,8 @@ Feature: Turn directions/codes
|
||||
| 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 |
|
||||
| from | to | route | turns |
|
||||
| a | c | ab,bc | head,straight,destination |
|
||||
| c | a | bc,ab | head,straight,destination |
|
||||
| x | z | xy,yz | head,straight,destination |
|
||||
| z | x | yz,xy | head,straight,destination |
|
||||
|
||||
@@ -20,8 +20,8 @@ Feature: U-turns at via points
|
||||
| fg |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e,c | ab,be,be,ef,fg,dg,cd | head,right,via,left,straight,left,left,destination |
|
||||
| waypoints | route | turns |
|
||||
| a,e,c | ab,be,be,ef,fg,dg,cd | head,right,via,straight,straight,straight,straight,destination |
|
||||
|
||||
Scenario: Query param to allow U-turns at all via points
|
||||
Given the node map
|
||||
|
||||
@@ -86,12 +86,12 @@ Feature: Via points
|
||||
| fa | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance | turns |
|
||||
| 1,3 | ab,bc,cd | 400m +-1 | head,straight,straight,destination |
|
||||
| 3,1 | cd,de,ef,fa,ab | 1000m +-1 | head,right,right,right,right,destination |
|
||||
| 1,2,3 | ab,bc,bc,cd | 400m +-1 | head,straight,via,straight,destination |
|
||||
| 1,3,2 | ab,bc,cd,cd,de,ef,fa,ab,bc | 1600m +-1 | head,straight,straight,via,right,right,right,right,straight,destination |
|
||||
| 3,2,1 | cd,de,ef,fa,ab,bc,bc,cd,de,ef,fa,ab | 2400m +-1 | head,right,right,right,right,straight,via,straight,right,right,right,right,destination |
|
||||
| waypoints | route | distance | turns |
|
||||
| 1,3 | ab,bc,cd | 400m +-1 | head,straight,straight,destination |
|
||||
| 3,1 | cd,de,ef,fa,ab | 1000m +-1 | head,straight,straight,straight,right,destination |
|
||||
| 1,2,3 | ab,bc,bc,cd | 400m +-1 | head,straight,via,straight,destination |
|
||||
| 1,3,2 | ab,bc,cd,cd,de,ef,fa,ab,bc | 1600m +-1 | head,straight,straight,via,straight,straight,straight,right,straight,destination |
|
||||
| 3,2,1 | cd,de,ef,fa,ab,bc,bc,cd,de,ef,fa,ab | 2400m +-1 | head,straight,straight,straight,right,straight,via,straight,straight,straight,straight,right,destination |
|
||||
|
||||
Scenario: Via points on ring on the same oneway
|
||||
# xa it to avoid only having a single ring, which cna trigger edge cases
|
||||
@@ -109,12 +109,12 @@ Feature: Via points
|
||||
| da | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance | turns |
|
||||
| 1,3 | ab | 200m +-1 | head,destination |
|
||||
| 3,1 | ab,bc,cd,da,ab | 800m +-1 | head,right,right,right,right,destination |
|
||||
| 1,2,3 | ab,ab | 200m +-1 | head,via,destination |
|
||||
| 1,3,2 | ab,ab,bc,cd,da,ab | 1100m +-1 | head,via,right,right,right,right,destination |
|
||||
| 3,2,1 | ab,bc,cd,da,ab,ab,bc,cd,da,ab | 1800m | head,right,right,right,right,via,right,right,right,right,destination |
|
||||
| waypoints | route | distance | turns |
|
||||
| 1,3 | ab | 200m +-1 | head,destination |
|
||||
| 3,1 | ab,bc,cd,da,ab | 800m +-1 | head,straight,straight,straight,right,destination |
|
||||
| 1,2,3 | ab,ab | 200m +-1 | head,via,destination |
|
||||
| 1,3,2 | ab,ab,bc,cd,da,ab | 1100m +-1 | head,via,straight,straight,straight,right,destination |
|
||||
| 3,2,1 | ab,bc,cd,da,ab,ab,bc,cd,da,ab | 1800m | head,straight,straight,straight,right,via,straight,straight,straight,right,destination |
|
||||
|
||||
# See issue #1896
|
||||
Scenario: Via point at a dead end with oneway
|
||||
@@ -175,11 +175,11 @@ Feature: Via points
|
||||
| da | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance | turns |
|
||||
| 2,1 | ab,bc,cd,da,ab | 1100m +-1 | head,right,right,right,right,destination |
|
||||
| 4,3 | bc,cd,da,ab,bc | 1100m +-1 | head,right,right,right,right,destination |
|
||||
| 6,5 | cd,da,ab,bc,cd | 1100m +-1 | head,right,right,right,right,destination |
|
||||
| 8,7 | da,ab,bc,cd,da | 1100m +-1 | head,right,right,right,right,destination |
|
||||
| waypoints | route | distance | turns |
|
||||
| 2,1 | ab,bc,cd,da,ab | 1100m +-1 | head,straight,straight,straight,straight,destination |
|
||||
| 4,3 | bc,cd,da,ab,bc | 1100m +-1 | head,straight,straight,straight,straight,destination |
|
||||
| 6,5 | cd,da,ab,bc,cd | 1100m +-1 | head,straight,straight,straight,straight,destination |
|
||||
| 8,7 | da,ab,bc,cd,da | 1100m +-1 | head,straight,straight,straight,straight,destination |
|
||||
|
||||
Scenario: Multiple Via points on ring on the same oneway, forces one of the vertices to be top node
|
||||
Given the node map
|
||||
@@ -197,7 +197,7 @@ Feature: Via points
|
||||
| da | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance | turns |
|
||||
| 3,2,1 | ab,bc,cd,da,ab,ab,bc,cd,da,ab | 3000m +-1 | head,right,right,right,right,via,right,right,right,right,destination |
|
||||
| 6,5,4 | bc,cd,da,ab,bc,bc,cd,da,ab,bc | 3000m +-1 | head,right,right,right,right,via,right,right,right,right,destination |
|
||||
| 9,8,7 | cd,da,ab,bc,cd,cd,da,ab,bc,cd | 3000m +-1 | head,right,right,right,right,via,right,right,right,right,destination |
|
||||
| waypoints | route | distance | turns |
|
||||
| 3,2,1 | ab,bc,cd,da,ab,ab,bc,cd,da,ab | 3000m +-1 | head,straight,straight,straight,straight,via,straight,straight,straight,straight,destination |
|
||||
| 6,5,4 | bc,cd,da,ab,bc,bc,cd,da,ab,bc | 3000m +-1 | head,straight,straight,straight,straight,via,straight,straight,straight,straight,destination |
|
||||
| 9,8,7 | cd,da,ab,bc,cd,cd,da,ab,bc,cd | 3000m +-1 | head,straight,straight,straight,straight,via,straight,straight,straight,straight,destination |
|
||||
|
||||
Reference in New Issue
Block a user