syncronize geometry and steps after post-processing

This commit is contained in:
Moritz Kobitzsch
2016-03-23 10:41:28 +01:00
committed by Patrick Niklaus
parent 2472c5d6a1
commit 51a4cf5e46
5 changed files with 41 additions and 9 deletions
@@ -51,7 +51,7 @@ LegGeometry assembleGeometry(const DataFacadeT &facade,
current_distance +=
util::coordinate_calculation::haversineDistance(prev_coordinate, coordinate);
//all changes to this check have to be matched with assemble_steps
// all changes to this check have to be matched with assemble_steps
if (path_point.turn_instruction.type != extractor::guidance::TurnType::NoTurn)
{
geometry.segment_distances.push_back(current_distance);
+9 -1
View File
@@ -2,6 +2,7 @@
#define ENGINE_GUIDANCE_POST_PROCESSING_HPP
#include "engine/guidance/route_step.hpp"
#include "engine/guidance/leg_geometry.hpp"
#include <vector>
@@ -12,9 +13,16 @@ namespace engine
namespace guidance
{
//passed as none-reference to modify in-place and move out again
// passed as none-reference to modify in-place and move out again
std::vector<RouteStep> postProcess(std::vector<RouteStep> steps);
// postProcess will break the connection between the leg geometry
// for which a segment is supposed to represent exactly the coordinates
// between routing maneuvers and the route steps itself.
// If required, we can get both in sync again using this function.
// Move in LegGeometry for modification in place.
LegGeometry resyncGeometry(LegGeometry leg_geometry, const std::vector<RouteStep> &steps);
} // namespace guidance
} // namespace engine
} // namespace osrm