| 26 | namespace |
| 27 | { |
| 28 | vector<DataPoint> ReadDataPoints(string const & data) |
| 29 | { |
| 30 | string const decoded = FromHex(data); |
| 31 | vector<DataPoint> points; |
| 32 | MemReaderWithExceptions memReader(decoded.data(), decoded.size()); |
| 33 | ReaderSource<MemReaderWithExceptions> src(memReader); |
| 34 | |
| 35 | try |
| 36 | { |
| 37 | coding::TrafficGPSEncoder::DeserializeDataPoints(coding::TrafficGPSEncoder::kLatestVersion, src, points); |
| 38 | } |
| 39 | catch (Reader::SizeException const & e) |
| 40 | { |
| 41 | points.clear(); |
| 42 | LOG(LERROR, ("DataPoint is corrupted. data:", data)); |
| 43 | LOG(LINFO, ("Continue reading...")); |
| 44 | } |
| 45 | return points; |
| 46 | } |
| 47 | |
| 48 | class PointToMwmId final |
| 49 | { |
no test coverage detected