refactor merging of segregated roads
adjust to generalFindMaximum function moved parallel detection to ratio/absolute based regression testing considerably improved detection quality using normalised regression lines only follow initial direction/narrow turns for parallel detection
This commit is contained in:
@@ -143,37 +143,33 @@ Feature: Collapse
|
||||
Scenario: Partly Segregated Intersection, Two Segregated Roads
|
||||
Given the node map
|
||||
"""
|
||||
n m
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
g h
|
||||
|
||||
|
||||
c b a
|
||||
d e f
|
||||
|
||||
|
||||
j i
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
k l
|
||||
n m
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
g h
|
||||
c - b - a
|
||||
d - e - f
|
||||
j i
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
k l
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| ab | primary | first | yes |
|
||||
| bc | primary | first | yes |
|
||||
| de | primary | first | yes |
|
||||
| ef | primary | first | yes |
|
||||
| be | primary | first | no |
|
||||
| ngbhm | primary | second | yes |
|
||||
| liejk | primary | second | yes |
|
||||
| nodes | highway | name | oneway | lanes |
|
||||
| ab | primary | first | yes | |
|
||||
| bc | primary | first | yes | |
|
||||
| de | primary | first | yes | |
|
||||
| ef | primary | first | yes | |
|
||||
| be | primary | first | no | |
|
||||
| ngbhm | primary | second | yes | 5 |
|
||||
| liejk | primary | second | yes | 5 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
@@ -197,33 +193,37 @@ Feature: Collapse
|
||||
Scenario: Partly Segregated Intersection, Two Segregated Roads, Intersection belongs to Second
|
||||
Given the node map
|
||||
"""
|
||||
n m
|
||||
|
||||
|
||||
|
||||
g h
|
||||
|
||||
|
||||
c b a
|
||||
d e f
|
||||
|
||||
|
||||
j i
|
||||
|
||||
|
||||
|
||||
k l
|
||||
n m
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
g h
|
||||
\ /
|
||||
c - b - a
|
||||
d - e - f
|
||||
/ \
|
||||
j i
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
k l
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| ab | primary | first | yes |
|
||||
| bc | primary | first | yes |
|
||||
| de | primary | first | yes |
|
||||
| ef | primary | first | yes |
|
||||
| be | primary | second | no |
|
||||
| ngbhm | primary | second | yes |
|
||||
| liejk | primary | second | yes |
|
||||
| nodes | highway | name | oneway | lanes |
|
||||
| ab | primary | first | yes | |
|
||||
| bc | primary | first | yes | |
|
||||
| de | primary | first | yes | |
|
||||
| ef | primary | first | yes | |
|
||||
| be | primary | second | no | |
|
||||
| ngbhm | primary | second | yes | 5 |
|
||||
| liejk | primary | second | yes | 5 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
@@ -353,13 +353,13 @@ Feature: Collapse
|
||||
| ge | primary | second | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive |
|
||||
| a,f | first,first,first | depart,continue uturn,arrive |
|
||||
| a,g | first,second,second | depart,turn left,arrive |
|
||||
| d,g | first,second,second | depart,turn right,arrive |
|
||||
| g,f | second,first,first | depart,turn right,arrive |
|
||||
| g,c | second,first,first | depart,turn left,arrive |
|
||||
| waypoints | route | turns |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive |
|
||||
| a,f | first,first,first | depart,continue uturn,arrive |
|
||||
| a,g | first,second,second | depart,turn left,arrive |
|
||||
| d,g | first,second,second | depart,turn right,arrive |
|
||||
| g,f | second,first,first | depart,turn right,arrive |
|
||||
| g,c | second,first,first | depart,end of road left,arrive |
|
||||
|
||||
Scenario: Do not collapse turning roads
|
||||
Given the node map
|
||||
@@ -425,18 +425,28 @@ Feature: Collapse
|
||||
Scenario: Pankenbruecke
|
||||
Given the node map
|
||||
"""
|
||||
j h i
|
||||
b c d e f g
|
||||
k a
|
||||
k j
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
a h
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f-i
|
||||
|
|
||||
|
|
||||
|
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| kabhj | primary | inroad | yes |
|
||||
| bc | primary | inroad | no |
|
||||
| cd | primary | bridge | no |
|
||||
| defg | primary | outroad | no |
|
||||
| fi | primary | cross | no |
|
||||
| nodes | highway | name | oneway | lanes |
|
||||
| kabhj | primary | inroad | yes | 4 |
|
||||
| bc | primary | inroad | no | |
|
||||
| cd | primary | bridge | no | |
|
||||
| defg | primary | outroad | no | |
|
||||
| fi | primary | cross | no | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
|
||||
@@ -0,0 +1,525 @@
|
||||
@guidance @merge-segregated
|
||||
Feature: Merge Segregated Roads
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 3 meters
|
||||
|
||||
#http://www.openstreetmap.org/#map=18/52.49950/13.33916
|
||||
@negative
|
||||
Scenario: oneway link road
|
||||
Given the node map
|
||||
"""
|
||||
f - - - - - - -_-_e - - - - d
|
||||
...''
|
||||
a - - - b'- - - - - - - - - c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| abc | road | yes |
|
||||
| def | road | yes |
|
||||
| be | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,c | road,road | true:90,true:75 true:90 false:270;true:270 |
|
||||
| d,f | road,road | true:270,false:90 false:255 true:270;true:90 |
|
||||
|
||||
#http://www.openstreetmap.org/#map=18/52.48337/13.36184
|
||||
@negative
|
||||
Scenario: Square Area - Same Name as road for in/out
|
||||
Given the node map
|
||||
"""
|
||||
i
|
||||
|
|
||||
|
|
||||
|
|
||||
g
|
||||
/ \
|
||||
/ \
|
||||
/ \
|
||||
/ \
|
||||
/ \
|
||||
a - - - - c e - - - - f
|
||||
\ /
|
||||
\ /
|
||||
\ /
|
||||
\ /
|
||||
\ /
|
||||
d
|
||||
|
|
||||
|
|
||||
|
|
||||
j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ac | road | no |
|
||||
| ef | road | no |
|
||||
| cdegc | road | yes |
|
||||
| ig | top | no |
|
||||
| jd | bot | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,f | road,road,road,road | true:90,false:45 true:135 false:270;true:45 true:180 false:315;true:90 false:225 true:315;true:270 |
|
||||
|
||||
#https://www.openstreetmap.org/#map=19/52.50003/13.33915
|
||||
@negative
|
||||
Scenario: Short Segment due to different roads
|
||||
Given the node map
|
||||
"""
|
||||
. d
|
||||
. '
|
||||
. '
|
||||
. '
|
||||
. '
|
||||
a - - - - - - - b - - c - - - - - - e
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
.
|
||||
f
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| abce | pass | no |
|
||||
| db | pass | yes |
|
||||
| fg | aug | no |
|
||||
| bfc | aug | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,e | pass,pass | true:90,false:60 true:90 true:165 false:270,true:90 false:195 false:270;true:270 |
|
||||
|
||||
@negative
|
||||
Scenario: Tripple Merge should not be possible
|
||||
Given the node map
|
||||
"""
|
||||
. f - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g
|
||||
.
|
||||
a - - - - b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e
|
||||
'
|
||||
' c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | in | no |
|
||||
| gfb | merge | yes |
|
||||
| be | merge | yes |
|
||||
| dcb | merge | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,e | in,merge,merge | true:90;false:60 true:90 false:120 false:270;true:270 |
|
||||
|
||||
Scenario: Tripple Merge should not be possible
|
||||
Given the node map
|
||||
"""
|
||||
. f - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g
|
||||
.
|
||||
a - - - - b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e
|
||||
'
|
||||
' c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | in | no |
|
||||
| gfb | merge | yes |
|
||||
| eb | merge | yes |
|
||||
| bcd | merge | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,d | in,merge,merge | true:90;false:60 false:90 true:120 false:270;true:270 |
|
||||
|
||||
@negative
|
||||
Scenario: Don't accept turn-restrictions
|
||||
Given the node map
|
||||
"""
|
||||
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - d
|
||||
/ \
|
||||
a - - - b g - - h
|
||||
\ /
|
||||
e - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | yes |
|
||||
| befgh | road | yes |
|
||||
| bcdg | road | yes |
|
||||
|
||||
# This is an artificial scenario - not reasonable. It is only to test the merging on turn-restrictions
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | ab | bcdg | b | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,h | road,road | true:90,false:60 true:120 false:270,true:90 false:240 false:300;true:270 |
|
||||
|
||||
@negative
|
||||
Scenario: Actual Turn into segregated ways
|
||||
Given the node map
|
||||
"""
|
||||
a - - - b - < - < - < - < - < - < - < - < - < - < - < c -
|
||||
| \
|
||||
| |
|
||||
| |
|
||||
d |
|
||||
\ |
|
||||
\ |
|
||||
e > - > - > - > - > - > - > - > - > - > - > f - - - - - - g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | no |
|
||||
| fcb | road | yes |
|
||||
| bdef | road | yes |
|
||||
| fg | road | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,g | road,road | true:90,false:90 true:150 false:270,true:90 false:270 true:345;true:270 |
|
||||
|
||||
Scenario: Merging parallel roads with intermediate bridges
|
||||
# https://www.mapillary.com/app/?lat=52.466483333333336&lng=13.431908333333332&z=17&focus=photo&pKey=LWXnKqoGqUNLnG0lofiO0Q
|
||||
# http://www.openstreetmap.org/#map=19/52.46750/13.43171
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
|
|
||||
.e.
|
||||
/ \
|
||||
/ \
|
||||
g d
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
h c
|
||||
\ /
|
||||
\ /
|
||||
\ /
|
||||
b
|
||||
|
|
||||
a
|
||||
|
|
||||
|
|
||||
r - x - s
|
||||
|
|
||||
|
|
||||
y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | lanes |
|
||||
| ab | Hermannstr | secondary | | 2 |
|
||||
| bc | Hermannstr | secondary | yes | 2 |
|
||||
| cd | Hermannbruecke | secondary | yes | 2 |
|
||||
| de | Hermannstr | secondary | yes | 2 |
|
||||
| ef | Hermannstr | secondary | | 4 |
|
||||
| eg | Hermannstr | secondary | yes | 2 |
|
||||
| gh | Hermannbruecke | secondary | yes | 2 |
|
||||
| hb | Hermannstr | secondary | yes | 2 |
|
||||
| xa | Hermannstr | secondary | | 4 |
|
||||
| yx | Hermannstr | secondary | | 4 |
|
||||
| rxs | Silbersteinstr | tertiary | | 1 |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| x | traffic_signals |
|
||||
|
||||
#the intermediate intersections of degree two indicate short segments of new names. At some point, we probably want to get rid of these
|
||||
When I route I should get
|
||||
| waypoints | turns | route | intersections |
|
||||
| a,f | depart,arrive | Hermannstr,Hermannstr | true:0,true:0 false:180,true:0 false:180;true:180 |
|
||||
| f,a | depart,arrive | Hermannstr,Hermannstr | true:180,false:0 true:180,false:0 true:180;true:0 |
|
||||
| y,f | depart,arrive | Hermannstr,Hermannstr | true:0,true:0 true:90 false:180 true:270,true:0 false:180,true:0 false:180;true:180 |
|
||||
| f,y | depart,arrive | Hermannstr,Hermannstr | true:180,false:0 true:180,false:0 true:180,false:0 true:90 true:180 true:270;true:0 |
|
||||
|
||||
Scenario: Four Way Intersection Double Through Street Segregated
|
||||
Given the node map
|
||||
"""
|
||||
q p
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
b c
|
||||
\ /
|
||||
\ /
|
||||
\ /
|
||||
j - - - - - - - - - - - - - - - - - i . \ / , d - - - - - - - - - - - - - - - - - o
|
||||
. \/ .
|
||||
> a <
|
||||
. /\ '
|
||||
. / \ '
|
||||
k - - - - - - - - - - - - - - - - - h / \ e - - - - - - - - - - - - - - - - - n
|
||||
/ \
|
||||
/ \
|
||||
g f
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
l m
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway | name | lanes |
|
||||
| khaij | primary | yes | first | 4 |
|
||||
| odaen | primary | yes | first | 4 |
|
||||
| qbacp | primary | yes | second | 4 |
|
||||
| mfagl | primary | yes | second | 4 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| f,e | second,first,first | depart,turn right,arrive |
|
||||
| f,c | second,second | depart,arrive |
|
||||
| f,i | second,first,first | depart,turn left,arrive |
|
||||
| f,g | second,second,second | depart,continue uturn,arrive |
|
||||
| d,c | first,second,second | depart,turn right,arrive |
|
||||
| d,i | first,first | depart,arrive |
|
||||
| d,g | first,second,second | depart,turn left,arrive |
|
||||
| d,e | first,first,first | depart,continue uturn,arrive |
|
||||
| b,i | second,first,first | depart,turn right,arrive |
|
||||
| b,g | second,second | depart,arrive |
|
||||
| b,e | second,first,first | depart,turn left,arrive |
|
||||
| b,c | second,second,second | depart,continue uturn,arrive |
|
||||
| h,g | first,second,second | depart,turn right,arrive |
|
||||
| h,e | first,first | depart,arrive |
|
||||
| h,c | first,second,second | depart,turn left,arrive |
|
||||
| h,i | first,first,first | depart,continue uturn,arrive |
|
||||
|
||||
Scenario: Middle Island Over Bridge
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
|
||||
.b.
|
||||
c h
|
||||
| |
|
||||
| |
|
||||
1 2
|
||||
| |
|
||||
d g
|
||||
'e'
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | no |
|
||||
| ef | road | no |
|
||||
| bc | road | yes |
|
||||
| cd | bridge | yes |
|
||||
| de | road | yes |
|
||||
| eg | road | yes |
|
||||
| gh | bridge | yes |
|
||||
| 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 |
|
||||
|
||||
@negative
|
||||
Scenario: Traffic Circle
|
||||
Given the node map
|
||||
"""
|
||||
a - - - - b - - - e - - - c - - - - d
|
||||
\ /
|
||||
\ /
|
||||
f
|
||||
|
|
||||
|
|
||||
|
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | left | no |
|
||||
| bfceb | circle | yes |
|
||||
| fg | bottom | no |
|
||||
| cd | right | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,d | left,circle,circle,right,right | true:90;false:90 true:120 false:270;true:60 true:180 false:300;true:90 false:240 true:270;true:270 |
|
||||
| g,d | bottom,circle,right,right | true:0;true:60 false:180 false:300;true:90 false:240 true:270;true:270 |
|
||||
|
||||
Scenario: Middle Island
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
|
||||
b
|
||||
c h
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
d g
|
||||
e
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | no |
|
||||
| ef | road | no |
|
||||
| bcde | road | yes |
|
||||
| eghb | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,f | depart,arrive | road,road |
|
||||
| c,f | depart,arrive | road,road |
|
||||
| f,a | depart,arrive | road,road |
|
||||
| g,a | depart,arrive | road,road |
|
||||
|
||||
Scenario: Traffic Island
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
a - - b < > d - - e
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | no |
|
||||
| de | road | no |
|
||||
| bcdfb | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,e | road,road | true:90;true:270 |
|
||||
|
||||
@negative
|
||||
Scenario: Turning Road, Don't remove sliproads
|
||||
Given the node map
|
||||
"""
|
||||
h - - - - - g - - - - - - f - - - - - e
|
||||
_ '
|
||||
.
|
||||
a - - - - - b - - - - - - c - - - - - d
|
||||
|
|
||||
|
|
||||
|
|
||||
i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | yes |
|
||||
| bcd | road | yes |
|
||||
| efgh | road | yes |
|
||||
| fb | road | yes |
|
||||
| bi | turn | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | fb | bcd | b | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,d | road,road | depart,arrive | true:90,false:60 true:90 true:180 false:270;true:270 |
|
||||
| e,h | road,road | depart,arrive | true:270,false:90 true:240 true:270;true:90 |
|
||||
| e,i | road,turn,turn | depart,turn left,arrive | true:270;false:90 true:240 true:270,false:60 false:90 true:180 false:270;true:0 |
|
||||
@negative
|
||||
Scenario: Meeting Turn Roads
|
||||
Given the node map
|
||||
"""
|
||||
k l
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
h - - - - - g - - - - - - - f - - - - - e
|
||||
| ' ' |
|
||||
| x |
|
||||
| . . |
|
||||
a - - - - - b - - - - - - - c - - - - - d
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
i j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | horiz | yes |
|
||||
| bc | horiz | yes |
|
||||
| cd | horiz | yes |
|
||||
| ef | horiz | yes |
|
||||
| fg | horiz | yes |
|
||||
| gh | horiz | yes |
|
||||
| kg | vert | yes |
|
||||
| gb | vert | yes |
|
||||
| bi | vert | yes |
|
||||
| jc | vert | yes |
|
||||
| cf | vert | yes |
|
||||
| fl | vert | yes |
|
||||
| gx | horiz | no |
|
||||
| xc | horiz | no |
|
||||
| fx | 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 |
|
||||
|
||||
# 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 |
|
||||
@@ -13,23 +13,28 @@ Feature: Simple Turns
|
||||
^
|
||||
/ \
|
||||
c d
|
||||
|\
|
||||
| e
|
||||
|
|
||||
f
|
||||
| |\
|
||||
| | e
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
g f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| ab | road | primary | no |
|
||||
| bc | road | primary | yes |
|
||||
| bcg | road | primary | yes |
|
||||
| fdb | road | primary | yes |
|
||||
| de | turn | primary | no |
|
||||
| ed | turn | primary | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| f,a | depart,arrive | road,road |
|
||||
| e,a | depart,turn slight right,arrive | turn,road,road |
|
||||
| waypoints | turns | route | intersections |
|
||||
| f,a | depart,arrive | road,road | true:0,true:0 false:150 false:180;true:180 |
|
||||
| e,a | depart,turn slight right,arrive | turn,road,road | true:333;true:0 false:150 false:180;true:180 |
|
||||
|
||||
Scenario: Turning into splitting road
|
||||
Given the node map
|
||||
@@ -39,16 +44,22 @@ Feature: Simple Turns
|
||||
/\
|
||||
/ \
|
||||
c d
|
||||
|\
|
||||
| e
|
||||
|
|
||||
f
|
||||
| |\
|
||||
| | e
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
h f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| ab | road | primary | no |
|
||||
| bc | road | primary | yes |
|
||||
| bch | road | primary | yes |
|
||||
| fdb | road | primary | yes |
|
||||
| de | turn | primary | no |
|
||||
| bg | left | primary | yes |
|
||||
@@ -61,108 +72,6 @@ Feature: Simple Turns
|
||||
| f,g | depart,turn left,arrive | road,left,left |
|
||||
| f,c | depart,continue uturn,arrive | road,road,road |
|
||||
|
||||
Scenario: Middle Island
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
||||
b
|
||||
c h
|
||||
|
||||
|
||||
|
||||
|
||||
d g
|
||||
e
|
||||
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | no |
|
||||
| ef | road | no |
|
||||
| bcde | road | yes |
|
||||
| eghb | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,f | depart,arrive | road,road |
|
||||
| c,f | depart,arrive | road,road |
|
||||
| f,a | depart,arrive | road,road |
|
||||
| g,a | depart,arrive | road,road |
|
||||
|
||||
Scenario: Middle Island Over Bridge
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
|
||||
.b.
|
||||
c h
|
||||
| |
|
||||
| |
|
||||
1 2
|
||||
| |
|
||||
d g
|
||||
'e'
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | no |
|
||||
| ef | road | no |
|
||||
| bc | road | yes |
|
||||
| cd | bridge | yes |
|
||||
| de | road | yes |
|
||||
| eg | road | yes |
|
||||
| gh | bridge | yes |
|
||||
| hb | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,f | depart,arrive | road,road |
|
||||
| c,f | depart,new name straight,arrive | bridge,road,road |
|
||||
| 1,f | depart,new name straight,arrive | bridge,road,road |
|
||||
| f,a | depart,arrive | road,road |
|
||||
| g,a | depart,new name straight,arrive | bridge,road,road |
|
||||
| 2,a | depart,new name straight,arrive | bridge,road,road |
|
||||
|
||||
@negative
|
||||
Scenario: Don't Collapse Places:
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
g
|
||||
|
||||
|
||||
|
||||
|
||||
a b e f
|
||||
|
||||
|
||||
|
||||
|
||||
c
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | place | no |
|
||||
| cd | bottom | no |
|
||||
| ef | place | no |
|
||||
| gh | top | no |
|
||||
| bcegb | place | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,d | depart,turn right,arrive | place,bottom,bottom |
|
||||
| a,f | depart,continue left,continue right,arrive | place,place,place,place |
|
||||
| d,f | depart,turn right,continue right,arrive | bottom,place,place,place |
|
||||
| d,h | depart,turn right,continue left,turn right,arrive | bottom,place,place,top,top |
|
||||
|
||||
@bug @not-sorted @3179
|
||||
Scenario: Adjusting road angles to not be sorted
|
||||
Given the node map
|
||||
|
||||
@@ -768,7 +768,31 @@ Feature: Simple Turns
|
||||
|
||||
. .
|
||||
|
||||
g h
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
. .
|
||||
|
||||
g h
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
@@ -784,15 +808,15 @@ Feature: Simple Turns
|
||||
| cjk | Friede | no | | tertiary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | Perle,Heide,Heide | depart,turn right,arrive |
|
||||
| a,k | Perle,Friede,Friede | depart,turn left,arrive |
|
||||
| a,e | Perle,Perle | depart,arrive |
|
||||
| e,k | Perle,Friede,Friede | depart,turn right,arrive |
|
||||
| e,g | Perle,Heide,Heide | depart,turn left,arrive |
|
||||
| h,k | Heide,Friede,Friede | depart,new name slight left,arrive |
|
||||
| h,e | Heide,Perle,Perle | depart,turn right,arrive |
|
||||
| h,a | Heide,Perle,Perle | depart,turn left,arrive |
|
||||
| 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 |
|
||||
|
||||
#http://www.openstreetmap.org/#map=19/52.53293/13.32956
|
||||
Scenario: Curved Exit from Curved Road
|
||||
@@ -930,6 +954,36 @@ Feature: Simple Turns
|
||||
. . .
|
||||
. . .
|
||||
i . .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
e a
|
||||
"""
|
||||
|
||||
|
||||
@@ -599,22 +599,21 @@ Feature: Turn Lane Guidance
|
||||
Scenario: Segregated Intersection Merges With Lanes
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
|
||||
e d
|
||||
c g
|
||||
a b
|
||||
|
||||
h
|
||||
a e
|
||||
| |
|
||||
| |
|
||||
b d
|
||||
h c
|
||||
' -- g - - f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway | highway |
|
||||
| abc | road | left\|left\|left\|through\|through | yes | primary |
|
||||
| cde | road | | yes | primary |
|
||||
| hc | cross | | yes | secondary |
|
||||
| cg | straight | | no | tertiary |
|
||||
| cf | left | | yes | primary |
|
||||
| nodes | name | turn:lanes:forward | oneway | highway | lanes |
|
||||
| abc | road | left\|left\|left\|through\|through | yes | primary | 5 |
|
||||
| cde | road | | yes | primary | 3 |
|
||||
| hc | cross | | yes | secondary | |
|
||||
| cg | straight | | no | tertiary | |
|
||||
| cf | left | | yes | primary | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
|
||||
@@ -278,52 +278,6 @@ Feature: Simple Turns
|
||||
| x | z | xy,yz,yz | depart,turn right,arrive |
|
||||
| z | x | yz,xy,xy | depart,turn left,arrive |
|
||||
|
||||
Scenario: Four Way Intersection Double Through Street Segregated
|
||||
Given the node map
|
||||
"""
|
||||
q p
|
||||
|
||||
|
||||
|
||||
|
||||
b c
|
||||
j i d o
|
||||
a
|
||||
k h e n
|
||||
g f
|
||||
|
||||
|
||||
|
||||
|
||||
l m
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway | name |
|
||||
| khaij | primary | yes | first |
|
||||
| odaen | primary | yes | first |
|
||||
| qbacp | primary | yes | second |
|
||||
| mfagl | primary | yes | second |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| f,e | second,first,first | depart,turn right,arrive |
|
||||
| f,c | second,second | depart,arrive |
|
||||
| f,i | second,first,first | depart,turn left,arrive |
|
||||
| f,g | second,second,second | depart,continue uturn,arrive |
|
||||
| d,c | first,second,second | depart,turn right,arrive |
|
||||
| d,i | first,first | depart,arrive |
|
||||
| d,g | first,second,second | depart,turn left,arrive |
|
||||
| d,e | first,first,first | depart,continue uturn,arrive |
|
||||
| b,i | second,first,first | depart,turn right,arrive |
|
||||
| b,g | second,second | depart,arrive |
|
||||
| b,e | second,first,first | depart,turn left,arrive |
|
||||
| b,c | second,second,second | depart,continue uturn,arrive |
|
||||
| h,g | first,second,second | depart,turn right,arrive |
|
||||
| h,e | first,first | depart,arrive |
|
||||
| h,c | first,second,second | depart,turn left,arrive |
|
||||
| h,i | first,first,first | depart,continue uturn,arrive |
|
||||
|
||||
Scenario: Three Way Similar Sharp Turns
|
||||
Given the node map
|
||||
"""
|
||||
@@ -1080,100 +1034,6 @@ Feature: Simple Turns
|
||||
| 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 |
|
||||
|
||||
# https://www.mapillary.com/app/?lat=52.466483333333336&lng=13.431908333333332&z=17&focus=photo&pKey=LWXnKqoGqUNLnG0lofiO0Q
|
||||
# http://www.openstreetmap.org/#map=19/52.46750/13.43171
|
||||
Scenario: Collapse Turn Instruction, Issue #2725
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
e
|
||||
|
||||
|
||||
g d
|
||||
|
||||
|
||||
h c
|
||||
|
||||
|
||||
b
|
||||
a
|
||||
|
||||
|
||||
r x s
|
||||
y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| ab | Hermannstr | secondary | |
|
||||
| bc | Hermannstr | secondary | yes |
|
||||
| cd | Hermannbruecke | secondary | yes |
|
||||
| de | Hermannstr | secondary | yes |
|
||||
| ef | Hermannstr | secondary | |
|
||||
| eg | Hermannstr | secondary | yes |
|
||||
| gh | Hermannbruecke | secondary | yes |
|
||||
| hb | Hermannstr | secondary | yes |
|
||||
| xa | Hermannstr | secondary | |
|
||||
| yx | Hermannstr | secondary | |
|
||||
| rxs | Silbersteinstr | tertiary | |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| x | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,f | depart,arrive | Hermannstr,Hermannstr |
|
||||
| f,a | depart,arrive | Hermannstr,Hermannstr |
|
||||
| y,f | depart,arrive | Hermannstr,Hermannstr |
|
||||
| f,y | depart,arrive | Hermannstr,Hermannstr |
|
||||
|
||||
Scenario: Collapse Turn Instruction, Issue #2725 - not trivially mergable at e
|
||||
# https://www.mapillary.com/app/?lat=52.466483333333336&lng=13.431908333333332&z=17&focus=photo&pKey=LWXnKqoGqUNLnG0lofiO0Q
|
||||
# http://www.openstreetmap.org/#map=19/52.46750/13.43171
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
e
|
||||
g d
|
||||
|
||||
|
||||
h c
|
||||
|
||||
|
||||
b
|
||||
a
|
||||
|
||||
|
||||
r x s
|
||||
y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| ab | Hermannstr | secondary | |
|
||||
| bc | Hermannstr | secondary | yes |
|
||||
| cd | Hermannbruecke | secondary | yes |
|
||||
| de | Hermannstr | secondary | yes |
|
||||
| ef | Hermannstr | secondary | |
|
||||
| eg | Hermannstr | secondary | yes |
|
||||
| gh | Hermannbruecke | secondary | yes |
|
||||
| hb | Hermannstr | secondary | yes |
|
||||
| xa | Hermannstr | secondary | |
|
||||
| yx | Hermannstr | secondary | |
|
||||
| rxs | Silbersteinstr | tertiary | |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| x | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,f | depart,arrive | Hermannstr,Hermannstr |
|
||||
| f,a | depart,arrive | Hermannstr,Hermannstr |
|
||||
| y,f | depart,arrive | Hermannstr,Hermannstr |
|
||||
| f,y | depart,arrive | Hermannstr,Hermannstr |
|
||||
|
||||
# http://www.openstreetmap.org/#map=18/39.28158/-76.62291
|
||||
@3002
|
||||
Scenario: Obvious Index wigh very narrow turn to the right
|
||||
|
||||
Reference in New Issue
Block a user