advanced guidance on 5.0

This commit is contained in:
Moritz Kobitzsch
2016-02-24 10:29:23 +01:00
committed by Patrick Niklaus
parent 33f083b213
commit ef1e0e14ec
37 changed files with 1638 additions and 412 deletions
+3 -2
View File
@@ -1,7 +1,7 @@
#ifndef ENGINE_RESPONSE_OBJECTS_HPP_
#define ENGINE_RESPONSE_OBJECTS_HPP_
#include "extractor/turn_instructions.hpp"
#include "engine/guidance/turn_instruction.hpp"
#include "extractor/travel_mode.hpp"
#include "engine/polyline_compressor.hpp"
#include "engine/guidance/route_step.hpp"
@@ -32,7 +32,8 @@ namespace json
namespace detail
{
std::string instructionToString(extractor::TurnInstruction instruction);
std::string instructionTypeToString(guidance::TurnType type);
std::string instructionModifierToString(guidance::DirectionModifier modifier);
util::json::Array coordinateToLonLat(const util::Coordinate coordinate);
+5 -1
View File
@@ -12,6 +12,7 @@
#include "engine/guidance/assemble_geometry.hpp"
#include "engine/guidance/assemble_overview.hpp"
#include "engine/guidance/assemble_steps.hpp"
#include "engine/guidance/post_processing.hpp"
#include "engine/internal_route_result.hpp"
@@ -67,7 +68,7 @@ class RouteAPI : public BaseAPI
}
util::json::Object MakeRoute(const std::vector<PhantomNodes> &segment_end_coordinates,
const std::vector<std::vector<PathData>> &unpacked_path_segments,
std::vector<std::vector<PathData>> unpacked_path_segments,
const std::vector<bool> &source_traversed_in_reverse,
const std::vector<bool> &target_traversed_in_reverse) const
{
@@ -76,10 +77,13 @@ class RouteAPI : public BaseAPI
auto number_of_legs = segment_end_coordinates.size();
legs.reserve(number_of_legs);
leg_geometries.reserve(number_of_legs);
unpacked_path_segments = guidance::postProcess( std::move(unpacked_path_segments) );
for (auto idx : util::irange(0UL, number_of_legs))
{
const auto &phantoms = segment_end_coordinates[idx];
const auto &path_data = unpacked_path_segments[idx];
const bool reversed_source = source_traversed_in_reverse[idx];
const bool reversed_target = target_traversed_in_reverse[idx];