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:
committed by
Patrick Niklaus
parent
8d83c3adbb
commit
6c3390f14d
@@ -79,9 +79,9 @@ Feature: Via points
|
||||
| dh |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| a,c,f | ab,bcd,bcd,bcd,de,efg,efg |
|
||||
| a,c,f,h | ab,bcd,bcd,bcd,de,efg,efg,efg,gh,gh |
|
||||
| waypoints | route |
|
||||
| a,c,f | ab,bcd,bcd,de,efg |
|
||||
| a,c,f,h | ab,bcd,bcd,de,efg,efg,gh,gh |
|
||||
|
||||
|
||||
Scenario: Duplicate via point
|
||||
@@ -124,12 +124,12 @@ Feature: Via points
|
||||
| fa | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance |
|
||||
| 1,3 | ab,bc,cd,cd | 400m +-1 |
|
||||
| 3,1 | cd,de,ef,fa,ab,ab | 1000m +-1 |
|
||||
| 1,2,3 | ab,bc,bc,bc,cd,cd | 400m +-1 |
|
||||
| 1,3,2 | ab,bc,cd,cd,cd,de,ef,fa,ab,bc,bc | 1600m +-1 |
|
||||
| 3,2,1 | cd,de,ef,fa,ab,bc,bc,bc,cd,de,ef,fa,ab,ab | 2400m +-1 |
|
||||
| waypoints | route | distance |
|
||||
| 1,3 | ab,bc,cd | 400m +-1 |
|
||||
| 3,1 | cd,de,ef,fa,ab,ab | 1000m +-1 |
|
||||
| 1,2,3 | ab,bc,bc,cd | 400m +-1 |
|
||||
| 1,3,2 | ab,bc,cd,cd,de,ef,fa,ab,bc | 1600m +-1 |
|
||||
| 3,2,1 | cd,de,ef,fa,ab,bc,bc,cd,de,ef,fa,ab,ab | 2400m +-1 |
|
||||
|
||||
Scenario: Via points on ring on the same oneway
|
||||
# xa it to avoid only having a single ring, which cna trigger edge cases
|
||||
@@ -269,11 +269,11 @@ Feature: Via points
|
||||
| da | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance |
|
||||
| 2,1 | ab,bc,cd,da,ab,ab | 1100m +-1 |
|
||||
| 4,3 | bc,cd,da,ab,bc,bc | 1100m +-1 |
|
||||
| 6,5 | cd,da,ab,bc,cd,cd | 1100m +-1 |
|
||||
| 8,7 | da,ab,bc,cd,da,da | 1100m +-1 |
|
||||
| waypoints | route | distance |
|
||||
| 2,1 | ab,bc,cd,da,ab | 1100m +-1 |
|
||||
| 4,3 | bc,cd,da,ab,bc | 1100m +-1 |
|
||||
| 6,5 | cd,da,ab,bc,cd | 1100m +-1 |
|
||||
| 8,7 | da,ab,bc,cd,da | 1100m +-1 |
|
||||
|
||||
Scenario: Multiple Via points on ring on the same oneway, forces one of the vertices to be top node
|
||||
Given the node map
|
||||
@@ -293,10 +293,10 @@ Feature: Via points
|
||||
| da | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance |
|
||||
| 3,2,1 | ab,bc,cd,da,ab,ab,ab,bc,cd,da,ab,ab | 3000m +-1 |
|
||||
| 6,5,4 | bc,cd,da,ab,bc,bc,bc,cd,da,ab,bc,bc | 3000m +-1 |
|
||||
| 9,8,7 | cd,da,ab,bc,cd,cd,cd,da,ab,bc,cd,cd | 3000m +-1 |
|
||||
| waypoints | route | distance |
|
||||
| 3,2,1 | ab,bc,cd,da,ab,ab,ab,bc,cd,da,ab | 3000m +-1 |
|
||||
| 6,5,4 | bc,cd,da,ab,bc,bc,bc,cd,da,ab,bc | 3000m +-1 |
|
||||
| 9,8,7 | cd,da,ab,bc,cd,cd,cd,da,ab,bc,cd | 3000m +-1 |
|
||||
|
||||
# See issue #2706
|
||||
# this case is currently broken. It simply works as put here due to staggered intersections triggering a name collapse.
|
||||
|
||||
Reference in New Issue
Block a user