feat: unify turn_penalties_index dump same with turn_weight_penalties and turn_duration_penalties
This commit is contained in:
@@ -399,6 +399,27 @@ inline void readTurnDurationPenalty(const boost::filesystem::path &path, TurnPen
|
||||
storage::serialization::read(reader, "/common/turn_penalty/duration", turn_penalty);
|
||||
}
|
||||
|
||||
// writes .osrm.turn_penalties_index
|
||||
template <typename TurnIndexT>
|
||||
inline void writeTurnPenaltiesIndex(const boost::filesystem::path &path,
|
||||
const TurnIndexT &turn_penalties_index)
|
||||
{
|
||||
const auto fingerprint = storage::tar::FileWriter::GenerateFingerprint;
|
||||
storage::tar::FileWriter writer{path, fingerprint};
|
||||
|
||||
storage::serialization::write(writer, "/extractor/turn_index", turn_penalties_index);
|
||||
}
|
||||
|
||||
// read .osrm.turn_penalties_index
|
||||
template <typename TurnIndexT>
|
||||
inline void readTurnPenaltiesIndex(const boost::filesystem::path &path, TurnIndexT &turn_penalties_index)
|
||||
{
|
||||
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
|
||||
storage::tar::FileReader reader{path, fingerprint};
|
||||
|
||||
storage::serialization::read(reader, "/extractor/turn_index", turn_penalties_index);
|
||||
}
|
||||
|
||||
// writes .osrm.restrictions
|
||||
template <typename ConditionalRestrictionsT>
|
||||
inline void writeConditionalRestrictions(const boost::filesystem::path &path,
|
||||
|
||||
Reference in New Issue
Block a user