Fix formating
This commit is contained in:
committed by
Patrick Niklaus
parent
d94017dfae
commit
4ec7ca29f1
@@ -48,7 +48,7 @@ int Contractor::Run()
|
||||
std::vector<EdgeWeight> node_weights;
|
||||
{
|
||||
storage::io::FileReader reader(config.node_file_path,
|
||||
storage::io::FileReader::VerifyFingerprint);
|
||||
storage::io::FileReader::VerifyFingerprint);
|
||||
storage::serialization::read(reader, node_weights);
|
||||
}
|
||||
util::Log() << "Done reading node weights.";
|
||||
|
||||
@@ -95,9 +95,7 @@ util::Coordinate CoordinateExtractor::ExtractRepresentativeCoordinate(
|
||||
{
|
||||
// check if the coordinate is equal to the interseciton coordinate
|
||||
const auto not_same_as_start = [&](const util::Coordinate coordinate) {
|
||||
return node_coordinates[traversed_in_reverse
|
||||
? to_node
|
||||
: intersection_node] != coordinate;
|
||||
return node_coordinates[traversed_in_reverse ? to_node : intersection_node] != coordinate;
|
||||
};
|
||||
// this is only used for debug purposes in assertions. We don't want warnings about it
|
||||
(void)not_same_as_start;
|
||||
|
||||
@@ -14,12 +14,11 @@ namespace extractor
|
||||
namespace guidance
|
||||
{
|
||||
|
||||
IntersectionNormalizer::IntersectionNormalizer(
|
||||
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator)
|
||||
IntersectionNormalizer::IntersectionNormalizer(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator)
|
||||
: node_based_graph(node_based_graph), intersection_generator(intersection_generator),
|
||||
mergable_road_detector(node_based_graph,
|
||||
coordinates,
|
||||
|
||||
@@ -34,11 +34,9 @@ TurnAnalysis::TurnAnalysis(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const ProfileProperties &profile_properties)
|
||||
: node_based_graph(node_based_graph), intersection_generator(node_based_graph,
|
||||
restriction_map,
|
||||
barrier_nodes,
|
||||
coordinates,
|
||||
compressed_edge_container),
|
||||
: node_based_graph(node_based_graph),
|
||||
intersection_generator(
|
||||
node_based_graph, restriction_map, barrier_nodes, coordinates, compressed_edge_container),
|
||||
intersection_normalizer(node_based_graph,
|
||||
coordinates,
|
||||
name_table,
|
||||
|
||||
@@ -42,7 +42,8 @@ std::size_t loadGraph(const std::string &path,
|
||||
|
||||
auto nop = boost::make_function_output_iterator([](auto) {});
|
||||
|
||||
const auto number_of_nodes = util::loadNodesFromFile(file_reader, nop, nop, coordinate_list, osm_node_ids);
|
||||
const auto number_of_nodes =
|
||||
util::loadNodesFromFile(file_reader, nop, nop, coordinate_list, osm_node_ids);
|
||||
|
||||
util::loadEdgesFromFile(file_reader, edge_list);
|
||||
|
||||
@@ -75,10 +76,11 @@ struct FeatureWriter
|
||||
out << "{\"type\":\"FeatureCollection\",\"features\":[";
|
||||
}
|
||||
|
||||
void
|
||||
AddLine(const util::Coordinate from, const util::Coordinate to,
|
||||
const OSMNodeID from_id, const OSMNodeID to_id,
|
||||
const std::string &type)
|
||||
void AddLine(const util::Coordinate from,
|
||||
const util::Coordinate to,
|
||||
const OSMNodeID from_id,
|
||||
const OSMNodeID to_id,
|
||||
const std::string &type)
|
||||
{
|
||||
const auto from_lon = static_cast<double>(util::toFloating(from.lon));
|
||||
const auto from_lat = static_cast<double>(util::toFloating(from.lat));
|
||||
@@ -189,7 +191,11 @@ int main(int argc, char *argv[])
|
||||
auto same_component = source_component_id == target_component_id;
|
||||
std::string type = same_component ? "inner" : "border";
|
||||
|
||||
writer.AddLine(coordinate_list[source], coordinate_list[target], osm_node_ids[source], osm_node_ids[target], type);
|
||||
writer.AddLine(coordinate_list[source],
|
||||
coordinate_list[target],
|
||||
osm_node_ids[source],
|
||||
osm_node_ids[target],
|
||||
type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user