Rember Intersection Shapes
Changes the processing order in the edge based graph factory. Instead of iterating over all outgoing edges in order, we compute the edge expanded graph in the order of intersections. This allows to remember intersection shapes and re-use them for all possible ingoing edges. Also: use low accuracry mode for intersections degree 2 intersections We can use lower accuracy here, since the `bearing` after the turn is not as relevant for off-route detection. Getting lost is near impossible here.
This commit is contained in:
@@ -72,16 +72,16 @@ Feature: Turn Lane Guidance
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c g
|
||||
d
|
||||
f
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
i h j
|
||||
a - - b.-.- - c-g
|
||||
| ' 'd
|
||||
| f
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
i - - h - - - j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
|
||||
@@ -10,12 +10,12 @@ Feature: Simple Turns
|
||||
"""
|
||||
a
|
||||
b
|
||||
|
||||
|
||||
^
|
||||
/ \
|
||||
c d
|
||||
|
||||
e
|
||||
|
||||
|\
|
||||
| e
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
@@ -96,16 +96,16 @@ Feature: Simple Turns
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
||||
b
|
||||
|
|
||||
.b.
|
||||
c h
|
||||
|
||||
|
||||
| |
|
||||
| |
|
||||
1 2
|
||||
|
||||
| |
|
||||
d g
|
||||
e
|
||||
|
||||
'e'
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
|
||||
@@ -443,9 +443,9 @@ Feature: Simple Turns
|
||||
| ef | residential | road | 2 | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| g,f | turn,road | depart,arrive |
|
||||
| c,f | road,road,road | depart,continue right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| g,f | turn,road,road | depart,turn left,arrive | g,e,f |
|
||||
| c,f | road,road,road | depart,continue right,arrive | c,b,f |
|
||||
|
||||
#http://www.openstreetmap.org/search?query=52.479264%2013.295617#map=19/52.47926/13.29562
|
||||
Scenario: Splitting Roads with curved split
|
||||
|
||||
@@ -116,24 +116,25 @@ Feature: Turn Lane Guidance
|
||||
Scenario: Basic Turn Lane 4-Way With U-Turn Lane
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a 1 b c
|
||||
d
|
||||
e
|
||||
f a-1-b---c
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes | turn:lanes:forward | name |
|
||||
| ab | | reverse;left\|through;right | in |
|
||||
| bc | | | straight |
|
||||
| bd | | | right |
|
||||
| be | | | left |
|
||||
| nodes | turn:lanes | turn:lanes:forward | name | # |
|
||||
| ab | | reverse;left\|through;right | in | |
|
||||
| bc | | | straight | |
|
||||
| bd | | | right | |
|
||||
| be | | | left | |
|
||||
| fa | | | uturn-avoider | #due to https://github.com/Project-OSRM/osrm-backend/issues/3359 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | bearings | route | turns | lanes |
|
||||
| a | c | 180,180 180,180 | in,straight,straight | depart,new name straight,arrive | ,left;uturn:false straight;right:true, |
|
||||
| a | d | 180,180 180,180 | in,right,right | depart,turn right,arrive | ,left;uturn:false straight;right:true, |
|
||||
| a | e | 180,180 180,180 | in,left,left | depart,turn left,arrive | ,left;uturn:true straight;right:false, |
|
||||
| 1 | a | 90,2 270,2 | in,in,in | depart,turn uturn,arrive | ,left;uturn:true straight;right:false, |
|
||||
| from | to | bearings | route | turns | lanes | locations |
|
||||
| a | c | 180,180 180,180 | in,straight,straight | depart,new name straight,arrive | ,left;uturn:false straight;right:true, | a,b,c |
|
||||
| a | d | 180,180 180,180 | in,right,right | depart,turn right,arrive | ,left;uturn:false straight;right:true, | a,b,d |
|
||||
| a | e | 180,180 180,180 | in,left,left | depart,turn left,arrive | ,left;uturn:true straight;right:false, | a,b,e |
|
||||
| 1 | a | 90,2 270,2 | in,in,in | depart,turn uturn,arrive | ,left;uturn:true straight;right:false, | _,b,a |
|
||||
|
||||
|
||||
#this next test requires decision on how to announce lanes for going straight if there is no turn
|
||||
|
||||
@@ -1179,8 +1179,8 @@ Feature: Simple Turns
|
||||
Scenario: Obvious Index wigh very narrow turn to the right
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
a - b -.-.- - - c
|
||||
' ' 'd
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -1198,8 +1198,8 @@ Feature: Simple Turns
|
||||
Scenario: Obvious Index wigh very narrow turn to the right
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
e d f
|
||||
a - b - . -.- - c
|
||||
e - -'-'d-f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -1218,8 +1218,8 @@ Feature: Simple Turns
|
||||
Scenario: Obvious Index wigh very narrow turn to the left
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
. . .d
|
||||
a - b -'-'- - - c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -1237,8 +1237,8 @@ Feature: Simple Turns
|
||||
Scenario: Obvious Index wigh very narrow turn to the left
|
||||
Given the node map
|
||||
"""
|
||||
e d f
|
||||
a b c
|
||||
e - -.- d-f
|
||||
a - b - ' - - - c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
|
||||
Reference in New Issue
Block a user