MCPcopy Create free account
hub / github.com/comaps/comaps / ConvertUTurnToSimpleRestriction

Function ConvertUTurnToSimpleRestriction

generator/restriction_collector.cpp:165–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165Restriction::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
179void ConvertToUTurnIfPossible(Restriction::Type & type, m2::PointD const & coords,
180 std::vector<uint32_t> const & featureIds)

Callers 1

CheckAndProcessUTurnMethod · 0.85

Calls 1

IsUTurnTypeFunction · 0.85

Tested by

no test coverage detected