/srv/osrm/osrm-backend/include/extractor
NameSizeModeActions
intersection/-0755rm
class_data.hpp9810644editdlrm
compressed_edge_container.hpp33360644editdlrm
compressed_node_based_graph_edge.hpp4180644editdlrm
conditional_turn_penalty.hpp5890644editdlrm
datasources.hpp12070644editdlrm
edge_based_edge.hpp34670644editdlrm
edge_based_graph_factory.hpp77870644editdlrm
edge_based_node.hpp3830644editdlrm
edge_based_node_segment.hpp20500644editdlrm
extraction_containers.hpp36790644editdlrm
extraction_helper_functions.hpp48270644editdlrm
extraction_node.hpp4590644editdlrm
extraction_relation.hpp59490644editdlrm
extraction_segment.hpp7150644editdlrm
extraction_turn.hpp49830644editdlrm
extraction_way.hpp42680644editdlrm
extractor.hpp52670644editdlrm
extractor_callbacks.hpp32490644editdlrm
extractor_config.hpp30400644editdlrm
files.hpp243720644editdlrm
graph_compressor.hpp12710644editdlrm
internal_extractor_edge.hpp26420644editdlrm
intersection_bearings_container.hpp44870644editdlrm
location_dependent_data.hpp17970644editdlrm
maneuver_override.hpp54560644editdlrm
maneuver_override_relation_parser.hpp17850644editdlrm
name_table.hpp35960644editdlrm
nbg_to_ebg.hpp4500644editdlrm
nodes_of_way.hpp14110644editdlrm
node_based_edge.hpp80240644editdlrm
node_based_graph_factory.hpp51550644editdlrm
node_data_container.hpp45580644editdlrm
node_restriction_map.hpp22920644editdlrm
packed_osm_ids.hpp5200644editdlrm
profile_properties.hpp50290644editdlrm
query_node.hpp14110644editdlrm
raster_source.hpp50020644editdlrm
restriction.hpp17500644editdlrm
restriction_graph.hpp45000644editdlrm
restriction_parser.hpp17680644editdlrm
road_classification.hpp83900644editdlrm
scripting_environment.hpp24260644editdlrm
scripting_environment_lua.hpp42530644editdlrm
segment_data_container.hpp80320644editdlrm
serialization.hpp88340644editdlrm
suffix_table.hpp14070644editdlrm
traffic_lights.hpp5140644editdlrm
traffic_signals.hpp6560644editdlrm
travel_mode.hpp36660644editdlrm
turn_lane_types.hpp37540644editdlrm
turn_path.hpp74830644editdlrm
turn_path_compressor.hpp22200644editdlrm
turn_path_filter.hpp6690644editdlrm
way_restriction_map.hpp31140644editdlrm
Edit: /srv/osrm/osrm-backend/include/extractor/node_based_graph_factory.hpp (5155B)
#ifndef OSRM_EXTRACTOR_NODE_BASED_GRAPH_FACTORY_HPP_ #define OSRM_EXTRACTOR_NODE_BASED_GRAPH_FACTORY_HPP_ #include "extractor/compressed_edge_container.hpp" #include "extractor/maneuver_override.hpp" #include "extractor/node_based_edge.hpp" #include "extractor/node_data_container.hpp" #include "extractor/packed_osm_ids.hpp" #include "extractor/scripting_environment.hpp" #include "traffic_signals.hpp" #include "util/coordinate.hpp" #include "util/node_based_graph.hpp" #include #include #include #include #include namespace osrm::extractor { // Turn the output of the extraction process into a graph that represents junctions as nodes and // ways as edges between these nodes. The graph forms the further input for OSRMs creation of the // edge-based graph and is also the basic concept for annotating paths. All information from ways // that is transferred into the API response is connected to the edges of the node-based graph. // // The input to the graph creation is the set of edges, traffic signals, barriers, meta-data,... // which is generated during extraction and stored within the extraction containers. class NodeBasedGraphFactory { public: // The node-based graph factory transforms the graph data into the // node-based graph to represent the OSM network. This includes geometry compression, annotation // data optimisation and many other aspects. After this step, the edge-based graph factory can // turn the graph into the routing graph to be used with the navigation algorithms. NodeBasedGraphFactory(ScriptingEnvironment &scripting_environment, std::vector &turn_restrictions, std::vector &maneuver_overrides, const TrafficSignals &traffic_signals, std::unordered_set &&barriers, std::vector &&coordinates, extractor::PackedOSMIDs &&osm_node_ids, const std::vector &edge_list, std::vector &&annotation_data); auto const &GetGraph() const { return compressed_output_graph; } auto const &GetBarriers() const { return barriers; } auto const &GetCompressedEdges() const { return compressed_edge_container; } auto const &GetCoordinates() const { return coordinates; } auto const &GetAnnotationData() const { return annotation_data; } auto const &GetOsmNodes() const { return osm_node_ids; } auto &GetCompressedEdges() { return compressed_edge_container; } auto &GetCoordinates() { return coordinates; } auto &GetAnnotationData() { return annotation_data; } auto &GetOsmNodes() { return osm_node_ids; } // to reduce the memory footprint, the node-based graph factory allows releasing memory after it // might have been used for the last time: void ReleaseOsmNodes(); private: // Build and validate compressed output graph void BuildCompressedOutputGraph(const std::vector &edge_list); // Compress the node-based graph into a compact representation of itself. This removes storing a // single edge for every part of the geometry and might also combine meta-data for multiple // edges into a single representative form void Compress(ScriptingEnvironment &scripting_environment, std::vector &turn_restrictions, std::vector &maneuver_overrides, const TrafficSignals &traffic_signals); // Most ways are bidirectional, making the geometry in forward and backward direction the same, // except for reversal. We make use of this fact by keeping only one representation of the // geometry around void CompressGeometry(); // After graph compression, some of the annotation entries might not be referenced anymore. We // compress the annotation data by relabeling the node-based graph references and removing all // unreferenced entries void CompressAnnotationData(); // After produce, this will contain a compressed version of the node-based graph util::NodeBasedDynamicGraph compressed_output_graph; // To store the meta-data for the graph that is purely annotative / not used for the navigation // itself. Since the edges of a node-based graph form the nodes of the edge based graphs, we // transform this data into the EdgeBasedNodeDataContainer as output storage. std::vector annotation_data; // General Information about the graph, not used outside of extractor std::unordered_set barriers; std::vector coordinates; // data to keep in sync with the node-based graph extractor::PackedOSMIDs osm_node_ids; // for the compressed geometry extractor::CompressedEdgeContainer compressed_edge_container; }; } // namespace osrm::extractor #endif // OSRM_EXTRACTOR_NODE_BASED_GRAPH_FACTORY_HPP_