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

Method ForEachNonFakeClosestEdge

tools/openlr/router.cpp:486–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484
485template <typename Fn>
486void Router::ForEachNonFakeClosestEdge(Vertex const & u, FunctionalRoadClass const restriction, Fn && fn)
487{
488 std::vector<std::pair<routing::Edge, geometry::PointWithAltitude>> vicinity;
489 m_graph.FindClosestEdges(mercator::RectByCenterXYAndSizeInMeters(u.m_junction.GetPoint(),
490 routing::FeaturesRoadGraph::kClosestEdgesRadiusM),
491 kMaxRoadCandidates, vicinity);
492
493 for (auto const & p : vicinity)
494 {
495 auto const & edge = p.first;
496 if (edge.IsFake())
497 continue;
498 if (!ConformLfrcnp(edge, restriction, kFRCThreshold, m_roadInfoGetter))
499 continue;
500 fn(edge);
501 }
502}
503
504template <typename It>
505size_t Router::FindPrefixLengthToConsume(It b, It const e, double lengthM)

Callers

nothing calls this directly

Calls 5

ConformLfrcnpFunction · 0.85
FindClosestEdgesMethod · 0.45
GetPointMethod · 0.45
IsFakeMethod · 0.45

Tested by

no test coverage detected