Deprecate .osrm file
This commit is contained in:
parent
af8059f79b
commit
5fab7ba94d
@ -45,7 +45,6 @@ class ExtractionContainers
|
|||||||
|
|
||||||
void WriteNodes(storage::tar::FileWriter &file_out);
|
void WriteNodes(storage::tar::FileWriter &file_out);
|
||||||
void WriteEdges(storage::tar::FileWriter &file_out);
|
void WriteEdges(storage::tar::FileWriter &file_out);
|
||||||
void WriteMetadata(storage::tar::FileWriter &file_out) const;
|
|
||||||
void WriteCharData(const std::string &file_name);
|
void WriteCharData(const std::string &file_name);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -444,13 +444,11 @@ inline void readConditionalRestrictions(const boost::filesystem::path &path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// reads .osrm file which is a temporary file of osrm-extract
|
// reads .osrm file which is a temporary file of osrm-extract
|
||||||
template <typename BarrierOutIter, typename PackedOSMIDsT>
|
template <typename PackedOSMIDsT>
|
||||||
void readRawNBGraph(const boost::filesystem::path &path,
|
void readRawNBGraph(const boost::filesystem::path &path,
|
||||||
BarrierOutIter barriers,
|
|
||||||
std::vector<util::Coordinate> &coordinates,
|
std::vector<util::Coordinate> &coordinates,
|
||||||
PackedOSMIDsT &osm_node_ids,
|
PackedOSMIDsT &osm_node_ids,
|
||||||
std::vector<extractor::NodeBasedEdge> &edge_list,
|
std::vector<extractor::NodeBasedEdge> &edge_list)
|
||||||
std::vector<extractor::NodeBasedEdgeAnnotation> &annotations)
|
|
||||||
{
|
{
|
||||||
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
|
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
|
||||||
storage::tar::FileReader reader{path, fingerprint};
|
storage::tar::FileReader reader{path, fingerprint};
|
||||||
@ -468,10 +466,7 @@ void readRawNBGraph(const boost::filesystem::path &path,
|
|||||||
reader.ReadStreaming<extractor::QueryNode>("/extractor/nodes",
|
reader.ReadStreaming<extractor::QueryNode>("/extractor/nodes",
|
||||||
boost::make_function_output_iterator(decode));
|
boost::make_function_output_iterator(decode));
|
||||||
|
|
||||||
reader.ReadStreaming<NodeID>("/extractor/barriers", barriers);
|
|
||||||
|
|
||||||
storage::serialization::read(reader, "/extractor/edges", edge_list);
|
storage::serialization::read(reader, "/extractor/edges", edge_list);
|
||||||
storage::serialization::read(reader, "/extractor/annotations", annotations);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename NameTableT>
|
template <typename NameTableT>
|
||||||
|
|||||||
@ -422,7 +422,6 @@ void ExtractionContainers::PrepareData(ScriptingEnvironment &scripting_environme
|
|||||||
all_nodes_list.clear(); // free all_nodes_list before allocation of normal_edges
|
all_nodes_list.clear(); // free all_nodes_list before allocation of normal_edges
|
||||||
all_nodes_list.shrink_to_fit();
|
all_nodes_list.shrink_to_fit();
|
||||||
WriteEdges(writer);
|
WriteEdges(writer);
|
||||||
WriteMetadata(writer);
|
|
||||||
|
|
||||||
PrepareTrafficSignals(traffic_signals);
|
PrepareTrafficSignals(traffic_signals);
|
||||||
PrepareManeuverOverrides(maneuver_override_ways);
|
PrepareManeuverOverrides(maneuver_override_ways);
|
||||||
@ -841,19 +840,6 @@ void ExtractionContainers::WriteEdges(storage::tar::FileWriter &writer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtractionContainers::WriteMetadata(storage::tar::FileWriter &writer) const
|
|
||||||
{
|
|
||||||
util::UnbufferedLog log;
|
|
||||||
log << "Writing way meta-data ... " << std::flush;
|
|
||||||
TIMER_START(write_meta_data);
|
|
||||||
|
|
||||||
storage::serialization::write(writer, "/extractor/annotations", all_edges_annotation_data_list);
|
|
||||||
|
|
||||||
TIMER_STOP(write_meta_data);
|
|
||||||
log << "ok, after " << TIMER_SEC(write_meta_data) << "s";
|
|
||||||
log << " -- Metadata contains << " << all_edges_annotation_data_list.size() << " entries.";
|
|
||||||
}
|
|
||||||
|
|
||||||
void ExtractionContainers::WriteNodes(storage::tar::FileWriter &writer)
|
void ExtractionContainers::WriteNodes(storage::tar::FileWriter &writer)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@ -912,9 +898,6 @@ void ExtractionContainers::WriteNodes(storage::tar::FileWriter &writer)
|
|||||||
internal_barrier_nodes.emplace(node_id);
|
internal_barrier_nodes.emplace(node_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::vector<NodeID> barrier_nodes_vector(internal_barrier_nodes.begin(),
|
|
||||||
internal_barrier_nodes.end());
|
|
||||||
storage::serialization::write(writer, "/extractor/barriers", barrier_nodes_vector);
|
|
||||||
log << "ok, after " << TIMER_SEC(write_nodes) << "s";
|
log << "ok, after " << TIMER_SEC(write_nodes) << "s";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,12 +39,8 @@ std::size_t loadGraph(const std::string &path,
|
|||||||
std::vector<TarjanEdge> &graph_edge_list)
|
std::vector<TarjanEdge> &graph_edge_list)
|
||||||
{
|
{
|
||||||
std::vector<extractor::NodeBasedEdge> edge_list;
|
std::vector<extractor::NodeBasedEdge> edge_list;
|
||||||
std::vector<extractor::NodeBasedEdgeAnnotation> annotation_data;
|
|
||||||
|
|
||||||
auto nop = boost::make_function_output_iterator([](auto) {});
|
extractor::files::readRawNBGraph(path, coordinate_list, osm_node_ids, edge_list);
|
||||||
|
|
||||||
extractor::files::readRawNBGraph(
|
|
||||||
path, nop, coordinate_list, osm_node_ids, edge_list, annotation_data);
|
|
||||||
|
|
||||||
// Building a node-based graph
|
// Building a node-based graph
|
||||||
for (const auto &input_edge : edge_list)
|
for (const auto &input_edge : edge_list)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user