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:
Moritz Kobitzsch
2016-12-06 13:22:51 +01:00
parent f7ad2e1e26
commit e6ff17ab2a
40 changed files with 2397 additions and 949 deletions
+25 -116
View File
@@ -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