diff --git a/include/extractor/extractor_config.hpp b/include/extractor/extractor_config.hpp index cf0f28b5696..793a5f33ddf 100644 --- a/include/extractor/extractor_config.hpp +++ b/include/extractor/extractor_config.hpp @@ -65,7 +65,8 @@ struct ExtractorConfig turn_lane_data_file_name = basepath + ".osrm.tld"; timestamp_file_name = basepath + ".osrm.timestamp"; geometry_output_path = basepath + ".osrm.geometry"; - node_output_path = basepath + ".osrm.nodes"; + node_based_nodes_data_path = basepath + ".osrm.nbg_nodes"; + edge_based_nodes_data_path = basepath + ".osrm.ebg_nodes"; edge_output_path = basepath + ".osrm.edges"; edge_graph_output_path = basepath + ".osrm.ebg"; rtree_nodes_output_path = basepath + ".osrm.ramIndex"; @@ -74,7 +75,6 @@ struct ExtractorConfig turn_weight_penalties_path = basepath + ".osrm.turn_weight_penalties"; turn_penalties_index_path = basepath + ".osrm.turn_penalties_index"; edge_based_node_weights_output_path = basepath + ".osrm.enw"; - edge_based_nodes_data_path = basepath + ".osrm.nodes_data"; profile_properties_output_path = basepath + ".osrm.properties"; intersection_class_data_output_path = basepath + ".osrm.icd"; compressed_node_based_graph_output_path = basepath + ".osrm.cnbg"; @@ -93,9 +93,9 @@ struct ExtractorConfig std::string geometry_output_path; std::string edge_output_path; std::string edge_graph_output_path; + std::string node_based_nodes_data_path; std::string edge_based_nodes_data_path; std::string edge_based_node_weights_output_path; - std::string node_output_path; std::string rtree_nodes_output_path; std::string rtree_leafs_output_path; std::string profile_properties_output_path; diff --git a/include/storage/storage_config.hpp b/include/storage/storage_config.hpp index fa71a0291ef..2841ec64631 100644 --- a/include/storage/storage_config.hpp +++ b/include/storage/storage_config.hpp @@ -55,9 +55,9 @@ struct StorageConfig final boost::filesystem::path ram_index_path; boost::filesystem::path file_index_path; boost::filesystem::path hsgr_data_path; - boost::filesystem::path nodes_data_path; - boost::filesystem::path edges_data_path; + boost::filesystem::path node_based_nodes_data_path; boost::filesystem::path edge_based_nodes_data_path; + boost::filesystem::path edges_data_path; boost::filesystem::path core_data_path; boost::filesystem::path geometries_path; boost::filesystem::path timestamp_path; diff --git a/include/updater/updater_config.hpp b/include/updater/updater_config.hpp index 751a0e0f5de..93cdde453fd 100644 --- a/include/updater/updater_config.hpp +++ b/include/updater/updater_config.hpp @@ -47,9 +47,9 @@ struct UpdaterConfig final turn_weight_penalties_path = osrm_input_path.string() + ".turn_weight_penalties"; turn_duration_penalties_path = osrm_input_path.string() + ".turn_duration_penalties"; turn_penalties_index_path = osrm_input_path.string() + ".turn_penalties_index"; - node_based_graph_path = osrm_input_path.string() + ".nodes"; + node_based_nodes_data_path = osrm_input_path.string() + ".nbg_nodes"; + edge_based_nodes_data_path = osrm_input_path.string() + ".ebg_nodes"; edge_data_path = osrm_input_path.string() + ".edges"; - edge_based_nodes_data_path = osrm_input_path.string() + ".nodes_data"; geometry_path = osrm_input_path.string() + ".geometry"; rtree_leaf_path = osrm_input_path.string() + ".fileIndex"; datasource_names_path = osrm_input_path.string() + ".datasource_names"; @@ -64,9 +64,9 @@ struct UpdaterConfig final std::string turn_weight_penalties_path; std::string turn_duration_penalties_path; std::string turn_penalties_index_path; - std::string node_based_graph_path; - std::string edge_data_path; + std::string node_based_nodes_data_path; std::string edge_based_nodes_data_path; + std::string edge_data_path; std::string geometry_path; std::string rtree_leaf_path; diff --git a/src/engine/engine_config.cpp b/src/engine/engine_config.cpp index 9d322486fe9..357aeff4e28 100644 --- a/src/engine/engine_config.cpp +++ b/src/engine/engine_config.cpp @@ -9,7 +9,9 @@ bool EngineConfig::IsValid() const { const bool all_path_are_empty = storage_config.ram_index_path.empty() && storage_config.file_index_path.empty() && - storage_config.hsgr_data_path.empty() && storage_config.nodes_data_path.empty() && + storage_config.hsgr_data_path.empty() && + storage_config.node_based_nodes_data_path.empty() && + storage_config.edge_based_nodes_data_path.empty() && storage_config.edges_data_path.empty() && storage_config.core_data_path.empty() && storage_config.geometries_path.empty() && storage_config.timestamp_path.empty() && storage_config.datasource_names_path.empty() && diff --git a/src/extractor/extractor.cpp b/src/extractor/extractor.cpp index 956f53ab235..c4ee9ff00e7 100644 --- a/src/extractor/extractor.cpp +++ b/src/extractor/extractor.cpp @@ -174,7 +174,7 @@ int Extractor::run(ScriptingEnvironment &scripting_environment) TIMER_STOP(rtree); util::Log() << "Writing nodes for nodes-based and edges-based graphs ..."; - files::writeNodes(config.node_output_path, coordinates, osm_node_ids); + files::writeNodes(config.node_based_nodes_data_path, coordinates, osm_node_ids); files::writeNodeData(config.edge_based_nodes_data_path, edge_based_nodes_container); WriteEdgeBasedGraph(config.edge_graph_output_path, max_edge_id, edge_based_edge_list); diff --git a/src/storage/storage.cpp b/src/storage/storage.cpp index 187b9dcc199..f97073ede35 100644 --- a/src/storage/storage.cpp +++ b/src/storage/storage.cpp @@ -327,7 +327,8 @@ void Storage::PopulateLayout(DataLayout &layout) // load coordinate size { - io::FileReader node_file(config.nodes_data_path, io::FileReader::VerifyFingerprint); + io::FileReader node_file(config.node_based_nodes_data_path, + io::FileReader::VerifyFingerprint); const auto coordinate_list_size = node_file.ReadElementCount64(); layout.SetBlockSize(DataLayout::COORDINATE_LIST, coordinate_list_size); node_file.Skip(coordinate_list_size); @@ -724,7 +725,7 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr) layout.num_entries[DataLayout::OSM_NODE_ID_LIST] * extractor::PackedOSMIDsView::BLOCK_ELEMENTS); - extractor::files::readNodes(config.nodes_data_path, coordinates, osm_node_ids); + extractor::files::readNodes(config.node_based_nodes_data_path, coordinates, osm_node_ids); } // load turn weight penalties diff --git a/src/storage/storage_config.cpp b/src/storage/storage_config.cpp index 2deca768147..968537b07fb 100644 --- a/src/storage/storage_config.cpp +++ b/src/storage/storage_config.cpp @@ -26,11 +26,11 @@ bool CheckFileList(const std::vector &files) StorageConfig::StorageConfig(const boost::filesystem::path &base) : ram_index_path{base.string() + ".ramIndex"}, file_index_path{base.string() + ".fileIndex"}, - hsgr_data_path{base.string() + ".hsgr"}, nodes_data_path{base.string() + ".nodes"}, - edges_data_path{base.string() + ".edges"}, - edge_based_nodes_data_path{base.string() + ".nodes_data"}, - core_data_path{base.string() + ".core"}, geometries_path{base.string() + ".geometry"}, - timestamp_path{base.string() + ".timestamp"}, + hsgr_data_path{base.string() + ".hsgr"}, + node_based_nodes_data_path{base.string() + ".nbg_nodes"}, + edge_based_nodes_data_path{base.string() + ".ebg_nodes"}, + edges_data_path{base.string() + ".edges"}, core_data_path{base.string() + ".core"}, + geometries_path{base.string() + ".geometry"}, timestamp_path{base.string() + ".timestamp"}, turn_weight_penalties_path{base.string() + ".turn_weight_penalties"}, turn_duration_penalties_path{base.string() + ".turn_duration_penalties"}, datasource_names_path{base.string() + ".datasource_names"}, @@ -47,7 +47,8 @@ bool StorageConfig::IsValid() const // Common files if (!CheckFileList({ram_index_path, file_index_path, - nodes_data_path, + node_based_nodes_data_path, + edge_based_nodes_data_path, edges_data_path, geometries_path, timestamp_path, diff --git a/src/tools/routed.cpp b/src/tools/routed.cpp index 9fa66b05453..e2510c5a2bc 100644 --- a/src/tools/routed.cpp +++ b/src/tools/routed.cpp @@ -229,55 +229,23 @@ int main(int argc, const char *argv[]) try } else { - if (!boost::filesystem::is_regular_file(config.storage_config.ram_index_path)) + auto required_files = {config.storage_config.ram_index_path, + config.storage_config.file_index_path, + config.storage_config.hsgr_data_path, + config.storage_config.node_based_nodes_data_path, + config.storage_config.edge_based_nodes_data_path, + config.storage_config.edges_data_path, + config.storage_config.core_data_path, + config.storage_config.geometries_path, + config.storage_config.datasource_indexes_path, + config.storage_config.names_data_path, + config.storage_config.properties_path}; + for (auto file : required_files) { - util::Log(logWARNING) << config.storage_config.ram_index_path << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.file_index_path)) - { - util::Log(logWARNING) << config.storage_config.file_index_path << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.hsgr_data_path)) - { - util::Log(logWARNING) << config.storage_config.hsgr_data_path << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.nodes_data_path)) - { - util::Log(logWARNING) << config.storage_config.nodes_data_path << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.edges_data_path)) - { - util::Log(logWARNING) << config.storage_config.edges_data_path << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.core_data_path)) - { - util::Log(logWARNING) << config.storage_config.core_data_path << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.geometries_path)) - { - util::Log(logWARNING) << config.storage_config.geometries_path << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.timestamp_path)) - { - util::Log(logWARNING) << config.storage_config.timestamp_path << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.datasource_names_path)) - { - util::Log(logWARNING) << config.storage_config.datasource_names_path - << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.datasource_indexes_path)) - { - util::Log(logWARNING) << config.storage_config.datasource_indexes_path - << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.names_data_path)) - { - util::Log(logWARNING) << config.storage_config.names_data_path << " is not found"; - } - if (!boost::filesystem::is_regular_file(config.storage_config.properties_path)) - { - util::Log(logWARNING) << config.storage_config.properties_path << " is not found"; + if (!boost::filesystem::is_regular_file(file)) + { + util::Log(logWARNING) << file << " is not found"; + } } } return EXIT_FAILURE; diff --git a/src/updater/updater.cpp b/src/updater/updater.cpp index 5bafe753448..97c86e81d99 100644 --- a/src/updater/updater.cpp +++ b/src/updater/updater.cpp @@ -100,7 +100,7 @@ void checkWeightsConsistency( extractor::files::readSegmentData(config.geometry_path, segment_data); extractor::EdgeBasedNodeDataContainer node_data; - extractor::files::readNodeData(config.osrm_input_path.string() + ".nodes_data", node_data); + extractor::files::readNodeData(config.osrm_input_path.string() + ".ebg_nodes", node_data); extractor::TurnDataContainer turn_data; extractor::files::readTurnData(config.osrm_input_path.string() + ".edges", turn_data); @@ -570,7 +570,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e TIMER_START(load_edges); EdgeID max_edge_id = 0; - std::vector node_coordinates; + std::vector coordinates; extractor::PackedOSMIDs osm_node_ids; { @@ -581,7 +581,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e max_edge_id = reader.ReadOne(); reader.ReadInto(edge_based_edge_list); - extractor::files::readNodes(config.node_based_graph_path, node_coordinates, osm_node_ids); + extractor::files::readNodes(config.node_based_nodes_data_path, coordinates, osm_node_ids); } const bool update_conditional_turns = @@ -664,7 +664,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e profile_properties, segment_speed_lookup, segment_data, - node_coordinates, + coordinates, osm_node_ids); // Now save out the updated compressed geometries extractor::files::writeSegmentData(config.geometry_path, segment_data); @@ -707,7 +707,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e auto updated_turn_penalties = updateConditionalTurns(config, turn_weight_penalties, conditional_turns, - node_coordinates, + coordinates, osm_node_ids, time_zone_handler); const auto offset = updated_segments.size();