Pull turn data up into server
This commit is contained in:
committed by
Patrick Niklaus
parent
d7e1c9c09c
commit
97d1de1beb
@@ -22,7 +22,8 @@ inline void readNBGMapping(const boost::filesystem::path &path, std::vector<NBGT
|
||||
}
|
||||
|
||||
// writes .osrm.cnbg_to_ebg
|
||||
inline void writeNBGMapping(const boost::filesystem::path &path, const std::vector<NBGToEBG> &mapping)
|
||||
inline void writeNBGMapping(const boost::filesystem::path &path,
|
||||
const std::vector<NBGToEBG> &mapping)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileWriter::GenerateFingerprint;
|
||||
storage::io::FileWriter writer{path, fingerprint};
|
||||
@@ -58,7 +59,8 @@ inline void readSegmentData(const boost::filesystem::path &path, SegmentDataCont
|
||||
}
|
||||
|
||||
// writes .osrm.geometry
|
||||
inline void writeSegmentData(const boost::filesystem::path &path, const SegmentDataContainer &segment_data)
|
||||
inline void writeSegmentData(const boost::filesystem::path &path,
|
||||
const SegmentDataContainer &segment_data)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileWriter::HasNoFingerprint;
|
||||
storage::io::FileWriter writer{path, fingerprint};
|
||||
@@ -67,8 +69,9 @@ inline void writeSegmentData(const boost::filesystem::path &path, const SegmentD
|
||||
}
|
||||
|
||||
// reads .osrm.edges
|
||||
template<storage::Ownership Ownership>
|
||||
inline void readTurnData(const boost::filesystem::path &path, detail::TurnDataContainerImpl<Ownership> &turn_data)
|
||||
template <storage::Ownership Ownership>
|
||||
inline void readTurnData(const boost::filesystem::path &path,
|
||||
detail::TurnDataContainerImpl<Ownership> &turn_data)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileReader::HasNoFingerprint;
|
||||
storage::io::FileReader reader{path, fingerprint};
|
||||
@@ -77,15 +80,15 @@ inline void readTurnData(const boost::filesystem::path &path, detail::TurnDataCo
|
||||
}
|
||||
|
||||
// writes .osrm.edges
|
||||
template<storage::Ownership Ownership>
|
||||
inline void writeTurnData(const boost::filesystem::path &path, const detail::TurnDataContainerImpl<Ownership> &turn_data)
|
||||
template <storage::Ownership Ownership>
|
||||
inline void writeTurnData(const boost::filesystem::path &path,
|
||||
const detail::TurnDataContainerImpl<Ownership> &turn_data)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileWriter::HasNoFingerprint;
|
||||
storage::io::FileWriter writer{path, fingerprint};
|
||||
|
||||
serialization::write(writer, turn_data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ template <storage::Ownership Ownership> class TurnDataContainerImpl
|
||||
|
||||
EntryClassID GetEntryClassID(const EdgeID id) const { return entry_class_ids[id]; }
|
||||
|
||||
extractor::TravelMode GetTravelMode(const EdgeID id) const { return travel_modes[id]; }
|
||||
|
||||
util::guidance::TurnBearing GetPreTurnBearing(const EdgeID id) const
|
||||
{
|
||||
return pre_turn_bearings[id];
|
||||
@@ -79,6 +81,8 @@ template <storage::Ownership Ownership> class TurnDataContainerImpl
|
||||
return post_turn_bearings[id];
|
||||
}
|
||||
|
||||
LaneDataID GetLaneDataID(const EdgeID id) const { return lane_data_ids[id]; }
|
||||
|
||||
bool HasLaneData(const EdgeID id) const { return INVALID_LANE_DATAID != lane_data_ids[id]; }
|
||||
|
||||
NameID GetNameID(const EdgeID id) const { return name_ids[id]; }
|
||||
|
||||
Reference in New Issue
Block a user