Review adjustments for driveway handler, #4151
This commit is contained in:
parent
df4f0d043a
commit
929e5a4de6
@ -11,7 +11,6 @@ namespace guidance
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Intersection handlers deal with all issues related to intersections.
|
// Intersection handlers deal with all issues related to intersections.
|
||||||
// They assign appropriate turn operations to the TurnOperations.
|
|
||||||
class DrivewayHandler final : public IntersectionHandler
|
class DrivewayHandler final : public IntersectionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -27,7 +27,6 @@ namespace guidance
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Intersection handlers deal with all issues related to intersections.
|
// 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
|
// This base class provides both the interface and implementations for
|
||||||
// common functions.
|
// common functions.
|
||||||
class IntersectionHandler
|
class IntersectionHandler
|
||||||
|
@ -20,7 +20,6 @@ namespace guidance
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Intersection handlers deal with all issues related to intersections.
|
// Intersection handlers deal with all issues related to intersections.
|
||||||
// They assign appropriate turn operations to the TurnOperations.
|
|
||||||
class MotorwayHandler : public IntersectionHandler
|
class MotorwayHandler : public IntersectionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -21,7 +21,6 @@ namespace guidance
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Intersection handlers deal with all issues related to intersections.
|
// Intersection handlers deal with all issues related to intersections.
|
||||||
// They assign appropriate turn operations to the TurnOperations.
|
|
||||||
class SliproadHandler final : public IntersectionHandler
|
class SliproadHandler final : public IntersectionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -24,7 +24,6 @@ namespace guidance
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Intersection handlers deal with all issues related to intersections.
|
// Intersection handlers deal with all issues related to intersections.
|
||||||
// They assign appropriate turn operations to the TurnOperations.
|
|
||||||
class TurnHandler : public IntersectionHandler
|
class TurnHandler : public IntersectionHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -35,7 +35,7 @@ bool DrivewayHandler::canProcess(const NodeID /*nid*/,
|
|||||||
const EdgeID /*via_eid*/,
|
const EdgeID /*via_eid*/,
|
||||||
const Intersection &intersection) const
|
const Intersection &intersection) const
|
||||||
{
|
{
|
||||||
const auto from_eid = intersection.front().eid;
|
const auto from_eid = intersection.getUTurnRoad().eid;
|
||||||
|
|
||||||
if (intersection.size() <= 2 ||
|
if (intersection.size() <= 2 ||
|
||||||
node_based_graph.GetEdgeData(from_eid).road_classification.IsLowPriorityRoadClass())
|
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;
|
(void)nid;
|
||||||
OSRM_ASSERT(road != intersection.end(), coordinates[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 =
|
road->instruction.type =
|
||||||
isSameName(source_edge_id, road->eid) ? TurnType::NoTurn : TurnType::NewName;
|
isSameName(source_edge_id, road->eid) ? TurnType::NoTurn : TurnType::NewName;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user