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

Method ConnectCheckpointsOnGuidesToOsm

libs/routing/index_router.cpp:408–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406}
407
408void IndexRouter::ConnectCheckpointsOnGuidesToOsm(std::vector<m2::PointD> const & checkpoints, WorldGraph & graph)
409{
410 for (size_t checkpointIdx = 0; checkpointIdx < checkpoints.size(); ++checkpointIdx)
411 {
412 if (!m_guides.IsCheckpointAttached(checkpointIdx))
413 continue;
414
415 if (m_guides.FitsForDirectLinkToGuide(checkpointIdx, checkpoints.size()))
416 continue;
417
418 // Projection of this checkpoint is not connected to OSM.
419 if (m_guides.GetOsmConnections(checkpointIdx).empty())
420 continue;
421
422 auto const & checkpoint = checkpoints[checkpointIdx];
423 auto const & bestSegmentsOsm = GetBestOutgoingSegments(checkpoint, graph);
424 if (bestSegmentsOsm.empty())
425 continue;
426
427 m_guides.OverwriteFakeEnding(checkpointIdx, MakeFakeEnding(bestSegmentsOsm, checkpoint, graph));
428 }
429}
430
431uint32_t IndexRouter::ConnectTracksOnGuidesToOsm(std::vector<m2::PointD> const & checkpoints, WorldGraph & graph)
432{

Callers

nothing calls this directly

Calls 7

IsCheckpointAttachedMethod · 0.80
GetOsmConnectionsMethod · 0.80
OverwriteFakeEndingMethod · 0.80
MakeFakeEndingFunction · 0.70
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected