refactor of post-processing

- moves collapse into a dedicated set of functions / files
 - make collapse scenarios distinct (slight performance cost)
 - reduce verbosity for short name segments (now actually working, was supposed to do so before)
This commit is contained in:
Moritz Kobitzsch
2017-02-15 15:12:24 +01:00
committed by Patrick Niklaus
parent 8d83c3adbb
commit 6c3390f14d
59 changed files with 1992 additions and 1337 deletions
+11 -11
View File
@@ -297,19 +297,19 @@ Feature: Turn Lane Guidance
"""
And the ways
| nodes | turn:lanes:forward | name |
| ab | | main |
| bc | left\|through\|through\|through\|right | main |
| cd | left\|through\|right | main |
| de | | main |
| cf | | off |
| ch | | off |
| dg | | off |
| di | | off |
| nodes | turn:lanes:forward | name | destination | oneway |
| ab | | main | One | yes |
| bc | left\|through\|through\|through\|right | main | One | yes |
| cd | left\|through\|right | main | Two | yes |
| de | | main | Three | yes |
| cf | | off | | yes |
| ch | | off | | yes |
| dg | | off | | yes |
| di | | off | | yes |
When I route I should get
| waypoints | route | turns | lanes |
| a,e | main,main,main | depart,use lane straight,arrive | ,left:false straight:false straight:true straight:false right:false, |
| waypoints | route | turns | destinations | lanes | locations |
| a,e | main,main,main | depart,use lane straight,arrive | One,Two,Three | ,left:false straight:false straight:true straight:false right:false, | a,c,e |
@anticipate
Scenario: Anticipate Lanes for through and collapse multiple use lanes
+2 -2
View File
@@ -33,8 +33,8 @@ Feature: Features related to bugs
| e | traffic_signals |
When I route I should get
| waypoints | route | turns |
| 1,2 | top,right,right | depart,new name right,arrive |
| waypoints | route | turns |
| 1,2 | top,right | depart,arrive |
@3156
Scenario: Incorrect lanes tag
+62 -5
View File
@@ -42,8 +42,8 @@ Feature: Collapse
| nodes | highway | name | oneway |
| abc | primary | road | yes |
| dejfg | primary | road | yes |
| fhb | primary_link | | |
| bie | primary_link | | |
| fhb | primary_link | | yes |
| bie | primary_link | | yes |
And the nodes
| node | highway |
@@ -54,7 +54,7 @@ Feature: Collapse
When I route I should get
| waypoints | route | turns | locations |
| a,g | road,road,road | depart,continue uturn,arrive | a,b,g |
| d,c | road,road,road | depart,continue uturn,arrive | d,f,b |
| d,c | road,road,road | depart,continue uturn,arrive | d,f,c |
Scenario: Forking before a turn (forky)
Given the node map
@@ -66,7 +66,7 @@ Feature: Collapse
`d.
f e
"""
# note: check clooapse.feature for a similar test case where we do not
# note: check collapse.feature for a similar test case where we do not
# classify the situation as Sliproad and therefore keep the fork inst.
And the ways
@@ -87,6 +87,63 @@ Feature: Collapse
When I route I should get
| waypoints | route | turns | locations |
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
| a,e | road,road,road | depart,continue right,arrive | a,b,e |
| a,e | road,road,road | depart,continue slight right,arrive | a,b,e |
# We should discuss whether the next item should be collapsed to depart,turn right,arrive.
| a,f | road,road,cross,cross | depart,continue slight right,turn right,arrive | a,b,d,f |
Scenario: Forking before a turn (forky), larger
Given the node map
"""
g
.
c
.'|
.' |
a . . b .' |
' . |
` d
f ' e
"""
And the ways
| nodes | name | oneway | highway |
| ab | road | yes | primary |
| bd | road | yes | primary |
| bc | road | yes | primary |
| de | road | yes | primary |
| fd | cross | no | secondary |
| dc | cross | no | secondary |
| cg | cross | no | secondary |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | bd | dc | d | no_left_turn |
| restriction | bc | dc | c | no_right_turn |
When I route I should get
| waypoints | route | turns | locations |
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
| a,e | road,road,road | depart,continue slight right,arrive | a,b,e |
# We should discuss whether the next item should be collapsed to depart,turn right,arrive.
| a,f | road,road,cross,cross | depart,continue slight right,turn right,arrive | a,b,d,f |
Scenario: Pulled Back Turn
Given the node map
"""
d
|
a-b-c
|
e
"""
And the ways
| nodes | highway | name |
| abc | tertiary | road |
| cd | tertiary | left |
| be | tertiary | right |
When I route I should get
| waypoints | route | turns |
| a,d | road,left,left | depart,turn left,arrive |
| a,e | road,right,right | depart,turn right,arrive |
+60 -78
View File
@@ -399,7 +399,9 @@ Feature: Collapse
| waypoints | route | turns |
| a,d | , | depart,arrive |
Scenario: Crossing Bridge into Segregated Turn
# This scenario could be considered to require a `turn left`. The danger to create random/unwanted instructions
# from a setting like this are just to big, though. Therefore I opted to use `depart,arrive` only
Scenario: Crossing Bridge into Segregated Turn
Given the node map
"""
f
@@ -419,8 +421,8 @@ Feature: Collapse
| hi | primary | yes | to_bridge |
When I route I should get
| waypoints | route | turns | locations |
| a,f | to_bridge,target_road,target_road | depart,turn left,arrive | a,d,f |
| waypoints | route | turns | locations |
| a,f | to_bridge,target_road | depart,arrive | a,f |
Scenario: Pankenbruecke
Given the node map
@@ -438,6 +440,9 @@ Feature: Collapse
|
|
|
|
|
|
g
"""
@@ -529,25 +534,6 @@ Feature: Collapse
| waypoints | route | turns |
| a,d | road,road | depart,arrive |
Scenario: Pulled Back Turn
Given the node map
"""
d
a b c
e
"""
And the ways
| nodes | highway | name |
| abc | tertiary | road |
| cd | tertiary | left |
| be | tertiary | right |
When I route I should get
| waypoints | route | turns |
| a,d | road,left,left | depart,turn left,arrive |
| a,e | road,right,right | depart,turn right,arrive |
Scenario: No Name During Turns, keep important turns
Given the node map
"""
@@ -708,41 +694,6 @@ Feature: Collapse
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
| a,e | road,road | depart,arrive | a,e |
Scenario: Forking before a turn (forky)
Given the node map
"""
g
.
c
a . . b .'
` d.
f e
"""
# as it is right now we don't classify this as a sliproad,
# check collapse-detail.feature for a similar test case
# which removes the fork here due to it being a Sliproad.
And the ways
| nodes | name | oneway | highway |
| ab | road | yes | primary |
| bd | road | yes | primary |
| bc | road | yes | primary |
| de | road | yes | primary |
| fd | cross | no | secondary |
| dc | cross | no | secondary |
| cg | cross | no | secondary |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | bd | dc | d | no_left_turn |
| restriction | bc | dc | c | no_right_turn |
When I route I should get
| waypoints | route | turns | locations |
| a,g | road,cross,cross | depart,fork left,arrive | a,b,g |
| a,e | road,road,road | depart,fork slight right,arrive | a,b,e |
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive | a,b,d,f |
Scenario: On-Off on Highway
Given the node map
"""
@@ -857,7 +808,7 @@ Feature: Collapse
When I route I should get
| waypoints | route | turns | locations |
| a,e | main,main,main | depart,use lane straight,arrive | a,b,e |
| a,e | main,main,main | depart,use lane straight,arrive | a,c,e |
Scenario: But _do_ collapse UseLane step when lanes stay the same
Given the node map
@@ -931,8 +882,8 @@ Feature: Collapse
| ej | primary | | off | yes |
When I route I should get
| waypoints | route | turns | locations |
| k,j | on,ferry,road,road,ferry,off,off | depart,notification straight,notification straight,continue uturn,turn straight,notification straight,arrive | k,g,a,b,c,d,e,j |
| waypoints | route | turns | locations |
| k,j | on,ferry,road,road,ferry,off,off | depart,notification straight,notification straight,continue uturn,turn straight,notification straight,arrive | k,g,a,b,d,e,j |
# http://www.openstreetmap.org/#map=19/37.78090/-122.41251
Scenario: U-Turn onto unnamed-road
@@ -956,7 +907,7 @@ Feature: Collapse
When I route I should get
| waypoints | route | turns | locations |
| a,1 | up,turn,, | depart,turn right,turn sharp right,arrive | a,b,e,f,_ |
| a,1 | up,turn,, | depart,turn right,turn sharp right,arrive | a,b,e,_ |
#http://www.openstreetmap.org/#map=19/52.48778/13.30024
Scenario: Hohenzollerdammbrücke
@@ -1008,23 +959,21 @@ Feature: Collapse
| os | motorway_link | a100 | yes |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | ck | kh | k | no_right_turn |
| restriction | bk | ki | k | no_left_turn |
| restriction | hl | lc | l | no_right_turn |
| restriction | gl | ld | l | no_left_turn |
| restriction | bc | cm | c | no_right_turn |
| restriction | bc | ck | c | no_left_turn |
| restriction | nc | cm | c | no_left_turn |
| restriction | nc | cd | c | no_right_turn |
| restriction | lc | ck | c | no_left_turn |
| restriction | lc | cd | c | no_right_turn |
| restriction | gh | ho | h | no_right_turn |
| restriction | gh | hl | h | no_left_turn |
| restriction | kh | hi | h | no_left_turn |
| restriction | kh | hl | h | no_right_turn |
| restriction | ph | ho | h | no_left_turn |
| restriction | ph | hi | h | no_right_turn |
| type | way:from | way:to | node:via | restriction |
| restriction | ck | ki | k | only_straight_on |
| restriction | bk | kh | k | only_straight_on |
| restriction | hl | ld | l | only_straight_on |
| restriction | gl | lc | l | only_straight_on |
| restriction | bc | cm | c | no_right_turn |
| restriction | bc | ck | c | no_left_turn |
| restriction | nc | cm | c | no_left_turn |
| restriction | nc | cd | c | no_right_turn |
| restriction | lc | cm | c | only_straight_on |
| restriction | gh | ho | h | no_right_turn |
| restriction | gh | hl | h | no_left_turn |
| restriction | kh | ho | h | only_straight_on |
| restriction | ph | ho | h | no_left_turn |
| restriction | ph | hi | h | no_right_turn |
When I route I should get
| waypoints | route | turns | locations |
@@ -1037,3 +986,36 @@ Feature: Collapse
| f,e | | | |
| q,j | a100,hohe,hohe | depart,turn right,arrive | q,p,j |
| q,e | a100,hohebruecke,hohe | depart,turn left,arrive | q,p,e |
Scenario: Forking before a turn (forky)
Given the node map
"""
g
.
c
a . . b .'
` d.
f e
"""
#Check collapse.detail for a similar case (shorter) that does not classify these turns as a sliproad anymore
And the ways
| nodes | name | oneway | highway |
| ab | road | yes | primary |
| bd | road | yes | primary |
| bc | road | yes | primary |
| de | road | yes | primary |
| fd | cross | no | secondary |
| dc | cross | no | secondary |
| cg | cross | no | secondary |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | bd | dc | d | no_left_turn |
| restriction | bc | dc | c | no_right_turn |
When I route I should get
| waypoints | route | turns | locations |
| a,g | road,cross,cross | depart,fork left,arrive | a,b,g |
| a,e | road,road,road | depart,fork slight right,arrive | a,b,e |
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive | a,b,d,f |
+21 -12
View File
@@ -64,9 +64,10 @@ Feature: Slipways and Dedicated Turn Lanes
| type | way:from | way:to | node:via | restriction |
| restriction | abc | cfg | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,g | first,,second,second | depart,turn right,turn straight,arrive |
#this is very ugly :(, but we don't have a way to overrule ramps right now, also: this tagging sucks
When I route I should get
| waypoints | route | turns |
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive |
Scenario: Turning Sliproad onto a ferry
Given the node map
@@ -99,9 +100,9 @@ Feature: Slipways and Dedicated Turn Lanes
| restriction | abc | cf | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,i | first,,second,second,second | depart,turn right,turn straight,notification straight,arrive |
| a,1 | first,, | depart,turn right,arrive |
| waypoints | route | turns |
| a,i | first,,second,second,second | depart,off ramp right,turn straight,notification straight,arrive |
| a,1 | first,, | depart,off ramp right,arrive |
Scenario: Turn Instead of Ramp - Max-Speed
Given the node map
@@ -315,8 +316,8 @@ Feature: Slipways and Dedicated Turn Lanes
| qe | secondary_link | Ettlinger Allee | | yes |
When I route I should get
| waypoints | route | turns | ref | locations |
| a,o | Schwarzwaldstrasse,Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | L561,L561, | a,b,o |
| waypoints | route | turns | ref | locations |
| a,o | Schwarzwaldstrasse,Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | L561,, | a,b,o |
Scenario: Traffic Lights everywhere
#http://map.project-osrm.org/?z=18&center=48.995336%2C8.383813&loc=48.995467%2C8.384548&loc=48.995115%2C8.382761&hl=en&alt=0
@@ -341,9 +342,17 @@ Feature: Slipways and Dedicated Turn Lanes
And the ways
| nodes | highway | name | oneway |
| aklbci | secondary | Ebertstrasse | yes |
| ak | secondary | Ebertstrasse | yes |
| klbc | secondary | Ebertstrasse | yes |
| ci | secondary | Ebertstrasse | yes |
| kdeh | secondary_link | | yes |
| jcghf | primary | Brauerstrasse | yes |
| jc | primary | Brauerstrasse | yes |
| cgh | primary | Brauerstrasse | yes |
| hf | primary | Brauerstrasse | yes |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | klbc | cgh | c | no_right_turn |
When I route I should get
| waypoints | route | turns | locations |
@@ -933,5 +942,5 @@ Feature: Slipways and Dedicated Turn Lanes
| restriction | bc | cd | c | only_straight |
When I route I should get
| waypoints | route | turns | locations |
| a,k | road,,, | depart,continue right,roundabout turn right exit-1,arrive | a,b,h,k |
| waypoints | route | turns | locations |
| a,k | road,,, | depart,turn right,roundabout turn right exit-1,arrive | a,b,h,k |
+7 -7
View File
@@ -39,8 +39,8 @@ Feature: Fork Instructions
| bd | primary | yes |
When I route I should get
| waypoints | route | turns |
| a,d | ab,bd,bd | depart,new name slight right,arrive |
| waypoints | route | turns |
| a,d | ab,bd | depart,arrive |
Scenario: Don't Fork On Single Road
Given the node map
@@ -56,8 +56,8 @@ Feature: Fork Instructions
| bd | primary | yes | turn |
When I route I should get
| waypoints | route | turns |
| a,d | road,turn,turn | depart,new name straight,arrive |
| waypoints | route | turns |
| a,d | road,turn | depart,arrive |
Scenario: Do not fork on link type
Given the node map
@@ -382,6 +382,6 @@ Feature: Fork Instructions
| ab | on | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,j | on,xbcj | depart,arrive |
| a,i | on,off,off | depart,turn slight right,arrive |
| waypoints | route | turns |
| a,j | on,xbcj | depart,arrive |
| a,i | on,off,off | depart,turn right,arrive |
+3 -3
View File
@@ -110,9 +110,9 @@ Feature: Intersections Data
| cf | corner |
When I route I should get
| waypoints | route | intersections |
| a,d | through,through | true:90,true:0 true:90 false:270,true:90 true:180 false:270;true:270 |
| f,a | corner,through,through | true:0;true:90 false:180 true:270,true:0 false:90 true:270;true:90 |
| waypoints | route | intersections |
| a,d | through,through | true:90,true:0 true:90 false:270,true:90 true:180 false:270;true:270 |
| f,a | corner,throughbridge,through | true:0;true:90 false:180 true:270,true:0 false:90 true:270;true:90 |
Scenario: Roundabouts
Given the node map
+5 -5
View File
@@ -80,8 +80,8 @@ Feature: Exceptions for routing onto low-priority roads
| bc | service | service |
When I route I should get
| waypoints | route | turns |
| a,c | road,service,service | depart,new name straight,arrive |
| waypoints | route | turns |
| a,c | road,service | depart,arrive |
Scenario: Straight onto low-priority, with driveway
Given the node map
@@ -114,6 +114,6 @@ Feature: Exceptions for routing onto low-priority roads
| bf | driveway | |
When I route I should get
| waypoints | route | turns |
| a,c | road, | depart,arrive |
| c,a | ,road,road | depart,new name straight,arrive |
| waypoints | route | turns |
| a,c | road, | depart,arrive |
| c,a | ,road | depart,arrive |
@@ -354,13 +354,13 @@ Feature: Merge Segregated Roads
| hb | road | yes |
When I route I should get
| waypoints | turns | route | intersections |
| a,f | depart,arrive | road,road | true:180,false:0 true:180,false:0 true:180;true:0 |
| c,f | depart,new name straight,arrive | bridge,road,road | true:180;false:0 true:180;true:0 |
| 1,f | depart,new name straight,arrive | bridge,road,road | true:180;false:0 true:180;true:0 |
| f,a | depart,arrive | road,road | true:0,true:0 false:180,true:0 false:180;true:180 |
| g,a | depart,new name straight,arrive | bridge,road,road | true:0;true:0 false:180;true:180 |
| 2,a | depart,new name straight,arrive | bridge,road,road | true:0;true:0 false:180;true:180 |
| waypoints | turns | route | intersections |
| a,f | depart,arrive | road,road | true:180,false:0 true:180,false:0 true:180;true:0 |
| c,f | depart,arrive | bridge,road | true:180,false:0 true:180;true:0 |
| 1,f | depart,arrive | bridge,road | true:180,false:0 true:180;true:0 |
| f,a | depart,arrive | road,road | true:0,true:0 false:180,true:0 false:180;true:180 |
| g,a | depart,arrive | bridge,road | true:0,true:0 false:180;true:180 |
| 2,a | depart,arrive | bridge,road | true:0,true:0 false:180;true:180 |
@negative
Scenario: Traffic Circle
@@ -501,25 +501,25 @@ Feature: Merge Segregated Roads
| jc | vert | yes |
| cf | vert | yes |
| fl | vert | yes |
| gx | horiz | no |
| xg | horiz | no |
| xc | horiz | no |
| fx | horiz | no |
| xf | horiz | no |
| xb | horiz | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | bc | cf | c | no_left_turn |
| restriction | fg | gb | g | no_left_turn |
| restriction | cf | fg | f | no_left_turn |
| restriction | gb | bc | b | no_left_turn |
| restriction | xb | bc | b | no_left_turn |
| restriction | xc | cf | c | no_left_turn |
| restriction | xf | fg | f | no_left_turn |
| restriction | xg | gb | g | no_left_turn |
| type | way:from | way:to | node:via | restriction |
| restriction | bc | cf | c | no_left_turn |
| restriction | fg | gb | g | no_left_turn |
| restriction | gb | bc | b | no_left_turn |
| restriction | cf | fg | f | no_left_turn |
| restriction | xb | xf | x | only_straight_on |
| restriction | xf | xb | x | only_straight_on |
| restriction | xg | xc | x | only_straight_on |
| restriction | xc | xg | x | only_straight_on |
# the goal here should be not to mention the intersection in the middle at all and also suppress the segregated parts
When I route I should get
| waypoints | route | intersections |
| a,l | horiz,vert,vert | true:90;false:0 true:60 true:90 true:180 false:270,true:60 true:120 false:240 true:300,true:0 false:90 false:180 false:240 false:270;true:180 |
| a,d | horiz,horiz | true:90,false:0 true:60 true:90 true:180 false:270,false:0 true:90 false:180 false:270 true:300;true:270 |
| j,h | vert,horiz,horiz | true:0;true:0 true:90 false:180 false:270 true:300,true:60 false:120 true:240 true:300,false:0 false:90 false:120 false:180 true:270;true:90 |
| j,l | vert,vert | true:0,true:0 true:90 false:180 false:270 true:300,true:0 false:90 false:180 true:240 false:270;true:180 |
| waypoints | route | intersections |
| a,l | horiz,vert,vert | true:90;false:0 true:60 true:90 true:180 false:270,true:60 false:120 false:240 false:300,true:0 false:90 false:180 false:240 true:270;true:180 |
| a,d | horiz,horiz | true:90,false:0 true:60 true:90 true:180 false:270,false:0 true:90 false:180 false:270 true:300;true:270 |
| j,h | vert,horiz,horiz | true:0;true:0 true:90 false:180 false:270 true:300,false:60 false:120 false:240 true:300,false:0 false:90 false:120 true:180 true:270;true:90 |
| j,l | vert,vert | true:0,true:0 true:90 false:180 false:270 true:300,true:0 false:90 false:180 true:240 false:270;true:180 |
+1 -1
View File
@@ -3,7 +3,7 @@ Feature: New-Name Instructions
Background:
Given the profile "car"
Given a grid size of 100 meters
Given a grid size of 150 meters
Scenario: Undisturbed name Change
Given the node map
+2 -2
View File
@@ -97,5 +97,5 @@ Feature: Simple Turns
| ei | left | yes |
When I route I should get
| waypoints | route |
| g,a | in,road,road |
| waypoints | route | turns |
| g,a | in,road,road | depart,fork right,arrive |
+3 -3
View File
@@ -233,9 +233,9 @@ Feature: Ramp Guidance
| cd | motorway |
When I route I should get
| waypoints | route | turns |
| a,d | ac,cd,cd | depart,new name slight left,arrive |
| b,d | bc,cd,cd | depart,new name slight right,arrive |
| waypoints | route | turns |
| a,d | ac,cd | depart,arrive |
| b,d | bc,cd | depart,arrive |
Scenario: Two Ramps Joining into common Motorway Unnamed
Given the node map
+3 -3
View File
@@ -410,10 +410,10 @@ Feature: Basic Roundabout
| h | give_way |
When I route I should get
| waypoints | route | turns |
# since we cannot handle these invalid roundabout tags yet, we cannout output roundabout taggings. This will hopefully change some day
| waypoints | route | turns | locations |
# since we cannot handle these invalid roundabout tags yet, we cannot output roundabout taggings. This will hopefully change some day
#| w,x | ll,egg,egg,tr,tr | depart,roundabout-exit-1,roundabout-exit-2,arrive |
| w,x | ll,egg,egg,tr,tr | depart,turn right,continue left,turn straight,arrive |
| w,x | ll,egg,egg,tr,tr | depart,turn right,continue left,turn straight,arrive | w,b,d,f,x |
Scenario: Use Lane in Roundabout
Given the node map
@@ -79,7 +79,7 @@ Feature: Staggered Intersections
| a,g | Oak St,Oak St,Oak St | depart,continue uturn,arrive | a,c,g |
| g,a | Oak St,Oak St,Oak St | depart,continue uturn,arrive | g,e,a |
Scenario: Staggered Intersection: do not collapse if the names are not the same
Scenario: Staggered Intersection: use new-name if the names are not the same
Given the node map
"""
j
@@ -97,9 +97,9 @@ Feature: Staggered Intersections
| jcdehi | residential | Cedar Dr |
When I route I should get
| waypoints | route | turns | locations |
| a,g | Oak St,Cedar Dr,Elm St,Elm St | depart,turn right,turn left,arrive | a,c,e,g |
| g,a | Elm St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | g,e,c,a |
| waypoints | route | turns | locations |
| a,g | Oak St,Elm St | depart,arrive | a,g |
| g,a | Elm St,Oak St | depart,arrive | g,a |
Scenario: Staggered Intersection: do not collapse if a mode change is involved
Given the node map
@@ -107,7 +107,7 @@ Feature: Staggered Intersections
j
a b c
d
e f g
e~~f - - - - g
h
"""
+23 -23
View File
@@ -150,7 +150,7 @@ Feature: Simple Turns
| nodes | highway | name | lanes | oneway |
| akb | primary | road | 4 | yes |
| hgi | primary | road | 4 | yes |
| akcdefg | primary_link | | 1 | yes |
| kcdefg | primary_link | | 1 | yes |
| gj | tertiary | turn | 1 | |
When I route I should get
@@ -444,7 +444,7 @@ Feature: Simple Turns
When I route I should get
| waypoints | route | turns | locations | # |
| g,f | turn,road | depart,arrive | g,f | #could offer an additional turn at `e` if you don't detect the turn in between as curve |
| g,f | turn,road,road | depart,turn left,arrive | g,e,f | #could offer an additional turn at `e` if you don't detect the turn in between as curve |
| c,f | road,road,road | depart,continue right,arrive | c,b,f | |
#http://www.openstreetmap.org/search?query=52.479264%2013.295617#map=19/52.47926/13.29562
@@ -808,15 +808,15 @@ Feature: Simple Turns
| cjk | Friede | no | | tertiary |
When I route I should get
| waypoints | route | turns | intersections |
| a,g | Perle,Heide,Heide | depart,turn right,arrive | true:90;true:90 true:180 false:270 true:345;true:18 |
| a,k | Perle,Friede,Friede | depart,turn left,arrive | true:90;true:90 true:180 false:270 true:345;true:153 |
| a,e | Perle,Perle | depart,arrive | true:90,true:90 true:180 false:270 true:345;true:270 |
| e,k | Perle,Friede,Friede | depart,turn right,arrive | true:270;false:90 true:180 true:270 true:345;true:153 |
| e,g | Perle,Heide,Heide | depart,turn left,arrive | true:270;false:90 true:180 true:270 true:345;true:18 |
| h,k | Heide,Friede,Friede | depart,new name straight,arrive | true:16;true:90 true:180 true:270 true:345;true:153 |
| h,e | Heide,Perle,Perle | depart,turn right,arrive | true:16;true:90 true:180 true:270 true:345;true:270 |
| h,a | Heide,Perle,Perle | depart,turn left,arrive | true:16;true:90 true:180 true:270 true:345;true:90 |
| waypoints | route | turns | intersections |
| a,g | Perle,Heide,Heide | depart,turn right,arrive | true:90;true:90 true:180 false:270 true:345;true:18 |
| a,k | Perle,Friede,Friede | depart,turn left,arrive | true:90;true:90 true:180 false:270 true:345;true:153 |
| a,e | Perle,Perle | depart,arrive | true:90,true:90 true:180 false:270 true:345;true:270 |
| e,k | Perle,Friede,Friede | depart,turn right,arrive | true:270;false:90 true:180 true:270 true:345;true:153 |
| e,g | Perle,Heide,Heide | depart,turn left,arrive | true:270;false:90 true:180 true:270 true:345;true:18 |
| h,k | Heide,Friede | depart,arrive | true:16,true:90 true:180 true:270 true:345;true:153 |
| h,e | Heide,Perle,Perle | depart,turn right,arrive | true:16;true:90 true:180 true:270 true:345;true:270 |
| h,a | Heide,Perle,Perle | depart,turn left,arrive | true:16;true:90 true:180 true:270 true:345;true:90 |
#http://www.openstreetmap.org/#map=19/52.53293/13.32956
Scenario: Curved Exit from Curved Road
@@ -852,9 +852,9 @@ Feature: Simple Turns
When I route I should get
| waypoints | route | turns |
| a,j | Siemens,Siemens,Siemens | depart,continue slight right,arrive |
| a,g | Siemens,Erna,Erna | depart,new name slight left,arrive |
| a,g | Siemens,Erna | depart,arrive |
| g,j | Erna,Siemens,Siemens | depart,turn left,arrive |
| g,a | Erna,Siemens,Siemens | depart,new name slight right,arrive |
| g,a | Erna,Siemens | depart,arrive |
#http://www.openstreetmap.org/#map=19/52.51303/13.32170
Scenario: Ernst Reuter Platz
@@ -1188,12 +1188,12 @@ Feature: Simple Turns
| j | traffic_signals |
When I route I should get
| waypoints | route | turns |
| a,c | rose,trift,trift | depart,new name slight left,arrive |
| a,k | rose,muhle,muhle | depart,turn slight right,arrive |
| d,f | trift,rose,rose | depart,new name straight,arrive |
| d,k | trift,muhle,muhle | depart,turn sharp left,arrive |
| d,c | trift,trift,trift | depart,continue uturn,arrive |
| waypoints | route | turns |
| a,c | rose,trift | depart,arrive |
| a,k | rose,muhle,muhle | depart,turn slight right,arrive |
| d,f | trift,rose | depart,arrive |
| d,k | trift,muhle,muhle | depart,turn sharp left,arrive |
| d,c | trift,trift,trift | depart,continue uturn,arrive |
#http://www.openstreetmap.org/#map=19/52.50740/13.44824
Scenario: Turning Loop at the end of the road
@@ -1275,8 +1275,8 @@ Feature: Simple Turns
| bcde | 6 |
When I route I should get
| waypoints | route |
| a,e | ab,bcde,bcde |
| waypoints | route |
| a,e | ab,bcde |
@3401
@@ -1312,8 +1312,8 @@ Feature: Simple Turns
# we don't care for turn instructions, this is a coordinate extraction bug check
When I route I should get
| waypoints | route | intersections |
| a,g | ab,bcdefgh,bcdefgh | true:90;true:45 false:180 false:270;true:180 |
| waypoints | route | intersections |
| a,g | ab,bcdefgh | true:90,true:45 false:180 false:270;true:180 |
#https://github.com/Project-OSRM/osrm-backend/pull/3469#issuecomment-270806580
Scenario: Oszillating Lower Priority Road
+27 -12
View File
@@ -3,7 +3,7 @@ Feature: Turn Lane Guidance
Background:
Given the profile "car"
Given a grid size of 20 meters
Given a grid size of 5 meters
@simple
Scenario: Basic Turn Lane 3-way Turn with empty lanes
@@ -602,6 +602,17 @@ Feature: Turn Lane Guidance
a e
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
b d
h c
' -- g - - f
@@ -609,8 +620,8 @@ Feature: Turn Lane Guidance
And the ways
| nodes | name | turn:lanes:forward | oneway | highway | lanes |
| abc | road | left\|left\|left\|through\|through | yes | primary | 5 |
| cde | road | | yes | primary | 3 |
| abc | road | left\|left\|left\|through\|through | yes | primary | 2 |
| cde | road | | yes | primary | 2 |
| hc | cross | | yes | secondary | |
| cg | straight | | no | tertiary | |
| cf | left | | yes | primary | |
@@ -808,6 +819,10 @@ Feature: Turn Lane Guidance
"""
a b e
d c f
"""
@@ -858,9 +873,9 @@ Feature: Turn Lane Guidance
| ab | on | motorway_link | |
When I route I should get
| waypoints | route | turns | lanes |
| a,j | on,xbcj | depart,arrive | , |
| a,i | on,off,off | depart,turn slight right,arrive | ,none:false slight right:true, |
| waypoints | route | turns | lanes |
| a,j | on,xbcj | depart,arrive | , |
| a,i | on,off,off | depart,turn right,arrive | ,none:false slight right:true, |
#http://www.openstreetmap.org/#map=17/52.47414/13.35712
@todo @ramp @2645
@@ -937,9 +952,9 @@ Feature: Turn Lane Guidance
| dce | cross | primary | yes | | 1 |
When I route I should get
| waypoints | route | turns | lanes |
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, |
| a,e | road,cross,cross | depart,turn left,arrive | ,left:true right:false, |
| waypoints | route | turns | lanes | locations |
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, | a,b,g |
| a,e | road,cross,cross | depart,end of road left,arrive | ,left:true right:false, | a,c,e |
Scenario: Partitioned turn, Slight Curve
Given the node map
@@ -960,9 +975,9 @@ Feature: Turn Lane Guidance
| dce | cross | primary | yes | |
When I route I should get
| waypoints | route | turns | lanes |
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, |
| a,e | road,cross,cross | depart,turn left,arrive | ,left:true right:false, |
| waypoints | route | turns | lanes | locations |
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, | a,b,g |
| a,e | road,cross,cross | depart,end of road left,arrive | ,left:true right:false, | a,c,e |
Scenario: Lane Parsing Issue #2694
Given the node map
+44 -44
View File
@@ -23,15 +23,15 @@ Feature: Simple Turns
When I route I should get
| waypoints | route | turns |
| a,c | ab,cb,cb | depart,turn left,arrive |
| a,e | ab,eb,eb | depart,new name straight,arrive |
| a,e | ab,eb | depart,arrive |
| a,d | ab,db,db | depart,turn right,arrive |
| c,a | cb,ab,ab | depart,turn right,arrive |
| c,d | cb,db,db | depart,new name straight,arrive |
| c,d | cb,db | depart,arrive |
| c,e | cb,eb,eb | depart,turn left,arrive |
| d,a | db,ab,ab | depart,turn left,arrive |
| d,c | db,cb,cb | depart,new name straight,arrive |
| d,c | db,cb | depart,arrive |
| d,e | db,eb,eb | depart,turn right,arrive |
| e,a | eb,ab,ab | depart,new name straight,arrive |
| e,a | eb,ab | depart,arrive |
| e,c | eb,cb,cb | depart,turn right,arrive |
| e,d | eb,db,db | depart,turn left,arrive |
@@ -53,15 +53,15 @@ Feature: Simple Turns
When I route I should get
| waypoints | route | turns |
| a,c | ab,cb,cb | depart,turn left,arrive |
| a,e | ab,eb,eb | depart,new name straight,arrive |
| a,e | ab,eb | depart,arrive |
| a,d | ab,db,db | depart,turn right,arrive |
| c,a | cb,ab,ab | depart,turn right,arrive |
| c,d | cb,db,db | depart,new name straight,arrive |
| c,d | cb,db | depart,arrive |
| c,e | cb,eb,eb | depart,turn left,arrive |
| d,a | db,ab,ab | depart,turn left,arrive |
| d,c | db,cb,cb | depart,new name straight,arrive |
| d,c | db,cb | depart,arrive |
| d,e | db,eb,eb | depart,turn right,arrive |
| e,a | eb,ab,ab | depart,new name straight,arrive |
| e,a | eb,ab | depart,arrive |
| e,c | eb,cb,cb | depart,turn right,arrive |
| e,d | eb,db,db | depart,turn left,arrive |
@@ -86,10 +86,10 @@ Feature: Simple Turns
| a,e | abe,abe | depart,arrive |
| a,d | abe,db,db | depart,turn right,arrive |
| c,a | cb,abe,abe | depart,turn right,arrive |
| c,d | cb,db,db | depart,new name straight,arrive |
| c,d | cb,db | depart,arrive |
| c,e | cb,abe,abe | depart,turn left,arrive |
| d,a | db,abe,abe | depart,turn left,arrive |
| d,c | db,cb,cb | depart,new name straight,arrive |
| d,c | db,cb | depart,arrive |
| d,e | db,abe,abe | depart,turn right,arrive |
| e,a | abe,abe | depart,arrive |
| e,c | abe,cb,cb | depart,turn right,arrive |
@@ -139,9 +139,9 @@ Feature: Simple Turns
When I route I should get
| waypoints | route | turns |
| a,c | ab,cb,cb | depart,turn left,arrive |
| a,d | ab,db,db | depart,new name straight,arrive |
| a,d | ab,db | depart,arrive |
| d,c | db,cb,cb | depart,turn right,arrive |
| d,a | db,ab,ab | depart,new name straight,arrive |
| d,a | db,ab | depart,arrive |
Scenario: Three Way Intersection - Meeting Oneways
Given the node map
@@ -208,7 +208,7 @@ Feature: Simple Turns
| b,c | ab,ac,ac | depart,turn sharp left,arrive |
| b,d | ab,ad,ad | depart,turn left,arrive |
| b,e | ab,ae,ae | depart,turn slight left,arrive |
| b,f | ab,af,af | depart,new name straight,arrive |
| b,f | ab,af | depart,arrive |
| b,g | ab,ag,ag | depart,turn slight right,arrive |
| b,h | ab,ah,ah | depart,turn right,arrive |
| b,i | ab,ai,ai | depart,turn sharp right,arrive |
@@ -241,7 +241,7 @@ Feature: Simple Turns
| b,c | ab,ac,ac | depart,turn sharp left,arrive |
| b,d | ab,ad,ad | depart,turn left,arrive |
| b,e | ab,ae,ae | depart,turn slight left,arrive |
| b,f | ab,af,af | depart,new name straight,arrive |
| b,f | ab,af | depart,arrive |
| b,g | ab,ag,ag | depart,turn slight right,arrive |
| b,h | ab,ah,ah | depart,turn right,arrive |
| b,i | ab,ai,ai | depart,turn sharp right,arrive |
@@ -743,10 +743,10 @@ Feature: Simple Turns
| be | primary | no |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc | depart,arrive |
| d,e | db,be,be | depart,new name slight right,arrive |
| e,d | be,db,db | depart,new name slight left,arrive |
| waypoints | route | turns |
| a,c | abc,abc | depart,arrive |
| d,e | db,be | depart,arrive |
| e,d | be,db | depart,arrive |
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 1
Given the node map
@@ -904,19 +904,19 @@ Feature: Simple Turns
| bd | residential | in |
When I route I should get
| waypoints | turns | route |
| a,c | depart,arrive | road,road |
| d,a | depart,turn left,arrive | in,road,road |
| d,c | depart,new name straight,arrive | in,road,road |
| waypoints | turns | route |
| a,c | depart,arrive | road,road |
| d,a | depart,turn left,arrive | in,road,road |
| d,c | depart,arrive | in,road |
Scenario: Channing Street
Given the node map
"""
g f
d c b a
| |
d---c-b-a
| |
| |
h e
"""
@@ -1030,9 +1030,9 @@ Feature: Simple Turns
| ec | Molkenmarkt | secondary | yes |
When I route I should get
| waypoints | turns | route |
| a,d | depart,new name straight,arrive | Molkenmarkt,Stralauer Str,Stralauer Str |
| e,d | depart,new name slight left,arrive | Molkenmarkt,Stralauer Str,Stralauer Str |
| waypoints | turns | route |
| a,d | depart,arrive | Molkenmarkt,Stralauer Str |
| e,d | depart,arrive | Molkenmarkt,Stralauer Str |
# http://www.openstreetmap.org/#map=18/39.28158/-76.62291
@3002
@@ -1149,19 +1149,19 @@ Feature: Simple Turns
| a,c | in,through,through | depart,turn left,arrive |
# http://www.openstreetmap.org/#map=19/52.51556/13.41832
Scenario: No Slight Right over Jannowitzbruecke
Scenario: No Slight Right at Stralauer Strasse
Given the node map
"""
l m
| |
f._ | |
' g---h.
| | '.
| | i
| | '-i
| |
a_ | |
''.b---c
| |'d._
| | 'e
| |' d._
| | 'e
j k
"""
@@ -1175,20 +1175,20 @@ Feature: Simple Turns
| kchm | Alexanderstr | primary | yes |
When I route I should get
| waypoints | turns | route |
| a,e | depart,new name straight,arrive | Stralauer Str,Holzmarktstr,Holzmarktstr |
| waypoints | turns | route |
| a,e | depart,arrive | Stralauer Str,Holzmarktstr |
Scenario: No Slight Right over Jannowitzbruecke -- less extreme
Scenario: No Slight Right at Stralauer Strasse -- less extreme
Given the node map
"""
l m
| |
f_ | |
' 'g h_
' 'g---h_
| | '\_
| | i
a_ | |
'_ b c_
'_ b___c_
| | \_
| | e
j k
@@ -1204,20 +1204,20 @@ Feature: Simple Turns
| kchm | Alexanderstr | primary | yes |
When I route I should get
| waypoints | turns | route |
| a,e | depart,new name straight,arrive | Stralauer Str,Holzmarktstr,Holzmarktstr |
| waypoints | turns | route |
| a,e | depart,arrive | Stralauer Str,Holzmarktstr |
Scenario: No Slight Right over Jannowitzbruecke
Scenario: No Slight Right at Stralauer Strasse
Given the node map
"""
l m
| |
| |
_ _ g h_
_ _ g---h_
f' | | '_
| | i
| |
_ _b c__
_ _b---c__
a' | | 'd
| |
j k