diff --git a/include/extractor/guidance/driveway_handler.hpp b/include/extractor/guidance/driveway_handler.hpp index 78e4f40ee..1bbdb81d3 100644 --- a/include/extractor/guidance/driveway_handler.hpp +++ b/include/extractor/guidance/driveway_handler.hpp @@ -11,7 +11,6 @@ namespace guidance { // Intersection handlers deal with all issues related to intersections. -// They assign appropriate turn operations to the TurnOperations. class DrivewayHandler final : public IntersectionHandler { public: diff --git a/include/extractor/guidance/intersection_handler.hpp b/include/extractor/guidance/intersection_handler.hpp index 87c14c4c9..1a1dc8c1d 100644 --- a/include/extractor/guidance/intersection_handler.hpp +++ b/include/extractor/guidance/intersection_handler.hpp @@ -27,7 +27,6 @@ namespace guidance { // Intersection handlers deal with all issues related to intersections. -// They assign appropriate turn operations to the TurnOperations. // This base class provides both the interface and implementations for // common functions. class IntersectionHandler diff --git a/include/extractor/guidance/motorway_handler.hpp b/include/extractor/guidance/motorway_handler.hpp index 2105e27be..b3d7ccfc0 100644 --- a/include/extractor/guidance/motorway_handler.hpp +++ b/include/extractor/guidance/motorway_handler.hpp @@ -20,7 +20,6 @@ namespace guidance { // Intersection handlers deal with all issues related to intersections. -// They assign appropriate turn operations to the TurnOperations. class MotorwayHandler : public IntersectionHandler { public: diff --git a/include/extractor/guidance/sliproad_handler.hpp b/include/extractor/guidance/sliproad_handler.hpp index 5d7db73ff..eed194dc9 100644 --- a/include/extractor/guidance/sliproad_handler.hpp +++ b/include/extractor/guidance/sliproad_handler.hpp @@ -21,7 +21,6 @@ namespace guidance { // Intersection handlers deal with all issues related to intersections. -// They assign appropriate turn operations to the TurnOperations. class SliproadHandler final : public IntersectionHandler { public: diff --git a/include/extractor/guidance/turn_handler.hpp b/include/extractor/guidance/turn_handler.hpp index af01ccaf6..89ae3c6c9 100644 --- a/include/extractor/guidance/turn_handler.hpp +++ b/include/extractor/guidance/turn_handler.hpp @@ -24,7 +24,6 @@ namespace guidance { // Intersection handlers deal with all issues related to intersections. -// They assign appropriate turn operations to the TurnOperations. class TurnHandler : public IntersectionHandler { public: diff --git a/src/extractor/guidance/driveway_handler.cpp b/src/extractor/guidance/driveway_handler.cpp index e81257372..83bab82a9 100644 --- a/src/extractor/guidance/driveway_handler.cpp +++ b/src/extractor/guidance/driveway_handler.cpp @@ -35,7 +35,7 @@ bool DrivewayHandler::canProcess(const NodeID /*nid*/, const EdgeID /*via_eid*/, const Intersection &intersection) const { - const auto from_eid = intersection.front().eid; + const auto from_eid = intersection.getUTurnRoad().eid; if (intersection.size() <= 2 || node_based_graph.GetEdgeData(from_eid).road_classification.IsLowPriorityRoadClass()) @@ -64,6 +64,11 @@ operator()(const NodeID nid, const EdgeID source_edge_id, Intersection intersect (void)nid; OSRM_ASSERT(road != intersection.end(), coordinates[nid]); + if (road->instruction == TurnInstruction::INVALID()) + return intersection; + + OSRM_ASSERT(road->instruction.type == TurnType::Turn, coordinates[nid]); + road->instruction.type = isSameName(source_edge_id, road->eid) ? TurnType::NoTurn : TurnType::NewName;