Rename .nodes -> .nbg_nodes and .nodes_data -> .ebg_nodes
This commit is contained in:
committed by
Patrick Niklaus
parent
65de940882
commit
1a7cd785f2
@@ -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() &&
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<util::Coordinate>(DataLayout::COORDINATE_LIST, 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] *
|
||||
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
|
||||
|
||||
@@ -26,11 +26,11 @@ bool CheckFileList(const std::vector<boost::filesystem::path> &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,
|
||||
|
||||
+16
-48
@@ -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;
|
||||
|
||||
@@ -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<extractor::EdgeBasedEdge> &e
|
||||
TIMER_START(load_edges);
|
||||
|
||||
EdgeID max_edge_id = 0;
|
||||
std::vector<util::Coordinate> node_coordinates;
|
||||
std::vector<util::Coordinate> coordinates;
|
||||
extractor::PackedOSMIDs osm_node_ids;
|
||||
|
||||
{
|
||||
@@ -581,7 +581,7 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
|
||||
max_edge_id = reader.ReadOne<EdgeID>();
|
||||
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<extractor::EdgeBasedEdge> &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<extractor::EdgeBasedEdge> &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();
|
||||
|
||||
Reference in New Issue
Block a user