Rename .nodes -> .nbg_nodes and .nodes_data -> .ebg_nodes
This commit is contained in:
parent
65de940882
commit
1a7cd785f2
@ -65,7 +65,8 @@ struct ExtractorConfig
|
|||||||
turn_lane_data_file_name = basepath + ".osrm.tld";
|
turn_lane_data_file_name = basepath + ".osrm.tld";
|
||||||
timestamp_file_name = basepath + ".osrm.timestamp";
|
timestamp_file_name = basepath + ".osrm.timestamp";
|
||||||
geometry_output_path = basepath + ".osrm.geometry";
|
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_output_path = basepath + ".osrm.edges";
|
||||||
edge_graph_output_path = basepath + ".osrm.ebg";
|
edge_graph_output_path = basepath + ".osrm.ebg";
|
||||||
rtree_nodes_output_path = basepath + ".osrm.ramIndex";
|
rtree_nodes_output_path = basepath + ".osrm.ramIndex";
|
||||||
@ -74,7 +75,6 @@ struct ExtractorConfig
|
|||||||
turn_weight_penalties_path = basepath + ".osrm.turn_weight_penalties";
|
turn_weight_penalties_path = basepath + ".osrm.turn_weight_penalties";
|
||||||
turn_penalties_index_path = basepath + ".osrm.turn_penalties_index";
|
turn_penalties_index_path = basepath + ".osrm.turn_penalties_index";
|
||||||
edge_based_node_weights_output_path = basepath + ".osrm.enw";
|
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";
|
profile_properties_output_path = basepath + ".osrm.properties";
|
||||||
intersection_class_data_output_path = basepath + ".osrm.icd";
|
intersection_class_data_output_path = basepath + ".osrm.icd";
|
||||||
compressed_node_based_graph_output_path = basepath + ".osrm.cnbg";
|
compressed_node_based_graph_output_path = basepath + ".osrm.cnbg";
|
||||||
@ -93,9 +93,9 @@ struct ExtractorConfig
|
|||||||
std::string geometry_output_path;
|
std::string geometry_output_path;
|
||||||
std::string edge_output_path;
|
std::string edge_output_path;
|
||||||
std::string edge_graph_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_nodes_data_path;
|
||||||
std::string edge_based_node_weights_output_path;
|
std::string edge_based_node_weights_output_path;
|
||||||
std::string node_output_path;
|
|
||||||
std::string rtree_nodes_output_path;
|
std::string rtree_nodes_output_path;
|
||||||
std::string rtree_leafs_output_path;
|
std::string rtree_leafs_output_path;
|
||||||
std::string profile_properties_output_path;
|
std::string profile_properties_output_path;
|
||||||
|
@ -55,9 +55,9 @@ struct StorageConfig final
|
|||||||
boost::filesystem::path ram_index_path;
|
boost::filesystem::path ram_index_path;
|
||||||
boost::filesystem::path file_index_path;
|
boost::filesystem::path file_index_path;
|
||||||
boost::filesystem::path hsgr_data_path;
|
boost::filesystem::path hsgr_data_path;
|
||||||
boost::filesystem::path nodes_data_path;
|
boost::filesystem::path node_based_nodes_data_path;
|
||||||
boost::filesystem::path edges_data_path;
|
|
||||||
boost::filesystem::path edge_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 core_data_path;
|
||||||
boost::filesystem::path geometries_path;
|
boost::filesystem::path geometries_path;
|
||||||
boost::filesystem::path timestamp_path;
|
boost::filesystem::path timestamp_path;
|
||||||
|
@ -47,9 +47,9 @@ struct UpdaterConfig final
|
|||||||
turn_weight_penalties_path = osrm_input_path.string() + ".turn_weight_penalties";
|
turn_weight_penalties_path = osrm_input_path.string() + ".turn_weight_penalties";
|
||||||
turn_duration_penalties_path = osrm_input_path.string() + ".turn_duration_penalties";
|
turn_duration_penalties_path = osrm_input_path.string() + ".turn_duration_penalties";
|
||||||
turn_penalties_index_path = osrm_input_path.string() + ".turn_penalties_index";
|
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_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";
|
geometry_path = osrm_input_path.string() + ".geometry";
|
||||||
rtree_leaf_path = osrm_input_path.string() + ".fileIndex";
|
rtree_leaf_path = osrm_input_path.string() + ".fileIndex";
|
||||||
datasource_names_path = osrm_input_path.string() + ".datasource_names";
|
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_weight_penalties_path;
|
||||||
std::string turn_duration_penalties_path;
|
std::string turn_duration_penalties_path;
|
||||||
std::string turn_penalties_index_path;
|
std::string turn_penalties_index_path;
|
||||||
std::string node_based_graph_path;
|
std::string node_based_nodes_data_path;
|
||||||
std::string edge_data_path;
|
|
||||||
std::string edge_based_nodes_data_path;
|
std::string edge_based_nodes_data_path;
|
||||||
|
std::string edge_data_path;
|
||||||
std::string geometry_path;
|
std::string geometry_path;
|
||||||
std::string rtree_leaf_path;
|
std::string rtree_leaf_path;
|
||||||
|
|
||||||
|
@ -9,7 +9,9 @@ bool EngineConfig::IsValid() const
|
|||||||
{
|
{
|
||||||
const bool all_path_are_empty =
|
const bool all_path_are_empty =
|
||||||
storage_config.ram_index_path.empty() && storage_config.file_index_path.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.edges_data_path.empty() && storage_config.core_data_path.empty() &&
|
||||||
storage_config.geometries_path.empty() && storage_config.timestamp_path.empty() &&
|
storage_config.geometries_path.empty() && storage_config.timestamp_path.empty() &&
|
||||||
storage_config.datasource_names_path.empty() &&
|
storage_config.datasource_names_path.empty() &&
|
||||||
|
@ -174,7 +174,7 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
|
|||||||
TIMER_STOP(rtree);
|
TIMER_STOP(rtree);
|
||||||
|
|
||||||
util::Log() << "Writing nodes for nodes-based and edges-based graphs ...";
|
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);
|
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);
|
WriteEdgeBasedGraph(config.edge_graph_output_path, max_edge_id, edge_based_edge_list);
|
||||||
|
@ -327,7 +327,8 @@ void Storage::PopulateLayout(DataLayout &layout)
|
|||||||
|
|
||||||
// load coordinate size
|
// 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();
|
const auto coordinate_list_size = node_file.ReadElementCount64();
|
||||||
layout.SetBlockSize<util::Coordinate>(DataLayout::COORDINATE_LIST, coordinate_list_size);
|
layout.SetBlockSize<util::Coordinate>(DataLayout::COORDINATE_LIST, coordinate_list_size);
|
||||||
node_file.Skip<util::Coordinate>(coordinate_list_size);
|
node_file.Skip<util::Coordinate>(coordinate_list_size);
|
||||||
@ -724,7 +725,7 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr)
|
|||||||
layout.num_entries[DataLayout::OSM_NODE_ID_LIST] *
|
layout.num_entries[DataLayout::OSM_NODE_ID_LIST] *
|
||||||
extractor::PackedOSMIDsView::BLOCK_ELEMENTS);
|
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
|
// load turn weight penalties
|
||||||
|
@ -26,11 +26,11 @@ bool CheckFileList(const std::vector<boost::filesystem::path> &files)
|
|||||||
|
|
||||||
StorageConfig::StorageConfig(const boost::filesystem::path &base)
|
StorageConfig::StorageConfig(const boost::filesystem::path &base)
|
||||||
: ram_index_path{base.string() + ".ramIndex"}, file_index_path{base.string() + ".fileIndex"},
|
: ram_index_path{base.string() + ".ramIndex"}, file_index_path{base.string() + ".fileIndex"},
|
||||||
hsgr_data_path{base.string() + ".hsgr"}, nodes_data_path{base.string() + ".nodes"},
|
hsgr_data_path{base.string() + ".hsgr"},
|
||||||
edges_data_path{base.string() + ".edges"},
|
node_based_nodes_data_path{base.string() + ".nbg_nodes"},
|
||||||
edge_based_nodes_data_path{base.string() + ".nodes_data"},
|
edge_based_nodes_data_path{base.string() + ".ebg_nodes"},
|
||||||
core_data_path{base.string() + ".core"}, geometries_path{base.string() + ".geometry"},
|
edges_data_path{base.string() + ".edges"}, core_data_path{base.string() + ".core"},
|
||||||
timestamp_path{base.string() + ".timestamp"},
|
geometries_path{base.string() + ".geometry"}, timestamp_path{base.string() + ".timestamp"},
|
||||||
turn_weight_penalties_path{base.string() + ".turn_weight_penalties"},
|
turn_weight_penalties_path{base.string() + ".turn_weight_penalties"},
|
||||||
turn_duration_penalties_path{base.string() + ".turn_duration_penalties"},
|
turn_duration_penalties_path{base.string() + ".turn_duration_penalties"},
|
||||||
datasource_names_path{base.string() + ".datasource_names"},
|
datasource_names_path{base.string() + ".datasource_names"},
|
||||||
@ -47,7 +47,8 @@ bool StorageConfig::IsValid() const
|
|||||||
// Common files
|
// Common files
|
||||||
if (!CheckFileList({ram_index_path,
|
if (!CheckFileList({ram_index_path,
|
||||||
file_index_path,
|
file_index_path,
|
||||||
nodes_data_path,
|
node_based_nodes_data_path,
|
||||||
|
edge_based_nodes_data_path,
|
||||||
edges_data_path,
|
edges_data_path,
|
||||||
geometries_path,
|
geometries_path,
|
||||||
timestamp_path,
|
timestamp_path,
|
||||||
|
@ -229,55 +229,23 @@ int main(int argc, const char *argv[]) try
|
|||||||
}
|
}
|
||||||
else
|
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(file))
|
||||||
}
|
{
|
||||||
if (!boost::filesystem::is_regular_file(config.storage_config.file_index_path))
|
util::Log(logWARNING) << file << " is not found";
|
||||||
{
|
}
|
||||||
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";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
@ -100,7 +100,7 @@ void checkWeightsConsistency(
|
|||||||
extractor::files::readSegmentData(config.geometry_path, segment_data);
|
extractor::files::readSegmentData(config.geometry_path, segment_data);
|
||||||
|
|
||||||
extractor::EdgeBasedNodeDataContainer node_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::TurnDataContainer turn_data;
|
||||||
extractor::files::readTurnData(config.osrm_input_path.string() + ".edges", turn_data);
|
extractor::files::readTurnData(config.osrm_input_path.string() + ".edges", turn_data);
|
||||||
@ -570,7 +570,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
|
|||||||
TIMER_START(load_edges);
|
TIMER_START(load_edges);
|
||||||
|
|
||||||
EdgeID max_edge_id = 0;
|
EdgeID max_edge_id = 0;
|
||||||
std::vector<util::Coordinate> node_coordinates;
|
std::vector<util::Coordinate> coordinates;
|
||||||
extractor::PackedOSMIDs osm_node_ids;
|
extractor::PackedOSMIDs osm_node_ids;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -581,7 +581,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
|
|||||||
max_edge_id = reader.ReadOne<EdgeID>();
|
max_edge_id = reader.ReadOne<EdgeID>();
|
||||||
reader.ReadInto(edge_based_edge_list);
|
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 =
|
const bool update_conditional_turns =
|
||||||
@ -664,7 +664,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
|
|||||||
profile_properties,
|
profile_properties,
|
||||||
segment_speed_lookup,
|
segment_speed_lookup,
|
||||||
segment_data,
|
segment_data,
|
||||||
node_coordinates,
|
coordinates,
|
||||||
osm_node_ids);
|
osm_node_ids);
|
||||||
// Now save out the updated compressed geometries
|
// Now save out the updated compressed geometries
|
||||||
extractor::files::writeSegmentData(config.geometry_path, segment_data);
|
extractor::files::writeSegmentData(config.geometry_path, segment_data);
|
||||||
@ -707,7 +707,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
|
|||||||
auto updated_turn_penalties = updateConditionalTurns(config,
|
auto updated_turn_penalties = updateConditionalTurns(config,
|
||||||
turn_weight_penalties,
|
turn_weight_penalties,
|
||||||
conditional_turns,
|
conditional_turns,
|
||||||
node_coordinates,
|
coordinates,
|
||||||
osm_node_ids,
|
osm_node_ids,
|
||||||
time_zone_handler);
|
time_zone_handler);
|
||||||
const auto offset = updated_segments.size();
|
const auto offset = updated_segments.size();
|
||||||
|
Loading…
Reference in New Issue
Block a user