Change order of guidance post-processing, fix #4030

This commit is contained in:
Michael Krasnyk 2017-05-22 18:46:02 +02:00
parent a63b43c259
commit 47f2f17987
2 changed files with 26 additions and 2 deletions

View File

@ -793,3 +793,27 @@ Feature: Basic Roundabout
| f | e | af,ed,ed | depart,roundabout-exit-1,arrive | 120.1m |
| k | l | kg,hl,hl | depart,roundabout-exit-1,arrive | 80.1m |
| l | k | hl,kg,kg | depart,roundabout-exit-1,arrive | 120.1m |
Scenario: Service roundabout with service exits
Given the node map
"""
e
f a d
g b1c
h
"""
And the ways
| nodes | highway | junction |
| abcda | service | roundabout |
| de | service | |
| af | service | |
| bg | tertiary | |
| bh | service | |
When I route I should get
| from | to | route | turns |
| 1 | e | abcda,de,de | depart,roundabout-exit-1,arrive |
| 1 | f | abcda,af,af | depart,roundabout-exit-1,arrive |
| 1 | g | abcda,bg,bg | depart,roundabout-exit-1,arrive |
| 1 | h | abcda,bh,bh | depart,roundabout-exit-1,arrive |

View File

@ -168,8 +168,8 @@ class RouteAPI : public BaseAPI
*/
guidance::trimShortSegments(steps, leg_geometry);
leg.steps = guidance::collapseTurnInstructions(std::move(steps));
leg.steps = guidance::postProcess(std::move(leg.steps));
leg.steps = guidance::postProcess(std::move(steps));
leg.steps = guidance::collapseTurnInstructions(std::move(leg.steps));
leg.steps = guidance::buildIntersections(std::move(leg.steps));
leg.steps = guidance::suppressShortNameSegments(std::move(leg.steps));
leg.steps = guidance::assignRelativeLocations(std::move(leg.steps),