Add local left_hand_driving flag in API version 2
This commit is contained in:
@@ -14,19 +14,28 @@ namespace extractor
|
||||
|
||||
struct ExtractionTurn
|
||||
{
|
||||
ExtractionTurn(const guidance::ConnectedRoad &turn, bool has_traffic_light)
|
||||
ExtractionTurn(const guidance::ConnectedRoad &turn,
|
||||
bool has_traffic_light,
|
||||
bool source_restricted,
|
||||
bool target_restricted,
|
||||
bool is_left_hand_driving)
|
||||
: angle(180. - turn.angle), turn_type(turn.instruction.type),
|
||||
direction_modifier(turn.instruction.direction_modifier),
|
||||
has_traffic_light(has_traffic_light), weight(0.), duration(0.), source_restricted(false),
|
||||
target_restricted(false)
|
||||
has_traffic_light(has_traffic_light), source_restricted(source_restricted),
|
||||
target_restricted(target_restricted), is_left_hand_driving(is_left_hand_driving),
|
||||
weight(0.), duration(0.)
|
||||
{
|
||||
}
|
||||
|
||||
ExtractionTurn(const bool has_traffic_light = false)
|
||||
ExtractionTurn(bool has_traffic_light,
|
||||
bool source_restricted,
|
||||
bool target_restricted,
|
||||
bool is_left_hand_driving)
|
||||
: angle(0), turn_type(guidance::TurnType::NoTurn),
|
||||
direction_modifier(guidance::DirectionModifier::Straight),
|
||||
has_traffic_light(has_traffic_light), weight(0.), duration(0.), source_restricted(false),
|
||||
target_restricted(false)
|
||||
has_traffic_light(has_traffic_light), source_restricted(source_restricted),
|
||||
target_restricted(target_restricted), is_left_hand_driving(is_left_hand_driving),
|
||||
weight(0.), duration(0.)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -34,10 +43,12 @@ struct ExtractionTurn
|
||||
const guidance::TurnType::Enum turn_type;
|
||||
const guidance::DirectionModifier::Enum direction_modifier;
|
||||
const bool has_traffic_light;
|
||||
const bool source_restricted;
|
||||
const bool target_restricted;
|
||||
const bool is_left_hand_driving;
|
||||
|
||||
double weight;
|
||||
double duration;
|
||||
bool source_restricted;
|
||||
bool target_restricted;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ struct ProfileProperties
|
||||
bool continue_straight_at_waypoint;
|
||||
//! flag used for restriction parser (e.g. used for the walk profile)
|
||||
bool use_turn_restrictions;
|
||||
bool left_hand_driving;
|
||||
bool left_hand_driving; // DEPRECATED: property value is local to edges from API version 2
|
||||
bool fallback_to_duration;
|
||||
//! stores the name of the weight (e.g. 'duration', 'distance', 'safety')
|
||||
char weight_name[MAX_WEIGHT_NAME_LENGTH + 1];
|
||||
|
||||
Reference in New Issue
Block a user