| 406 | } |
| 407 | |
| 408 | void 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 | |
| 431 | uint32_t IndexRouter::ConnectTracksOnGuidesToOsm(std::vector<m2::PointD> const & checkpoints, WorldGraph & graph) |
| 432 | { |
nothing calls this directly
no test coverage detected