link ConnectedRoad and TurnOperation via class hierarchy
and empower intersection by adding basic functionality to pod type refactor extractor/toolkit into intersection
This commit is contained in:
@@ -42,7 +42,6 @@ unsigned calculateOverviewZoomLevel(const std::vector<LegGeometry> &leg_geometri
|
||||
|
||||
return util::viewport::getFittedZoom(south_west, north_east);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<util::Coordinate> assembleOverview(const std::vector<LegGeometry> &leg_geometries,
|
||||
@@ -62,7 +61,8 @@ std::vector<util::Coordinate> assembleOverview(const std::vector<LegGeometry> &l
|
||||
using GeometryIter = decltype(overview_geometry)::const_iterator;
|
||||
|
||||
auto leg_reverse_index = leg_geometries.size();
|
||||
const auto insert_without_overlap = [&leg_reverse_index, &overview_geometry](GeometryIter begin, GeometryIter end) {
|
||||
const auto insert_without_overlap = [&leg_reverse_index, &overview_geometry](GeometryIter begin,
|
||||
GeometryIter end) {
|
||||
// not the last leg
|
||||
if (leg_reverse_index > 1)
|
||||
{
|
||||
@@ -77,7 +77,8 @@ std::vector<util::Coordinate> assembleOverview(const std::vector<LegGeometry> &l
|
||||
const auto zoom_level = std::min(18u, calculateOverviewZoomLevel(leg_geometries));
|
||||
for (const auto &geometry : leg_geometries)
|
||||
{
|
||||
const auto simplified = douglasPeucker(geometry.locations.begin(), geometry.locations.end(), zoom_level);
|
||||
const auto simplified =
|
||||
douglasPeucker(geometry.locations.begin(), geometry.locations.end(), zoom_level);
|
||||
insert_without_overlap(simplified.begin(), simplified.end());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "util/group_by.hpp"
|
||||
#include "util/guidance/toolkit.hpp"
|
||||
|
||||
#include "extractor/guidance/toolkit.hpp"
|
||||
#include "engine/guidance/toolkit.hpp"
|
||||
#include "extractor/guidance/turn_instruction.hpp"
|
||||
#include "engine/guidance/post_processing.hpp"
|
||||
|
||||
@@ -16,8 +16,6 @@ namespace DirectionModifier = osrm::extractor::guidance::DirectionModifier;
|
||||
|
||||
using osrm::util::guidance::isLeftTurn;
|
||||
using osrm::util::guidance::isRightTurn;
|
||||
using osrm::extractor::guidance::numLanesToTheRight;
|
||||
using osrm::extractor::guidance::numLanesToTheLeft;
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "engine/guidance/post_processing.hpp"
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/toolkit.hpp"
|
||||
#include "extractor/guidance/turn_instruction.hpp"
|
||||
#include "engine/guidance/toolkit.hpp"
|
||||
|
||||
#include "engine/guidance/assemble_steps.hpp"
|
||||
#include "engine/guidance/lane_processing.hpp"
|
||||
@@ -1599,13 +1599,13 @@ std::vector<RouteStep> collapseUseLane(std::vector<RouteStep> steps)
|
||||
// the lane description is given left to right, lanes are counted from the right.
|
||||
// Therefore we access the lane description using the reverse iterator
|
||||
|
||||
auto right_most_lanes = extractor::guidance::lanesToTheRight(step);
|
||||
auto right_most_lanes = lanesToTheRight(step);
|
||||
if (!right_most_lanes.empty() && containsTag(right_most_lanes.front(),
|
||||
(extractor::guidance::TurnLaneType::straight |
|
||||
extractor::guidance::TurnLaneType::none)))
|
||||
return false;
|
||||
|
||||
auto left_most_lanes = extractor::guidance::lanesToTheLeft(step);
|
||||
auto left_most_lanes = lanesToTheLeft(step);
|
||||
if (!left_most_lanes.empty() && containsTag(left_most_lanes.back(),
|
||||
(extractor::guidance::TurnLaneType::straight |
|
||||
extractor::guidance::TurnLaneType::none)))
|
||||
|
||||
Reference in New Issue
Block a user