@@ -317,30 +317,30 @@ Feature: Simple Turns
317317 Scenario : Curved Turn At Cross
318318 Given the node map
319319 """
320- h
321- |
322- |
323- |
324- |
325- | . b - - - - - - - - - - - - - - - - - - a
326- | .
327- | .
328- | c
329- |
330- |
331- |
332- d
333- |
334- |
335- |
336- e |
337- . |
338- . |
339- g - - - - - - - - - - - - - f |
340- |
341- |
342- |
343- i
320+ h
321+ |
322+ |
323+ |
324+ |
325+ | . b - - - - - - - - - - - - - - - - - - - - - - - a
326+ | .
327+ | .
328+ | c
329+ |
330+ |
331+ |
332+ d
333+ |
334+ |
335+ |
336+ e |
337+ . |
338+ . |
339+ g - - - - - - - - - - - - - - - - - - f |
340+ |
341+ |
342+ |
343+ i
344344 """
345345
346346 And the ways
@@ -443,9 +443,9 @@ Feature: Simple Turns
443443 | ef | residential | road | 2 | yes |
444444
445445 When I route I should get
446- | waypoints | route | turns | locations |
447- | g ,f | turn ,road , road | depart ,turn left , arrive | g ,e , f |
448- | c ,f | road ,road ,road | depart ,continue right ,arrive | c ,b ,f |
446+ | waypoints | route | turns | locations | # |
447+ | 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 |
448+ | c ,f | road ,road ,road | depart ,continue right ,arrive | c ,b ,f | |
449449
450450 #http://www.openstreetmap.org/search?query=52.479264%2013.295617#map=19/52.47926/13.29562
451451 Scenario : Splitting Roads with curved split
@@ -627,12 +627,14 @@ Feature: Simple Turns
627627 | 1 ,h | ,allee ,allee | depart ,turn left ,arrive |
628628 | 2 ,h | ,allee ,allee | depart ,turn left ,arrive |
629629
630+
630631 #http://www.openstreetmap.org/#map=18/52.56251/13.32650
632+ @todo
631633 Scenario : Curved Turn on Separated Directions
632634 Given the node map
633635 """
634636 e d
635- f - - - - - - - - - - - - - - - c - - - - - - - - - - - j
637+ f c - - - - - - - - - - - j
636638 | l ' |
637639 | ' |
638640 | ' |
@@ -680,6 +682,58 @@ Feature: Simple Turns
680682 | j ,o | Kapweg ,Kapweg ,Kapweg | depart ,continue uturn ,arrive |
681683 | a ,i | Kurt ,Kurt ,Kurt | depart ,continue uturn ,arrive |
682684
685+ #http://www.openstreetmap.org/#map=18/52.56251/13.32650
686+ Scenario : Curved Turn on Separated Directions
687+ Given the node map
688+ """
689+ e d
690+ f c - - - - - - - - - - - j
691+ | l ' |
692+ | ' |
693+ | ' |
694+ | ' |
695+ | ' |
696+ | n |
697+ | |
698+ | ' |
699+ | |
700+ | ' |
701+ | |
702+ | |
703+ | |
704+ |' |
705+ | |
706+ | |
707+ | |
708+ | |
709+ g |
710+ h - - - - - - - - - - - - - - - b - - - - - - - - - - - o
711+ | |
712+ | |
713+ | |
714+ | |
715+ | |
716+ | |
717+ i a
718+ """
719+
720+ And the ways
721+ | nodes | name | oneway | lanes | highway |
722+ | jc | Kapweg | yes | 3 | primary |
723+ | clngh | Kapweg | yes | | primary_link |
724+ | hbo | Kapweg | yes | 2 | primary |
725+ | efh | Kurt | yes | 4 | secondary |
726+ | hi | Kurt | yes | 3 | primary |
727+ | ab | Kurt | yes | 4 | primary |
728+ | cd | Kurt | yes | 3 | secondary |
729+ | bc | Kurt | yes | 2 | primary |
730+
731+ When I route I should get
732+ | waypoints | route | turns |
733+ | j ,i | Kapweg ,Kurt ,Kurt | depart ,turn left ,arrive |
734+ | j ,o | Kapweg ,Kapweg ,Kapweg | depart ,continue uturn ,arrive |
735+ | a ,i | Kurt ,Kurt ,Kurt | depart ,continue uturn ,arrive |
736+
683737 #http://www.openstreetmap.org/#map=19/52.53731/13.36033
684738 Scenario : Splitting Road to Left
685739 Given the node map
@@ -1112,8 +1166,9 @@ Feature: Simple Turns
11121166 """
11131167
11141168 And the ways
1115- | nodes | name | highway | lanes |
1116- | abcdefghijklmnopc | circled | residential | 1 |
1169+ | nodes | name | highway | lanes | oneway |
1170+ | abc | circled | residential | 1 | no |
1171+ | cdefghijklmnopc | circled | residential | 1 | yes |
11171172
11181173 When I route I should get
11191174 | waypoints | bearings | route | turns |
@@ -1168,3 +1223,40 @@ Feature: Simple Turns
11681223 When I route I should get
11691224 | waypoints | route |
11701225 | a ,e | ab ,bcde ,bcde |
1226+
1227+
1228+ @3401
1229+ Scenario : Curve With Duplicated Coordinates
1230+ Given the node locations
1231+ | node | lat | lon | # |
1232+ | a | 0 .9999280745650984 | 1 .0 | |
1233+ | b | 0 .9999280745650984 | 1 .0000179813587253 | |
1234+ | c | 0 .9999280745650984 | 1 .0000359627174509 | |
1235+ | d | 0 .9999460559238238 | 1 .0000674300952204 | |
1236+ | e | 0 .9999640372825492 | 1 .0000809161142643 | |
1237+ | f | 0 .9999820186412746 | 1 .0000854114539457 | |
1238+ | g | 1 .0 | 1 .0000854114539457 | |
1239+ | h | 1 .0 | 1 .0000854114539457 | #same as g |
1240+ | z | 0 .9999100932063729 | 1 .0000179813587253 | |
1241+ # g
1242+ # |
1243+ # f
1244+ # '
1245+ # e
1246+ # '
1247+ # d
1248+ # '
1249+ #a - b - c
1250+ # |
1251+ # z
1252+
1253+ And the ways
1254+ | nodes | oneway | lanes | # |
1255+ | ab | yes | 1 | |
1256+ | zb | yes | 1 | |
1257+ | bcdefgh | yes | 1 | #intentional duplication |
1258+
1259+ # we don't care for turn instructions, this is a coordinate extraction bug check
1260+ When I route I should get
1261+ | waypoints | route | intersections |
1262+ | a ,g | ab ,bcdefgh ,bcdefgh | true :90 ;true :45 false :180 false :270 ;true :180 |
0 commit comments