Considering multiple small turns, right after each

other can result in a combined turn angle that is
straight instead of turning left and right.
This commit is contained in:
Moritz Kobitzsch
2016-08-08 15:46:33 +02:00
parent 01a2c66472
commit 88c3f4c481
6 changed files with 260 additions and 20 deletions
+30
View File
@@ -31,6 +31,36 @@ Feature: Simple Turns
| f,a | depart,arrive | road,road |
| e,a | depart,turn slight right,arrive | turn,road,road |
Scenario: Turning into splitting road
Given the node map
"""
a
g-b
/\
/ \
c d
|\
| e
|
f
"""
And the ways
| nodes | name | highway | oneway |
| ab | road | primary | no |
| bc | road | primary | yes |
| fdb | road | primary | yes |
| de | turn | primary | no |
| bg | left | 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 |
| e,g | depart,turn slight right,turn left,arrive | turn,road,left,left |
| 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
"""
+87
View File
@@ -1288,3 +1288,90 @@ Feature: Simple Turns
| waypoints | route | 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
Given the node map
"""
l m
| |
f._ | |
' g---h.
| | '.
| | i
a_ | |
''.b---c
| |'d._
| | 'e
j k
"""
And the ways
| nodes | name | highway | oneway |
| ab | Stralauer Str | tertiary | yes |
| bcde | Holzmarktstr | secondary | yes |
| gf | Stralauer Str | tertiary | yes |
| ihg | Holzmarktstr | secondary | yes |
| lgbj | Alexanderstr | primary | yes |
| kchm | Alexanderstr | primary | yes |
When I route I should get
| waypoints | turns | route |
| a,e | depart,new name straight,arrive | Stralauer Str,Holzmarktstr,Holzmarktstr |
Scenario: No Slight Right over Jannowitzbruecke -- less extreme
Given the node map
"""
l m
| |
f_ | |
' 'g h_
| | '\_
| | i
a_ | |
'_ b c_
| | \_
| | e
j k
"""
And the ways
| nodes | name | highway | oneway |
| ab | Stralauer Str | tertiary | yes |
| bce | Holzmarktstr | secondary | yes |
| gf | Stralauer Str | tertiary | yes |
| ihg | Holzmarktstr | secondary | yes |
| lgbj | Alexanderstr | primary | yes |
| kchm | Alexanderstr | primary | yes |
When I route I should get
| waypoints | turns | route |
| a,e | depart,new name straight,arrive | Stralauer Str,Holzmarktstr,Holzmarktstr |
Scenario: No Slight Right over Jannowitzbruecke
Given the node map
"""
l m
| |
| |
_ _ g h_
f' | | '_
| | i
| |
_ _b c__
a' | | 'd
| |
j k
"""
And the ways
| nodes | name | highway | oneway |
| ab | Stralauer Str | tertiary | yes |
| bcd | Holzmarktstr | secondary | yes |
| gf | Stralauer Str | tertiary | yes |
| ihg | Holzmarktstr | secondary | yes |
| lgbj | Alexanderstr | primary | yes |
| kchm | Alexanderstr | primary | yes |
When I route I should get
| waypoints | turns | route |
| a,d | depart,new name straight,arrive | Stralauer Str,Holzmarktstr,Holzmarktstr |