| 163 | } |
| 164 | |
| 165 | Restriction::Type ConvertUTurnToSimpleRestriction(Restriction::Type type) |
| 166 | { |
| 167 | CHECK(IsUTurnType(type), ()); |
| 168 | |
| 169 | // Some people create no_u_turn not in the way we expect. |
| 170 | // For example: https://www.openstreetmap.org/relation/9511182 |
| 171 | // https://www.openstreetmap.org/relation/2532732 |
| 172 | // https://www.openstreetmap.org/relation/7606104 |
| 173 | // OsmId of |from| member is differ from |to| member. |
| 174 | // So we "convert" such no_u_turn to any no_* restriction. |
| 175 | // And we do the same thing with only_u_turn. |
| 176 | return type == Restriction::Type::NoUTurn ? Restriction::Type::No : Restriction::Type::Only; |
| 177 | } |
| 178 | |
| 179 | void ConvertToUTurnIfPossible(Restriction::Type & type, m2::PointD const & coords, |
| 180 | std::vector<uint32_t> const & featureIds) |
no test coverage detected