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

Method GetLineCandidates

tools/openlr/candidate_paths_getter.cpp:249–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void CandidatePathsGetter::GetLineCandidates(openlr::LocationReferencePoint const & p, bool const isLastPoint,
250 double const distanceToNextPointM,
251 vector<m2::PointD> const & pointCandidates,
252 vector<Graph::EdgeVector> & candidates)
253{
254 double const kDefaultBearDistM = 25.0;
255 double const bearDistM = min(kDefaultBearDistM, distanceToNextPointM);
256
257 LOG(LINFO, ("BearDist is", bearDistM));
258
259 Graph::EdgeVector startLines;
260 GetStartLines(pointCandidates, isLastPoint, startLines);
261
262 LOG(LINFO, (startLines.size(), "start line candidates found for point (LatLon)", p.m_latLon));
263 LOG(LDEBUG, ("Listing start lines:"));
264 for (auto const & e : startLines)
265 LOG(LDEBUG, (LogAs2GisPath(e)));
266
267 auto const startPoint = mercator::FromLatLon(p.m_latLon);
268
269 vector<LinkPtr> allPaths;
270 GetAllSuitablePaths(startLines, isLastPoint, bearDistM, p.m_functionalRoadClass, p.m_formOfWay, distanceToNextPointM,
271 allPaths);
272 GetBestCandidatePaths(allPaths, isLastPoint, p.m_bearing, bearDistM, startPoint, candidates);
273 LOG(LDEBUG, (candidates.size(), "candidate paths found for point (LatLon)", p.m_latLon));
274}
275} // namespace openlr

Callers

nothing calls this directly

Calls 3

LogAs2GisPathFunction · 0.85
FromLatLonFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected