added list of intersections to the step-maneuver, not in api so far
This commit is contained in:
committed by
Patrick Niklaus
parent
59fbb289b9
commit
2472c5d6a1
@@ -43,7 +43,7 @@ std::vector<RouteStep> assembleSteps(const DataFacadeT &facade,
|
||||
const bool source_traversed_in_reverse,
|
||||
const bool target_traversed_in_reverse)
|
||||
{
|
||||
const double constexpr ZERO_DURACTION = 0., ZERO_DISTANCE = 0.;
|
||||
const double constexpr ZERO_DURATION = 0., ZERO_DISTANCE = 0.;
|
||||
const EdgeWeight source_duration =
|
||||
source_traversed_in_reverse ? source_node.reverse_weight : source_node.forward_weight;
|
||||
const auto source_mode = source_traversed_in_reverse ? source_node.backward_travel_mode
|
||||
@@ -167,7 +167,7 @@ std::vector<RouteStep> assembleSteps(const DataFacadeT &facade,
|
||||
WaypointType::Arrive, leg_geometry);
|
||||
steps.push_back(RouteStep{target_node.name_id,
|
||||
facade.GetNameForID(target_node.name_id),
|
||||
ZERO_DURACTION,
|
||||
ZERO_DURATION,
|
||||
ZERO_DISTANCE,
|
||||
target_mode,
|
||||
final_maneuver,
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "extractor/guidance/turn_instruction.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
@@ -20,6 +21,14 @@ enum class WaypointType : std::uint8_t
|
||||
Depart,
|
||||
};
|
||||
|
||||
//A represenetation of intermediate intersections
|
||||
struct IntermediateIntersection
|
||||
{
|
||||
double duration;
|
||||
double distance;
|
||||
util::Coordinate location;
|
||||
};
|
||||
|
||||
struct StepManeuver
|
||||
{
|
||||
util::Coordinate location;
|
||||
@@ -28,7 +37,7 @@ struct StepManeuver
|
||||
extractor::guidance::TurnInstruction instruction;
|
||||
WaypointType waypoint_type;
|
||||
unsigned exit;
|
||||
unsigned intersection;
|
||||
std::vector<IntermediateIntersection> intersections;
|
||||
};
|
||||
} // namespace guidance
|
||||
} // namespace engine
|
||||
|
||||
Reference in New Issue
Block a user