Apply clang-format again
This commit is contained in:
parent
aebf6fa0b1
commit
c7a1576100
@ -840,7 +840,8 @@ class SharedDataFacade final : public BaseDataFacade
|
||||
else
|
||||
return extractor::guidance::TurnLaneDescription(
|
||||
m_lane_description_masks.begin() + m_lane_description_offsets[lane_description_id],
|
||||
m_lane_description_masks.begin() + m_lane_description_offsets[lane_description_id + 1]);
|
||||
m_lane_description_masks.begin() +
|
||||
m_lane_description_offsets[lane_description_id + 1]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -247,7 +247,8 @@ inline std::vector<RouteStep> assembleSteps(const datafacade::BaseDataFacade &fa
|
||||
BOOST_ASSERT(steps.back().intersections.front().entry.size() == 1);
|
||||
BOOST_ASSERT(steps.back().maneuver.waypoint_type == WaypointType::Arrive);
|
||||
BOOST_ASSERT(steps.back().intersections.front().lanes.lanes_in_turn == 0);
|
||||
BOOST_ASSERT(steps.back().intersections.front().lanes.first_lane_from_the_right == INVALID_LANEID);
|
||||
BOOST_ASSERT(steps.back().intersections.front().lanes.first_lane_from_the_right ==
|
||||
INVALID_LANEID);
|
||||
BOOST_ASSERT(steps.back().intersections.front().lane_description.empty());
|
||||
return steps;
|
||||
}
|
||||
|
@ -107,12 +107,11 @@ trimLaneString(std::string lane_string, std::int32_t count_left, std::int32_t co
|
||||
return extractor::guidance::trimLaneString(std::move(lane_string), count_left, count_right);
|
||||
}
|
||||
|
||||
inline std::string
|
||||
applyAccessTokens(const std::string &lane_string, const std::string &access_tokens)
|
||||
inline std::string applyAccessTokens(const std::string &lane_string,
|
||||
const std::string &access_tokens)
|
||||
{
|
||||
return extractor::guidance::applyAccessTokens(lane_string, access_tokens);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef EXTRACTION_WAY_HPP
|
||||
#define EXTRACTION_WAY_HPP
|
||||
|
||||
#include "extractor/travel_mode.hpp"
|
||||
#include "extractor/guidance/road_classification.hpp"
|
||||
#include "extractor/travel_mode.hpp"
|
||||
#include "util/guidance/turn_lanes.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef EXTRACTOR_CALLBACKS_HPP
|
||||
#define EXTRACTOR_CALLBACKS_HPP
|
||||
|
||||
#include "util/typedefs.hpp"
|
||||
#include "extractor/guidance/turn_lane_types.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/optional/optional_fwd.hpp>
|
||||
@ -40,7 +40,10 @@ class ExtractorCallbacks
|
||||
using MapKey = std::pair<std::string, std::string>;
|
||||
using MapVal = unsigned;
|
||||
std::unordered_map<MapKey, MapVal, boost::hash<MapKey>> string_map;
|
||||
std::unordered_map<guidance::TurnLaneDescription,LaneDescriptionID,guidance::TurnLaneDescription_hash> lane_description_map;
|
||||
std::unordered_map<guidance::TurnLaneDescription,
|
||||
LaneDescriptionID,
|
||||
guidance::TurnLaneDescription_hash>
|
||||
lane_description_map;
|
||||
ExtractionContainers &external_memory;
|
||||
|
||||
public:
|
||||
|
@ -84,16 +84,10 @@ class RoadClassification
|
||||
bool IsLowPriorityRoadClass() const { return (0 != may_be_ignored); }
|
||||
void SetLowPriorityFlag(const bool new_value) { may_be_ignored = new_value; }
|
||||
|
||||
std::uint32_t GetPriority() const
|
||||
{
|
||||
return static_cast<std::uint32_t>(road_priority_class);
|
||||
}
|
||||
std::uint32_t GetPriority() const { return static_cast<std::uint32_t>(road_priority_class); }
|
||||
|
||||
RoadPriorityClass::Enum GetClass() const { return road_priority_class; }
|
||||
void SetClass(const RoadPriorityClass::Enum new_value)
|
||||
{
|
||||
road_priority_class = new_value;
|
||||
}
|
||||
void SetClass(const RoadPriorityClass::Enum new_value) { road_priority_class = new_value; }
|
||||
|
||||
bool operator==(const RoadClassification &other) const
|
||||
{
|
||||
@ -102,10 +96,7 @@ class RoadClassification
|
||||
road_priority_class == other.road_priority_class;
|
||||
}
|
||||
|
||||
bool operator!=(const RoadClassification &other ) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
bool operator!=(const RoadClassification &other) const { return !(*this == other); }
|
||||
|
||||
std::string ToString() const
|
||||
{
|
||||
@ -116,7 +107,9 @@ class RoadClassification
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
static_assert(sizeof(RoadClassification) == 1,"Road Classification should fit a byte. Increasing this has a severe impact on memory.");
|
||||
static_assert(
|
||||
sizeof(RoadClassification) == 1,
|
||||
"Road Classification should fit a byte. Increasing this has a severe impact on memory.");
|
||||
|
||||
inline bool canBeSeenAsFork(const RoadClassification first, const RoadClassification second)
|
||||
{
|
||||
|
@ -2,8 +2,8 @@
|
||||
#define OSRM_EXTRACTOR_GUIDANCE_SLIPROAD_HANDLER_HPP_
|
||||
|
||||
#include "extractor/guidance/intersection.hpp"
|
||||
#include "extractor/guidance/intersection_handler.hpp"
|
||||
#include "extractor/guidance/intersection_generator.hpp"
|
||||
#include "extractor/guidance/intersection_handler.hpp"
|
||||
#include "extractor/query_node.hpp"
|
||||
|
||||
#include "util/name_table.hpp"
|
||||
@ -42,6 +42,7 @@ class SliproadHandler : public IntersectionHandler
|
||||
Intersection operator()(const NodeID nid,
|
||||
const EdgeID via_eid,
|
||||
Intersection intersection) const override final;
|
||||
|
||||
private:
|
||||
const IntersectionGenerator &intersection_generator;
|
||||
};
|
||||
|
@ -61,7 +61,8 @@ class TurnHandler : public IntersectionHandler
|
||||
handleDistinctConflict(const EdgeID via_edge, ConnectedRoad &left, ConnectedRoad &right) const;
|
||||
|
||||
// Classification
|
||||
std::pair<std::size_t, std::size_t> findFork(const EdgeID via_edge, const Intersection &intersection) const;
|
||||
std::pair<std::size_t, std::size_t> findFork(const EdgeID via_edge,
|
||||
const Intersection &intersection) const;
|
||||
|
||||
Intersection assignLeftTurns(const EdgeID via_edge,
|
||||
Intersection intersection,
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef OSRM_EXTRACTOR_GUIDANCE_TURN_LANE_DATA_HPP_
|
||||
#define OSRM_EXTRACTOR_GUIDANCE_TURN_LANE_DATA_HPP_
|
||||
|
||||
#include "util/typedefs.hpp"
|
||||
#include "extractor/guidance/turn_lane_types.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -10,9 +10,9 @@
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/functional/hash_fwd.hpp>
|
||||
|
||||
#include "util/json_container.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
#include "util/json_container.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
|
@ -141,7 +141,6 @@ struct InternalExtractorEdge
|
||||
return v;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,8 +112,7 @@ inline bool NodeBasedEdge::operator<(const NodeBasedEdge &other) const
|
||||
return source < other.source;
|
||||
}
|
||||
|
||||
inline NodeBasedEdgeWithOSM::NodeBasedEdgeWithOSM(
|
||||
OSMNodeID source,
|
||||
inline NodeBasedEdgeWithOSM::NodeBasedEdgeWithOSM(OSMNodeID source,
|
||||
OSMNodeID target,
|
||||
NodeID name_id,
|
||||
EdgeWeight weight,
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
#include "util/coordinate.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
|
@ -62,7 +62,6 @@ inline void print( const extractor::guidance::Intersection & intersection )
|
||||
std::cout << std::flush;
|
||||
}
|
||||
|
||||
|
||||
inline void print(const extractor::guidance::lanes::LaneDataVector &turn_lane_data)
|
||||
{
|
||||
std::cout << " Tags:\n";
|
||||
|
@ -192,8 +192,8 @@ class StaticRTree
|
||||
|
||||
Coordinate current_centroid = coordinate_calculation::centroid(
|
||||
m_coordinate_list[current_element.u], m_coordinate_list[current_element.v]);
|
||||
current_centroid.lat =
|
||||
FixedLatitude{static_cast<std::int32_t>(COORDINATE_PRECISION *
|
||||
current_centroid.lat = FixedLatitude{static_cast<std::int32_t>(
|
||||
COORDINATE_PRECISION *
|
||||
web_mercator::latToY(toFloating(current_centroid.lat)))};
|
||||
|
||||
current_wrapper.m_hilbert_value = hilbertCode(current_centroid);
|
||||
|
@ -64,7 +64,8 @@ static const LaneID INVALID_LANEID = std::numeric_limits<LaneID>::max();
|
||||
using LaneDataID = std::uint16_t;
|
||||
static const LaneDataID INVALID_LANE_DATAID = std::numeric_limits<LaneDataID>::max();
|
||||
using LaneDescriptionID = std::uint16_t;
|
||||
static const LaneDescriptionID INVALID_LANE_DESCRIPTIONID = std::numeric_limits<LaneDescriptionID>::max();
|
||||
static const LaneDescriptionID INVALID_LANE_DESCRIPTIONID =
|
||||
std::numeric_limits<LaneDescriptionID>::max();
|
||||
|
||||
using BearingClassID = std::uint32_t;
|
||||
static const BearingClassID INVALID_BEARING_CLASSID = std::numeric_limits<BearingClassID>::max();
|
||||
|
@ -261,8 +261,7 @@ parse_segment_lookup_from_csv_files(const std::vector<std::string> &segment_spee
|
||||
if (!ok || it != last)
|
||||
throw util::exception{"Segment speed file " + filename + " malformed"};
|
||||
|
||||
SegmentSpeedSource val{
|
||||
{OSMNodeID{from_node_id}, OSMNodeID{to_node_id}},
|
||||
SegmentSpeedSource val{{OSMNodeID{from_node_id}, OSMNodeID{to_node_id}},
|
||||
{speed, static_cast<std::uint8_t>(file_id)}};
|
||||
|
||||
local.push_back(std::move(val));
|
||||
@ -414,14 +413,16 @@ EdgeID Contractor::LoadEdgeExpandedGraph(
|
||||
// the struct will be padded out by an extra 4 bytes, and sizeof() will mean we read
|
||||
// too much data from the original file.
|
||||
#pragma pack(push, r1, 1)
|
||||
struct EdgeBasedGraphHeader {
|
||||
struct EdgeBasedGraphHeader
|
||||
{
|
||||
util::FingerPrint fingerprint;
|
||||
std::uint64_t number_of_edges;
|
||||
EdgeID max_edge_id;
|
||||
};
|
||||
#pragma pack(pop, r1)
|
||||
|
||||
const EdgeBasedGraphHeader graph_header = *(reinterpret_cast<const EdgeBasedGraphHeader *>(edge_based_graph_region.get_address()));
|
||||
const EdgeBasedGraphHeader graph_header =
|
||||
*(reinterpret_cast<const EdgeBasedGraphHeader *>(edge_based_graph_region.get_address()));
|
||||
|
||||
const util::FingerPrint fingerprint_valid = util::FingerPrint::GetValid();
|
||||
graph_header.fingerprint.TestContractor(fingerprint_valid);
|
||||
@ -737,14 +738,17 @@ EdgeID Contractor::LoadEdgeExpandedGraph(
|
||||
|
||||
tbb::parallel_invoke(maybe_save_geometries, save_datasource_indexes, save_datastore_names);
|
||||
|
||||
auto penaltyblock =
|
||||
reinterpret_cast<const extractor::lookup::PenaltyBlock *>(edge_penalty_region.get_address());
|
||||
auto penaltyblock = reinterpret_cast<const extractor::lookup::PenaltyBlock *>(
|
||||
edge_penalty_region.get_address());
|
||||
auto edge_segment_byte_ptr = reinterpret_cast<const char *>(edge_segment_region.get_address());
|
||||
auto edge_based_edge_ptr = reinterpret_cast<extractor::EdgeBasedEdge *>(
|
||||
reinterpret_cast<char *>(edge_based_graph_region.get_address()) + sizeof(EdgeBasedGraphHeader));
|
||||
reinterpret_cast<char *>(edge_based_graph_region.get_address()) +
|
||||
sizeof(EdgeBasedGraphHeader));
|
||||
|
||||
const auto edge_based_edge_last = reinterpret_cast<extractor::EdgeBasedEdge *>(
|
||||
reinterpret_cast<char *>(edge_based_graph_region.get_address()) + sizeof(EdgeBasedGraphHeader) + sizeof(extractor::EdgeBasedEdge) * graph_header.number_of_edges);
|
||||
reinterpret_cast<char *>(edge_based_graph_region.get_address()) +
|
||||
sizeof(EdgeBasedGraphHeader) +
|
||||
sizeof(extractor::EdgeBasedEdge) * graph_header.number_of_edges);
|
||||
|
||||
while (edge_based_edge_ptr != edge_based_edge_last)
|
||||
{
|
||||
@ -777,7 +781,8 @@ EdgeID Contractor::LoadEdgeExpandedGraph(
|
||||
{
|
||||
if (speed_iter->speed_source.speed > 0)
|
||||
{
|
||||
auto new_segment_weight = distanceAndSpeedToWeight(segmentblocks[i].segment_length, speed_iter->speed_source.speed);
|
||||
auto new_segment_weight = distanceAndSpeedToWeight(
|
||||
segmentblocks[i].segment_length, speed_iter->speed_source.speed);
|
||||
new_weight += new_segment_weight;
|
||||
}
|
||||
else
|
||||
|
@ -83,7 +83,8 @@ util::json::Array lanesFromIntersection(const guidance::Intersection &intersecti
|
||||
util::json::Object lane;
|
||||
lane.values["indications"] = extractor::guidance::TurnLaneType::toJsonArray(lane_desc);
|
||||
if (lane_id >= intersection.lanes.first_lane_from_the_right &&
|
||||
lane_id < intersection.lanes.first_lane_from_the_right + intersection.lanes.lanes_in_turn)
|
||||
lane_id <
|
||||
intersection.lanes.first_lane_from_the_right + intersection.lanes.lanes_in_turn)
|
||||
lane.values["valid"] = util::json::True();
|
||||
else
|
||||
lane.values["valid"] = util::json::False();
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "extractor/guidance/turn_instruction.hpp"
|
||||
#include "engine/guidance/post_processing.hpp"
|
||||
#include "extractor/guidance/turn_instruction.hpp"
|
||||
|
||||
#include "engine/guidance/assemble_steps.hpp"
|
||||
#include "engine/guidance/lane_processing.hpp"
|
||||
|
@ -116,8 +116,10 @@ std::vector<util::Coordinate> decodePolyline(const std::string &geometry_string)
|
||||
lng += dlng;
|
||||
|
||||
util::Coordinate p;
|
||||
p.lat = util::FixedLatitude{static_cast<std::int32_t>(lat * detail::POLYLINE_TO_COORDINATE)};
|
||||
p.lon = util::FixedLongitude{static_cast<std::int32_t>(lng * detail::POLYLINE_TO_COORDINATE)};
|
||||
p.lat =
|
||||
util::FixedLatitude{static_cast<std::int32_t>(lat * detail::POLYLINE_TO_COORDINATE)};
|
||||
p.lon =
|
||||
util::FixedLongitude{static_cast<std::int32_t>(lng * detail::POLYLINE_TO_COORDINATE)};
|
||||
new_coordinates.push_back(p);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "extractor/edge_based_edge.hpp"
|
||||
#include "extractor/edge_based_graph_factory.hpp"
|
||||
#include "extractor/edge_based_edge.hpp"
|
||||
#include "util/coordinate.hpp"
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
#include "util/exception.hpp"
|
||||
@ -422,7 +422,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
distance += profile_properties.traffic_signal_penalty;
|
||||
}
|
||||
|
||||
const int32_t turn_penalty = scripting_environment.GetTurnPenalty(180. - turn.angle);
|
||||
const int32_t turn_penalty =
|
||||
scripting_environment.GetTurnPenalty(180. - turn.angle);
|
||||
const auto turn_instruction = turn.instruction;
|
||||
|
||||
if (turn_instruction.direction_modifier == guidance::DirectionModifier::UTurn)
|
||||
|
@ -83,7 +83,8 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
|
||||
tbb::task_scheduler_init init(number_of_threads);
|
||||
|
||||
util::SimpleLogger().Write() << "Input file: " << config.input_path.filename().string();
|
||||
if (!config.profile_path.empty()) {
|
||||
if (!config.profile_path.empty())
|
||||
{
|
||||
util::SimpleLogger().Write() << "Profile: " << config.profile_path.filename().string();
|
||||
}
|
||||
util::SimpleLogger().Write() << "Threads: " << number_of_threads;
|
||||
@ -151,7 +152,6 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
|
||||
resulting_ways,
|
||||
resulting_restrictions);
|
||||
|
||||
|
||||
number_of_nodes += resulting_nodes.size();
|
||||
// put parsed objects thru extractor callbacks
|
||||
for (const auto &result : resulting_nodes)
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "extractor/extractor_callbacks.hpp"
|
||||
#include "extractor/external_memory_node.hpp"
|
||||
#include "extractor/extraction_containers.hpp"
|
||||
#include "extractor/extraction_node.hpp"
|
||||
#include "extractor/extraction_way.hpp"
|
||||
#include "extractor/extractor_callbacks.hpp"
|
||||
#include "extractor/guidance/road_classification.hpp"
|
||||
#include "extractor/restriction.hpp"
|
||||
|
||||
|
@ -160,7 +160,8 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
||||
* turn-lanes. Without this,we would have to treat any turn-lane beginning/ending just
|
||||
* like a barrier.
|
||||
*/
|
||||
const auto selectLaneID = [](const LaneDescriptionID front, const LaneDescriptionID back) {
|
||||
const auto selectLaneID = [](const LaneDescriptionID front,
|
||||
const LaneDescriptionID back) {
|
||||
// A lane has tags: u - (front) - v - (back) - w
|
||||
// During contraction, we keep only one of the tags. Usually the one closer to the
|
||||
// intersection is preferred. If its empty, however, we keep the non-empty one
|
||||
@ -168,10 +169,12 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
||||
return front;
|
||||
return back;
|
||||
};
|
||||
graph.GetEdgeData(forward_e1).lane_description_id = selectLaneID(
|
||||
graph.GetEdgeData(forward_e1).lane_description_id, fwd_edge_data2.lane_description_id);
|
||||
graph.GetEdgeData(reverse_e1).lane_description_id = selectLaneID(
|
||||
graph.GetEdgeData(reverse_e1).lane_description_id, rev_edge_data2.lane_description_id);
|
||||
graph.GetEdgeData(forward_e1).lane_description_id =
|
||||
selectLaneID(graph.GetEdgeData(forward_e1).lane_description_id,
|
||||
fwd_edge_data2.lane_description_id);
|
||||
graph.GetEdgeData(reverse_e1).lane_description_id =
|
||||
selectLaneID(graph.GetEdgeData(reverse_e1).lane_description_id,
|
||||
rev_edge_data2.lane_description_id);
|
||||
|
||||
// remove e2's (if bidir, otherwise only one)
|
||||
graph.DeleteEdge(node_v, forward_e2);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/intersection_handler.hpp"
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/toolkit.hpp"
|
||||
|
||||
#include "util/guidance/toolkit.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/motorway_handler.hpp"
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/road_classification.hpp"
|
||||
#include "extractor/guidance/toolkit.hpp"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "extractor/guidance/sliproad_handler.hpp"
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/intersection_scenario_three_way.hpp"
|
||||
#include "extractor/guidance/sliproad_handler.hpp"
|
||||
#include "extractor/guidance/toolkit.hpp"
|
||||
|
||||
#include "util/guidance/toolkit.hpp"
|
||||
@ -74,8 +74,7 @@ operator()(const NodeID, const EdgeID source_edge_id, Intersection intersection)
|
||||
const auto check_valid = [this, source_edge_data](const ConnectedRoad &road) {
|
||||
const auto road_edge_data = node_based_graph.GetEdgeData(road.turn.eid);
|
||||
// Test to see if the source edge and the one we're looking at are the same road
|
||||
return road_edge_data.road_classification ==
|
||||
source_edge_data.road_classification &&
|
||||
return road_edge_data.road_classification == source_edge_data.road_classification &&
|
||||
road_edge_data.name_id != EMPTY_NAMEID &&
|
||||
road_edge_data.name_id == source_edge_data.name_id && road.entry_allowed;
|
||||
};
|
||||
@ -143,8 +142,8 @@ operator()(const NodeID, const EdgeID source_edge_id, Intersection intersection)
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto skip_traffic_light_intersection =
|
||||
intersection_generator(node_based_graph.GetTarget(candidate_in), candidate_road.turn.eid);
|
||||
const auto skip_traffic_light_intersection = intersection_generator(
|
||||
node_based_graph.GetTarget(candidate_in), candidate_road.turn.eid);
|
||||
if (skip_traffic_light_intersection.size() == 2 &&
|
||||
node_based_graph.GetTarget(
|
||||
skip_traffic_light_intersection[1].turn.eid) ==
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "extractor/guidance/road_classification.hpp"
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/turn_analysis.hpp"
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/road_classification.hpp"
|
||||
|
||||
#include "util/coordinate.hpp"
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
@ -86,8 +86,7 @@ Intersection TurnAnalysis::assignTurnTypes(const NodeID from_nid,
|
||||
intersection = sliproad_handler(from_nid, via_eid, std::move(intersection));
|
||||
|
||||
// Turn On Ramps Into Off Ramps, if we come from a motorway-like road
|
||||
if (node_based_graph.GetEdgeData(via_eid)
|
||||
.road_classification.IsMotorwayClass())
|
||||
if (node_based_graph.GetEdgeData(via_eid).road_classification.IsMotorwayClass())
|
||||
{
|
||||
std::for_each(intersection.begin(), intersection.end(), [](ConnectedRoad &road) {
|
||||
if (road.turn.instruction.type == TurnType::OnRamp)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "extractor/guidance/turn_handler.hpp"
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/intersection_scenario_three_way.hpp"
|
||||
#include "extractor/guidance/toolkit.hpp"
|
||||
#include "extractor/guidance/turn_handler.hpp"
|
||||
|
||||
#include "util/guidance/toolkit.hpp"
|
||||
|
||||
|
@ -268,7 +268,8 @@ LaneDataVector handleNoneValueAtSimpleTurn(LaneDataVector lane_data,
|
||||
((intersection[0].entry_allowed && lane_data.back().tag != TurnLaneType::uturn) ? 1 : 0);
|
||||
|
||||
// TODO check for impossible turns to see whether the turn lane is at the correct place
|
||||
const std::size_t none_index = std::distance(lane_data.begin(), findTag(TurnLaneType::none, lane_data));
|
||||
const std::size_t none_index =
|
||||
std::distance(lane_data.begin(), findTag(TurnLaneType::none, lane_data));
|
||||
BOOST_ASSERT(none_index != lane_data.size());
|
||||
// we have to create multiple turns
|
||||
if (connection_count > lane_data.size())
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "extractor/guidance/turn_lane_handler.hpp"
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/turn_discovery.hpp"
|
||||
#include "extractor/guidance/turn_lane_augmentation.hpp"
|
||||
#include "extractor/guidance/turn_lane_handler.hpp"
|
||||
#include "extractor/guidance/turn_lane_matcher.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
@ -77,7 +77,9 @@ Intersection TurnLaneHandler::assignTurnLanes(const NodeID at,
|
||||
turn_lane_masks.begin() + turn_lane_offsets[data.lane_description_id + 1])
|
||||
: TurnLaneDescription();
|
||||
|
||||
BOOST_ASSERT( turn_lane_description.empty() || turn_lane_description.size() == (turn_lane_offsets[data.lane_description_id+1] - turn_lane_offsets[data.lane_description_id]));
|
||||
BOOST_ASSERT(turn_lane_description.empty() ||
|
||||
turn_lane_description.size() == (turn_lane_offsets[data.lane_description_id + 1] -
|
||||
turn_lane_offsets[data.lane_description_id]));
|
||||
|
||||
// going straight, due to traffic signals, we can have uncompressed geometry
|
||||
if (intersection.size() == 2 &&
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "extractor/guidance/toolkit.hpp"
|
||||
#include "extractor/guidance/turn_lane_matcher.hpp"
|
||||
#include "extractor/guidance/toolkit.hpp"
|
||||
#include "util/guidance/toolkit.hpp"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
@ -154,7 +154,8 @@ SourceContainer::GetRasterInterpolateFromSource(unsigned int source_id, double l
|
||||
BOOST_ASSERT(lon > -180);
|
||||
|
||||
const auto &found = LoadedSources[source_id];
|
||||
return found.GetRasterInterpolate(static_cast<std::int32_t>(util::toFixed(util::FloatLongitude{lon})),
|
||||
return found.GetRasterInterpolate(
|
||||
static_cast<std::int32_t>(util::toFixed(util::FloatLongitude{lon})),
|
||||
static_cast<std::int32_t>(util::toFixed(util::FloatLatitude{lat})));
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "storage/storage.hpp"
|
||||
#include "contractor/query_edge.hpp"
|
||||
#include "extractor/compressed_edge_container.hpp"
|
||||
#include "extractor/guidance/turn_instruction.hpp"
|
||||
@ -8,7 +9,6 @@
|
||||
#include "storage/shared_barriers.hpp"
|
||||
#include "storage/shared_datatype.hpp"
|
||||
#include "storage/shared_memory.hpp"
|
||||
#include "storage/storage.hpp"
|
||||
#include "engine/datafacade/datafacade_base.hpp"
|
||||
#include "util/coordinate.hpp"
|
||||
#include "util/exception.hpp"
|
||||
|
@ -284,8 +284,10 @@ Coordinate interpolateLinear(double factor, const Coordinate from, const Coordin
|
||||
const auto to_lon = static_cast<std::int32_t>(to.lon);
|
||||
const auto to_lat = static_cast<std::int32_t>(to.lat);
|
||||
|
||||
FixedLongitude interpolated_lon{static_cast<std::int32_t>(from_lon + factor * (to_lon - from_lon))};
|
||||
FixedLatitude interpolated_lat{static_cast<std::int32_t>(from_lat + factor * (to_lat - from_lat))};
|
||||
FixedLongitude interpolated_lon{
|
||||
static_cast<std::int32_t>(from_lon + factor * (to_lon - from_lon))};
|
||||
FixedLatitude interpolated_lat{
|
||||
static_cast<std::int32_t>(from_lat + factor * (to_lat - from_lat))};
|
||||
|
||||
return {std::move(interpolated_lon), std::move(interpolated_lat)};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user