Use driving_side tag of location-dependent data and OSM ways

This commit is contained in:
Michael Krasnyk
2017-08-07 23:39:34 +02:00
parent c9673741de
commit af3f0a4782
8 changed files with 55 additions and 25 deletions
+2
View File
@@ -61,6 +61,7 @@ struct ExtractionWay
road_classification = guidance::RoadClassification();
backward_restricted = false;
forward_restricted = false;
is_left_hand_driving = false;
}
// wrappers to allow assigning nil (nullptr) to string values
@@ -114,6 +115,7 @@ struct ExtractionWay
bool is_startpoint : 1;
bool forward_restricted : 1;
bool backward_restricted : 1;
bool is_left_hand_driving : 1;
};
}
}
@@ -70,6 +70,7 @@ struct InternalExtractorEdge
false, // circular
true, // can be startpoint
false, // local access only
false, // is_left_hand_driving
false, // split edge
TRAVEL_MODE_INACCESSIBLE,
0,
@@ -90,6 +91,7 @@ struct InternalExtractorEdge
bool circular,
bool startpoint,
bool restricted,
bool is_left_hand_driving,
bool is_split,
TravelMode travel_mode,
ClassData classes,
@@ -107,6 +109,7 @@ struct InternalExtractorEdge
circular,
startpoint,
restricted,
is_left_hand_driving,
is_split,
travel_mode,
classes,
@@ -140,6 +143,7 @@ struct InternalExtractorEdge
false, // circular
true, // can be startpoint
false, // local access only
false, // is_left_hand_driving
false, // split edge
TRAVEL_MODE_INACCESSIBLE,
0,
@@ -160,6 +164,7 @@ struct InternalExtractorEdge
false, // circular
true, // can be startpoint
false, // local access only
false, // is_left_hand_driving
false, // split edge
TRAVEL_MODE_INACCESSIBLE,
0,
+11 -5
View File
@@ -27,6 +27,7 @@ struct NodeBasedEdge
bool circular,
bool startpoint,
bool restricted,
bool is_left_hand_driving,
bool is_split,
TravelMode travel_mode,
ClassData classes,
@@ -46,6 +47,7 @@ struct NodeBasedEdge
std::uint8_t circular : 1; // 1
std::uint8_t startpoint : 1; // 1
std::uint8_t restricted : 1; // 1
std::uint8_t is_left_hand_driving : 1; // 1
std::uint8_t is_split : 1; // 1
TravelMode travel_mode : 4; // 4
ClassData classes; // 8 1
@@ -66,6 +68,7 @@ struct NodeBasedEdgeWithOSM : NodeBasedEdge
bool circular,
bool startpoint,
bool restricted,
bool is_left_hand_driving,
bool is_split,
TravelMode travel_mode,
ClassData classes,
@@ -81,8 +84,8 @@ struct NodeBasedEdgeWithOSM : NodeBasedEdge
inline NodeBasedEdge::NodeBasedEdge()
: source(SPECIAL_NODEID), target(SPECIAL_NODEID), name_id(0), weight(0), duration(0),
forward(false), backward(false), roundabout(false), circular(false), startpoint(true),
restricted(false), is_split(false), travel_mode(TRAVEL_MODE_INACCESSIBLE),
lane_description_id(INVALID_LANE_DESCRIPTIONID)
restricted(false), is_left_hand_driving(false), is_split(false),
travel_mode(TRAVEL_MODE_INACCESSIBLE), lane_description_id(INVALID_LANE_DESCRIPTIONID)
{
}
@@ -97,6 +100,7 @@ inline NodeBasedEdge::NodeBasedEdge(NodeID source,
bool circular,
bool startpoint,
bool restricted,
bool is_left_hand_driving,
bool is_split,
TravelMode travel_mode,
ClassData classes,
@@ -104,9 +108,9 @@ inline NodeBasedEdge::NodeBasedEdge(NodeID source,
guidance::RoadClassification road_classification)
: source(source), target(target), name_id(name_id), weight(weight), duration(duration),
forward(forward), backward(backward), roundabout(roundabout), circular(circular),
startpoint(startpoint), restricted(restricted), is_split(is_split), travel_mode(travel_mode),
classes(classes), lane_description_id(lane_description_id),
road_classification(std::move(road_classification))
startpoint(startpoint), restricted(restricted), is_left_hand_driving(is_left_hand_driving),
is_split(is_split), travel_mode(travel_mode), classes(classes),
lane_description_id(lane_description_id), road_classification(std::move(road_classification))
{
}
@@ -138,6 +142,7 @@ inline NodeBasedEdgeWithOSM::NodeBasedEdgeWithOSM(OSMNodeID source,
bool circular,
bool startpoint,
bool restricted,
bool is_left_hand_driving,
bool is_split,
TravelMode travel_mode,
ClassData classes,
@@ -154,6 +159,7 @@ inline NodeBasedEdgeWithOSM::NodeBasedEdgeWithOSM(OSMNodeID source,
circular,
startpoint,
restricted,
is_left_hand_driving,
is_split,
travel_mode,
classes,