use enter + exit for roundabout instructions (#4358)

* Expose roundabout/rotary exit instructions as a new instruction type.
This commit is contained in:
Moritz Kobitzsch
2017-09-05 21:30:34 +02:00
committed by Daniel Patterson
parent 0fc1aa2711
commit c2dc7e9cd0
24 changed files with 564 additions and 1187 deletions
+3 -3
View File
@@ -167,12 +167,12 @@ class RouteAPI : public BaseAPI
* the overall response consistent.
*
* ⚠ CAUTION: order of post-processing steps is important
* - postProcess must be called before collapseTurnInstructions that expects
* post-processed roundabouts without Exit instructions
* - handleRoundabouts must be called before collapseTurnInstructions that
* expects post-processed roundabouts
*/
guidance::trimShortSegments(steps, leg_geometry);
leg.steps = guidance::postProcess(std::move(steps));
leg.steps = guidance::handleRoundabouts(std::move(steps));
leg.steps = guidance::collapseTurnInstructions(std::move(leg.steps));
leg.steps = guidance::anticipateLaneChange(std::move(leg.steps));
leg.steps = guidance::buildIntersections(std::move(leg.steps));
+1 -1
View File
@@ -17,7 +17,7 @@ namespace guidance
// passed as none-reference to modify in-place and move out again
OSRM_ATTR_WARN_UNUSED
std::vector<RouteStep> postProcess(std::vector<RouteStep> steps);
std::vector<RouteStep> handleRoundabouts(std::vector<RouteStep> steps);
// trim initial/final segment of very short length.
// This function uses in/out parameter passing to modify both steps and geometry in place.