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

Method DebugPrintTurns

libs/routing/route.cpp:524–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522}
523
524std::string Route::DebugPrintTurns() const
525{
526 std::string res;
527
528 for (size_t i = 0; i < m_routeSegments.size(); ++i)
529 {
530 auto const & turn = m_routeSegments[i].GetTurn();
531
532 // Always print first elemenst as Start.
533 if (i == 0 || !turn.IsTurnNone())
534 {
535 res += DebugPrint(mercator::ToLatLon(m_routeSegments[i].GetJunction()));
536 res += "\n";
537
538 res += DebugPrint(turn);
539 res += "\n";
540
541 RouteSegment::RoadNameInfo rni;
542 GetClosestStreetNameAfterIdx(turn.m_index, rni);
543 res += DebugPrint(rni);
544 res += "\n";
545 }
546 }
547
548 return res;
549}
550
551bool IsNormalTurn(TurnItem const & turn)
552{

Callers 1

ReconstructRouteFunction · 0.80

Calls 4

IsTurnNoneMethod · 0.80
DebugPrintFunction · 0.70
ToLatLonFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected