fix INVALID_NAME_ID vs INVALID_NAMEID -> EMPTY_NAMEID

This commit is contained in:
Moritz Kobitzsch
2016-05-26 14:46:15 +02:00
committed by Patrick Niklaus
parent 0a53775fb3
commit bdc66049a5
7 changed files with 10 additions and 10 deletions
@@ -176,7 +176,7 @@ Intersection IntersectionGenerator::mergeSegregatedRoads(Intersection intersecti
const auto &first_data = node_based_graph.GetEdgeData(intersection[first].turn.eid);
const auto &second_data = node_based_graph.GetEdgeData(intersection[second].turn.eid);
return first_data.name_id != INVALID_NAME_ID && first_data.name_id == second_data.name_id &&
return first_data.name_id != EMPTY_NAMEID && first_data.name_id == second_data.name_id &&
!first_data.roundabout && !second_data.roundabout &&
first_data.travel_mode == second_data.travel_mode &&
first_data.road_classification == second_data.road_classification &&
@@ -57,7 +57,7 @@ TurnType::Enum IntersectionHandler::findBasicTurnType(const EdgeID via_edge,
if (!on_ramp && onto_ramp)
return TurnType::OnRamp;
if (in_data.name_id == out_data.name_id && in_data.name_id != INVALID_NAME_ID)
if (in_data.name_id == out_data.name_id && in_data.name_id != EMPTY_NAMEID)
{
return TurnType::Continue;
}
@@ -306,7 +306,7 @@ void IntersectionHandler::assignTrivialTurns(const EdgeID via_eid,
bool IntersectionHandler::isThroughStreet(const std::size_t index,
const Intersection &intersection) const
{
if (node_based_graph.GetEdgeData(intersection[index].turn.eid).name_id == INVALID_NAME_ID)
if (node_based_graph.GetEdgeData(intersection[index].turn.eid).name_id == EMPTY_NAMEID)
return false;
for (const auto &road : intersection)
{
+3 -3
View File
@@ -129,7 +129,7 @@ Intersection MotorwayHandler::fromMotorway(const EdgeID via_eid, Intersection in
{
const auto &out_data = node_based_graph.GetEdgeData(road.turn.eid);
if (road.turn.angle != 0 && in_data.name_id == out_data.name_id &&
in_data.name_id != INVALID_NAME_ID &&
in_data.name_id != EMPTY_NAMEID &&
detail::isMotorwayClass(out_data.road_classification.road_class))
return road.turn.angle;
}
@@ -379,7 +379,7 @@ Intersection MotorwayHandler::fromRamp(const EdgeID via_eid, Intersection inters
{
if (detail::isMotorwayClass(intersection[1].turn.eid, node_based_graph) &&
node_based_graph.GetEdgeData(intersection[2].turn.eid).name_id !=
INVALID_NAME_ID &&
EMPTY_NAMEID &&
node_based_graph.GetEdgeData(intersection[2].turn.eid).name_id ==
node_based_graph.GetEdgeData(intersection[1].turn.eid).name_id)
{
@@ -406,7 +406,7 @@ Intersection MotorwayHandler::fromRamp(const EdgeID via_eid, Intersection inters
BOOST_ASSERT(intersection[2].entry_allowed);
if (detail::isMotorwayClass(intersection[2].turn.eid, node_based_graph) &&
node_based_graph.GetEdgeData(intersection[1].turn.eid).name_id !=
INVALID_NAME_ID &&
EMPTY_NAMEID &&
node_based_graph.GetEdgeData(intersection[1].turn.eid).name_id ==
node_based_graph.GetEdgeData(intersection[0].turn.eid).name_id)
{
+1 -1
View File
@@ -149,7 +149,7 @@ Intersection TurnAnalysis::handleSliproads(const EdgeID source_edge_id,
// Test to see if the source edge and the one we're looking at are the same road
return road_edge_data.road_classification.road_class ==
source_edge_data.road_classification.road_class &&
road_edge_data.name_id != INVALID_NAME_ID &&
road_edge_data.name_id != EMPTY_NAMEID &&
road_edge_data.name_id == source_edge_data.name_id && road.entry_allowed &&
angularDeviation(road.turn.angle, STRAIGHT_ANGLE) < FUZZY_ANGLE_DIFFERENCE;
});