MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / writeNodes

Function writeNodes

include/extractor/files.hpp:137–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135// writes .osrm.nbg_nodes
136template <typename CoordinatesT, typename PackedOSMIDsT>
137void writeNodes(const std::filesystem::path &path,
138 const CoordinatesT &coordinates,
139 const PackedOSMIDsT &osm_node_ids)
140{
141 static_assert(std::is_same<typename CoordinatesT::value_type, util::Coordinate>::value, "");
142 static_assert(std::is_same<typename PackedOSMIDsT::value_type, OSMNodeID>::value, "");
143
144 const auto fingerprint = storage::tar::FileWriter::GenerateFingerprint;
145 storage::tar::FileWriter writer{path, fingerprint};
146
147 storage::serialization::write(writer, "/common/nbn_data/coordinates", coordinates);
148 util::serialization::write(writer, "/common/nbn_data/osm_node_ids", osm_node_ids);
149}
150
151// reads .osrm.cnbg_to_ebg
152inline void readNBGMapping(const std::filesystem::path &path, std::vector<NBGToEBG> &mapping)

Callers 1

runMethod · 0.85

Calls 1

writeFunction · 0.70

Tested by

no test coverage detected