Apply clang-format again
This commit is contained in:
@@ -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"
|
||||
@@ -63,8 +63,8 @@ Intersection TurnLaneHandler::assignTurnLanes(const NodeID at,
|
||||
Intersection intersection,
|
||||
LaneDataIdMap &id_map) const
|
||||
{
|
||||
//if only a uturn exists, there is nothing we can do
|
||||
if( intersection.size() == 1 )
|
||||
// if only a uturn exists, there is nothing we can do
|
||||
if (intersection.size() == 1)
|
||||
return intersection;
|
||||
|
||||
const auto &data = node_based_graph.GetEdgeData(via_edge);
|
||||
@@ -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,8 +154,9 @@ 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})),
|
||||
static_cast<std::int32_t>(util::toFixed(util::FloatLatitude{lat})));
|
||||
return found.GetRasterInterpolate(
|
||||
static_cast<std::int32_t>(util::toFixed(util::FloatLongitude{lon})),
|
||||
static_cast<std::int32_t>(util::toFixed(util::FloatLatitude{lat})));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user