added list of intersections to the step-maneuver, not in api so far

This commit is contained in:
Moritz Kobitzsch
2016-03-22 14:17:17 +01:00
committed by Patrick Niklaus
parent 6a5ffc126a
commit 9681d662cb
5 changed files with 200 additions and 142 deletions
+2 -2
View File
@@ -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,
+10 -1
View File
@@ -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