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

Method EnrichWithProjectionPoints

tools/openlr/score_candidate_points_getter.cpp:73–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void ScoreCandidatePointsGetter::EnrichWithProjectionPoints(m2::PointD const & p, ScoreEdgeVec & edgeCandidates)
74{
75 m_graph.ResetFakes();
76
77 std::vector<std::pair<Graph::Edge, geometry::PointWithAltitude>> vicinities;
78 m_graph.FindClosestEdges(p, static_cast<uint32_t>(m_maxProjectionCandidates), vicinities);
79 for (auto const & v : vicinities)
80 {
81 auto const & edge = v.first;
82 auto const & proj = v.second;
83
84 CHECK(edge.HasRealPart(), ());
85 CHECK(!edge.IsFake(), ());
86
87 if (mercator::DistanceOnEarth(p, proj.GetPoint()) >= kRadius)
88 continue;
89
90 edgeCandidates.emplace_back(GetScoreByDistance(p, proj.GetPoint()), edge);
91 }
92}
93
94bool ScoreCandidatePointsGetter::IsJunction(m2::PointD const & p)
95{

Callers

nothing calls this directly

Calls 7

HasRealPartMethod · 0.80
DistanceOnEarthFunction · 0.50
ResetFakesMethod · 0.45
FindClosestEdgesMethod · 0.45
IsFakeMethod · 0.45
GetPointMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected