Fix rebase problems

This commit is contained in:
Pepijn Schoen 2017-05-23 17:37:41 +02:00 committed by Daniel J. H
parent 67fae1d1f0
commit 5a6dee80ac
5 changed files with 23 additions and 23 deletions

View File

@ -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 <typename NodeDataT>
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 <typename NodeDataT>
inline void writeNodeData(const boost::filesystem::path &path, const NodeDataT &node_data)
{

View File

@ -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;
};
}

View File

@ -51,6 +51,7 @@ struct UpdaterConfig final : storage::IOConfig
std::vector<std::string> segment_speed_lookup_paths;
std::vector<std::string> turn_penalty_lookup_paths;
std::string tz_file_path;
};
}
}

View File

@ -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<std::string> 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<EdgeBasedNodeSegment> edge_based_node_seg
edge_based_node_segments.resize(new_size);
TIMER_START(construction);
util::StaticRTree<EdgeBasedNode> rtree(edge_based_node_segments,
config.ram_index_path.string(),
config.file_index_path.string(),
coordinates);
util::StaticRTree<EdgeBasedNodeSegment> 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";

View File

@ -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);