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

Method GetRouteJunctionPoints

libs/routing/routing_session.cpp:843–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

841}
842
843bool RoutingSession::GetRouteJunctionPoints(std::vector<geometry::PointWithAltitude> & routeJunctionPoints) const
844{
845 CHECK_THREAD_CHECKER(m_threadChecker, ());
846 ASSERT(m_route, ());
847
848 if (!m_route->IsValid())
849 return false;
850
851 auto const & segments = m_route->GetRouteSegments();
852 CHECK(!segments.empty(), ());
853
854 routeJunctionPoints.reserve(segments.size());
855 for (auto const & s : segments)
856 routeJunctionPoints.push_back(s.GetJunction());
857
858 return true;
859}
860
861bool RoutingSession::GetRouteAltitudesAndDistancesM(std::vector<double> & routeSegDistanceM,
862 geometry::Altitudes & routeAltitudesM) const

Calls 6

ASSERTFunction · 0.85
IsValidMethod · 0.45
emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected