| 135 | // writes .osrm.nbg_nodes |
| 136 | template <typename CoordinatesT, typename PackedOSMIDsT> |
| 137 | void 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 |
| 152 | inline void readNBGMapping(const std::filesystem::path &path, std::vector<NBGToEBG> &mapping) |