| 275 | } |
| 276 | |
| 277 | void DeserializeIndexGraph(MwmValue const & mwmValue, VehicleType vehicleType, IndexGraph & graph) |
| 278 | { |
| 279 | FilesContainerR::TReader reader(mwmValue.m_cont.GetReader(ROUTING_FILE_TAG)); |
| 280 | ReaderSource<FilesContainerR::TReader> src(reader); |
| 281 | |
| 282 | IndexGraphSerializer::Deserialize(graph, src, GetVehicleMask(vehicleType)); |
| 283 | |
| 284 | // Do not load restrictions (relation type = restriction) for pedestrian routing. |
| 285 | // https://wiki.openstreetmap.org/wiki/Relation:restriction |
| 286 | /// @todo OSM has 49 (April 2022) restriction:foot relations. We should use them someday, |
| 287 | /// starting from generator and saving like access, according to the vehicleType. |
| 288 | ASSERT(vehicleType != VehicleType::Transit, ()); |
| 289 | if (vehicleType != VehicleType::Pedestrian) |
| 290 | { |
| 291 | RestrictionLoader restrictionLoader(mwmValue, graph); |
| 292 | if (restrictionLoader.HasRestrictions()) |
| 293 | { |
| 294 | graph.SetRestrictions(restrictionLoader.StealRestrictions()); |
| 295 | graph.SetUTurnRestrictions(restrictionLoader.StealNoUTurnRestrictions()); |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | RoadAccess roadAccess; |
| 300 | if (ReadRoadAccessFromMwm(mwmValue, vehicleType, roadAccess)) |
| 301 | graph.SetRoadAccess(std::move(roadAccess)); |
| 302 | |
| 303 | RoadPenalty roadPenalty; |
| 304 | if (ReadRoadPenaltyFromMwm(mwmValue, vehicleType, roadPenalty)) |
| 305 | graph.SetRoadPenalty(std::move(roadPenalty)); |
| 306 | } |
| 307 | |
| 308 | uint32_t DeserializeIndexGraphNumRoads(MwmValue const & mwmValue, VehicleType vehicleType) |
| 309 | { |
no test coverage detected