check empty name string in turn collapsing
This commit is contained in:
committed by
Patrick Niklaus
parent
24562acd30
commit
3f7b5da683
@@ -173,7 +173,7 @@ class RouteAPI : public BaseAPI
|
||||
|
||||
guidance::trimShortSegments(steps, leg_geometry);
|
||||
leg.steps = guidance::handleRoundabouts(std::move(steps));
|
||||
leg.steps = guidance::collapseTurnInstructions(std::move(leg.steps));
|
||||
leg.steps = guidance::collapseTurnInstructions(std::move(leg.steps), facade);
|
||||
leg.steps = guidance::anticipateLaneChange(std::move(leg.steps));
|
||||
leg.steps = guidance::buildIntersections(std::move(leg.steps));
|
||||
leg.steps = guidance::suppressShortNameSegments(std::move(leg.steps));
|
||||
|
||||
@@ -36,7 +36,10 @@ bool isStaggeredIntersection(const RouteStepIterator step_prior_to_intersection,
|
||||
// a - > x
|
||||
bool isUTurn(const RouteStepIterator step_prior_to_intersection,
|
||||
const RouteStepIterator step_entering_intersection,
|
||||
const RouteStepIterator step_leaving_intersection);
|
||||
const RouteStepIterator step_leaving_intersection,
|
||||
const std::string &step_prior_name,
|
||||
const std::string &step_entering_name,
|
||||
const std::string &step_leaving_name);
|
||||
|
||||
// detect oscillating names where a name switch A->B->A occurs. This is often the case due to
|
||||
// bridges or tunnels. Any such oszillation is not supposed to show up
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#ifndef OSRM_ENGINE_GUIDANCE_COLLAPSE_HPP
|
||||
|
||||
#include "engine/datafacade/datafacade_base.hpp"
|
||||
#include "engine/guidance/route_step.hpp"
|
||||
#include "util/attributes.hpp"
|
||||
|
||||
@@ -19,7 +20,8 @@ namespace guidance
|
||||
// Collapsing such turns into a single turn instruction, we give a clearer
|
||||
// set of instructionst that is not cluttered by unnecessary turns/name changes.
|
||||
OSRM_ATTR_WARN_UNUSED
|
||||
std::vector<RouteStep> collapseTurnInstructions(std::vector<RouteStep> steps);
|
||||
std::vector<RouteStep> collapseTurnInstructions(std::vector<RouteStep> steps,
|
||||
const datafacade::BaseDataFacade &facade);
|
||||
|
||||
// A combined turn is a set of two instructions that actually form a single turn, as far as we
|
||||
// perceive it. A u-turn consisting of two left turns is one such example. But there are also lots
|
||||
|
||||
Reference in New Issue
Block a user