diff --git a/include/extractor/files.hpp b/include/extractor/files.hpp index b5e909685..e28740110 100644 --- a/include/extractor/files.hpp +++ b/include/extractor/files.hpp @@ -225,7 +225,7 @@ inline void writeTurnData(const boost::filesystem::path &path, const TurnDataT & serialization::write(writer, turn_data); } -// reads .osrm.nodes_data +// reads .osrm.ebg_nodes template inline void readNodeData(const boost::filesystem::path &path, NodeDataT &node_data) { @@ -239,7 +239,7 @@ inline void readNodeData(const boost::filesystem::path &path, NodeDataT &node_da serialization::read(reader, node_data); } -// writes .osrm.nodes_data +// writes .osrm.ebg_nodes template inline void writeNodeData(const boost::filesystem::path &path, const NodeDataT &node_data) { diff --git a/include/storage/io_config.hpp b/include/storage/io_config.hpp index ece13f50b..2ff190f06 100644 --- a/include/storage/io_config.hpp +++ b/include/storage/io_config.hpp @@ -38,11 +38,12 @@ struct IOConfig mld_graph_path = {osrm_path.string() + ".mldgr"}; level_path = {osrm_path.string() + ".level"}; node_path = {osrm_path.string() + ".enw"}; - edge_based_nodes_data_path = {osrm_path.string() + ".nodes_data"}; + edge_based_nodes_data_path = {osrm_path.string() + ".ebg_nodes"}; + node_based_nodes_data_path = {osrm_path.string() + ".nbg_nodes"}; edge_based_graph_path = {osrm_path.string() + ".ebg"}; compressed_node_based_graph_path = {osrm_path.string() + ".cnbg"}; cnbg_ebg_mapping_path = {osrm_path.string() + ".cnbg_to_ebg"}; - restriction_path = {osrm_path.string() + ".restrictions"}; + turn_restrictions_path = {osrm_path.string() + ".restrictions"}; intersection_class_data_path = {osrm_path.string() + ".icd"}; } @@ -72,10 +73,11 @@ struct IOConfig boost::filesystem::path level_path; boost::filesystem::path node_path; boost::filesystem::path edge_based_nodes_data_path; + boost::filesystem::path node_based_nodes_data_path; boost::filesystem::path edge_based_graph_path; boost::filesystem::path compressed_node_based_graph_path; boost::filesystem::path cnbg_ebg_mapping_path; - boost::filesystem::path restriction_path; + boost::filesystem::path turn_restrictions_path; boost::filesystem::path intersection_class_data_path; }; } diff --git a/include/updater/updater_config.hpp b/include/updater/updater_config.hpp index ba3e36854..5b0c930d1 100644 --- a/include/updater/updater_config.hpp +++ b/include/updater/updater_config.hpp @@ -51,6 +51,7 @@ struct UpdaterConfig final : storage::IOConfig std::vector segment_speed_lookup_paths; std::vector turn_penalty_lookup_paths; + std::string tz_file_path; }; } } diff --git a/src/extractor/extractor.cpp b/src/extractor/extractor.cpp index 45c4c265b..72e6f200e 100644 --- a/src/extractor/extractor.cpp +++ b/src/extractor/extractor.cpp @@ -134,7 +134,7 @@ int Extractor::run(ScriptingEnvironment &scripting_environment) node_is_startpoint, edge_based_node_weights, edge_based_edge_list, - config.intersection_class_data_output_path, + config.intersection_class_path.string(), turn_restrictions, turn_lane_map); @@ -146,7 +146,7 @@ int Extractor::run(ScriptingEnvironment &scripting_environment) util::Log() << "Saving edge-based node weights to file."; TIMER_START(timer_write_node_weights); { - storage::io::FileWriter writer(config.edge_based_node_weights_output_path, + storage::io::FileWriter writer(config.node_path, storage::io::FileWriter::GenerateFingerprint); storage::serialization::write(writer, edge_based_node_weights); } @@ -183,7 +183,7 @@ int Extractor::run(ScriptingEnvironment &scripting_environment) util::Log() << "Expansion: " << nodes_per_second << " nodes/sec and " << edges_per_second << " edges/sec"; util::Log() << "To prepare the data for routing, run: " - << "./osrm-contract " << config.output_file_name; + << "./osrm-contract " << config.osrm_path; return 0; } @@ -239,13 +239,10 @@ Extractor::ParseOSMData(ScriptingEnvironment &scripting_environment, } util::Log() << "timestamp: " << timestamp; - extraction_containers.PrepareData(scripting_environment, - config.osrm_path.string(), - config.restriction_path.string(), - config.names_data_path.string()); + storage::io::FileWriter timestamp_file(config.timestamp_path, + storage::io::FileWriter::GenerateFingerprint); - WriteProfileProperties(config.properties_path.string(), - scripting_environment.GetProfileProperties()); + timestamp_file.WriteFrom(timestamp.c_str(), timestamp.length()); std::vector restrictions = scripting_environment.GetRestrictions(); // setup restriction parser @@ -333,13 +330,13 @@ Extractor::ParseOSMData(ScriptingEnvironment &scripting_environment, } extraction_containers.PrepareData(scripting_environment, - config.output_file_name, - config.restriction_file_name, - config.names_file_name); + config.osrm_path.string(), + config.turn_restrictions_path.string(), + config.names_data_path.string()); auto profile_properties = scripting_environment.GetProfileProperties(); SetClassNames(classes_map, profile_properties); - files::writeProfileProperties(config.profile_properties_path, profile_properties); + files::writeProfileProperties(config.properties_path.string(), profile_properties); TIMER_STOP(extracting); util::Log() << "extraction finished after " << TIMER_SEC(extracting) << "s"; @@ -585,10 +582,10 @@ void Extractor::BuildRTree(std::vector edge_based_node_seg edge_based_node_segments.resize(new_size); TIMER_START(construction); - util::StaticRTree rtree(edge_based_node_segments, - config.ram_index_path.string(), - config.file_index_path.string(), - coordinates); + util::StaticRTree rtree(edge_based_node_segments, + config.ram_index_path.string(), + config.file_index_path.string(), + coordinates); TIMER_STOP(construction); util::Log() << "finished r-tree construction in " << TIMER_SEC(construction) << " seconds"; diff --git a/src/updater/updater.cpp b/src/updater/updater.cpp index d09182c23..53b2dcb20 100644 --- a/src/updater/updater.cpp +++ b/src/updater/updater.cpp @@ -108,7 +108,7 @@ void checkWeightsConsistency( extractor::files::readSegmentData(config.geometries_path, segment_data); extractor::EdgeBasedNodeDataContainer node_data; - extractor::files::readNodeData(config.osrm_path.string() + ".ebg_nodes", node_data); + extractor::files::readNodeData(config.edge_based_nodes_data_path, node_data); extractor::TurnDataContainer turn_data; extractor::files::readTurnData(config.edges_data_path, turn_data);