ad_map_access
Namespaces | Classes | Typedefs | Enumerations | Functions
ad::map::route Namespace Reference

namespace route More...

Namespaces

 planning
 provides route planning capabilities on the road network of the map
 

Classes

struct  ConnectingRoute
 DataType ConnectingRoute. More...
 
struct  FindLaneChangeResult
 struct defining the result type of findFirstLaneChange() More...
 
struct  FindWaypointResult
 struct defining the result type of findWaypoint() and findNearestWaypoint() More...
 
struct  FullRoute
 DataType FullRoute. More...
 
struct  LaneInterval
 DataType LaneInterval. More...
 
struct  LaneSegment
 DataType LaneSegment. More...
 
struct  RoadSegment
 DataType RoadSegment. More...
 
struct  RouteIterator
 struct defining iterator information on a route More...
 
struct  RouteParaPoint
 DataType RouteParaPoint. More...
 

Typedefs

typedef std::vector<::ad::map::route::FullRouteFullRouteList
 DataType FullRouteList. More...
 
typedef std::vector<::ad::map::route::LaneSegmentLaneSegmentList
 DataType LaneSegmentList. More...
 
typedef std::vector<::ad::map::route::RoadSegmentRoadSegmentList
 DataType RoadSegmentList. More...
 
typedef int32_t RouteLaneOffset
 DataType RouteLaneOffset. More...
 
typedef uint64_t RoutePlanningCounter
 DataType RoutePlanningCounter.
 
typedef uint64_t SegmentCounter
 DataType SegmentCounter. More...
 

Enumerations

enum  ConnectingRouteType : int32_t { ConnectingRouteType::Invalid = 0, ConnectingRouteType::Following = 1, ConnectingRouteType::Opposing = 2, ConnectingRouteType::Merging = 3 }
 DataType ConnectingRouteType. More...
 
enum  LaneChangeDirection : int32_t { LaneChangeDirection::LeftToRight = 0, LaneChangeDirection::RightToLeft = 1, LaneChangeDirection::Invalid = 2 }
 DataType LaneChangeDirection. More...
 
enum  RouteCreationMode : int32_t { RouteCreationMode::Undefined = 0, RouteCreationMode::SameDrivingDirection = 1, RouteCreationMode::AllRoutableLanes = 2, RouteCreationMode::AllNeighborLanes = 3 }
 DataType RouteCreationMode. More...
 
enum  ShortenRouteResult {
  ShortenRouteResult::Succeeded, ShortenRouteResult::SucceededBeforeRoute, ShortenRouteResult::SucceededRouteEmpty, ShortenRouteResult::SucceededIntersectionNotCut,
  ShortenRouteResult::FailedRouteEmpty
}
 enumeration providing more insights into the actual shorten route result More...
 
enum  ShortenRouteMode { ShortenRouteMode::Normal, ShortenRouteMode::PrependIfSucceededBeforeRoute, ShortenRouteMode::DontCutIntersectionAndPrependIfSucceededBeforeRoute }
 enumeration defining the mode of operation of the shortenRoute() functions More...
 
enum  RouteSectionCreationMode { RouteSectionCreationMode::SingleLane, RouteSectionCreationMode::AllRouteLanes }
 the mode how the route section will be created More...
 

Functions

std::ostream & operator<< (std::ostream &os, ConnectingRoute const &_value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, ConnectingRouteType const &value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, FullRoute const &_value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, LaneChangeDirection const &value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, LaneInterval const &_value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, LaneSegment const &_value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, RoadSegment const &_value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, RouteCreationMode const &value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, RouteParaPoint const &_value)
 standard ostream operator More...
 
point::ParaPoint getIntervalStart (LaneInterval const &laneInterval)
 class defining a route interval with one lane More...
 
point::ParaPoint getIntervalStart (FullRoute const &route, lane::LaneId const &laneId)
 get interval start as ParaPoint for a given laneId and a given route More...
 
point::ParaPoint getIntervalEnd (LaneInterval const &laneInterval)
 get interval end as ParaPoint
 
physics::ParametricRange toParametricRange (route::LaneInterval const &laneInterval)
 convert lane interval to ParametricRange
 
physics::ParametricValue getSignedDistance (LaneInterval const &laneInterval, point::ParaPoint const &first, point::ParaPoint const &second)
 get the signed parametric physics::Distance between two parametric points respecting the laneInterval's direction More...
 
physics::ParametricValue getUnsignedDistance (LaneInterval const &laneInterval, point::ParaPoint const &first, point::ParaPoint const &second)
 get the unsigned parametric physics::Distance between two parametric points More...
 
bool isStartOfInterval (LaneInterval const &laneInterval, point::ParaPoint const &point)
 checks if the point marks the start of the interval More...
 
bool isEndOfInterval (LaneInterval const &laneInterval, point::ParaPoint const &point)
 checks if the point marks the end of the interval More...
 
bool isRouteDirectionPositive (LaneInterval const &laneInterval)
 checks if the direction of this route interval is positive in respect to the lane geometry More...
 
bool isRouteDirectionNegative (LaneInterval const &laneInterval)
 checks if the direction of this route interval is negative in respect to the lane geometry More...
 
bool isRouteDirectionAlignedWithDrivingDirection (LaneInterval const &laneInterval)
 checks if the route direction is aligned with the nominal driving direction of the lane
 
bool isWithinInterval (LaneInterval const &laneInterval, physics::ParametricValue const &parametricOffset)
 checks if the parametric offset is within the interval More...
 
bool isWithinInterval (LaneInterval const &laneInterval, point::ParaPoint const &point)
 checks if the point is within the interval More...
 
bool isDegenerated (LaneInterval const &laneInterval)
 checks if the interval is degenerated More...
 
bool isAfterInterval (LaneInterval const &laneInterval, physics::ParametricValue const parametricOffset)
 checks if the parametric offset is after the interval More...
 
bool isAfterInterval (LaneInterval const &laneInterval, point::ParaPoint const &point)
 checks if the point is after the interval More...
 
bool isBeforeInterval (LaneInterval const &laneInterval, physics::ParametricValue const parametricOffset)
 checks if the parametric offset is before the interval More...
 
bool isBeforeInterval (LaneInterval const &laneInterval, point::ParaPoint const &point)
 checks if the point is before the interval More...
 
bool overlapsInterval (LaneInterval const &laneInterval, physics::ParametricRange const &range)
 checks if the range overlaps with the interval More...
 
physics::ParametricValue getProjectedParametricOffsetOnNeighborLane (LaneInterval const &currentInterval, LaneInterval const &neighborInterval, physics::ParametricValue const &parametricOffset)
 project a given parametric position (offset) to the center line of the given neighbor lane More...
 
physics::ParametricValue calcParametricLength (LaneInterval const &laneInterval)
 calculate the length of the provided lane interval as parametric value
 
physics::Distance calcLength (LaneInterval const &laneInterval)
 calculate the length of the provided lane interval as physics::Distance value More...
 
physics::Duration calcDuration (LaneInterval const &laneInterval)
 calculate the Duration of the provided lane interval as duration value More...
 
void getRightEdge (LaneInterval const &laneInterval, point::ENUEdge &enuEdge)
 get right edge of the lane interval as ENUEdge More...
 
point::ENUEdge getRightENUEdge (LaneInterval const &laneInterval)
 get right edge of the lane interval as ENUEdge More...
 
point::ECEFEdge getRightECEFEdge (LaneInterval const &laneInterval)
 get right edge of the lane interval as ECEFEdge More...
 
point::GeoEdge getRightGeoEdge (LaneInterval const &laneInterval)
 get right edge of the lane interval as GeoEdge More...
 
void getRightProjectedEdge (LaneInterval const &laneInterval, point::ENUEdge &enuEdge)
 get right edge of the lane interval as ENUEdge using projection to find the start of the edge More...
 
point::ENUEdge getRightProjectedENUEdge (LaneInterval const &laneInterval)
 get right edge of the lane interval as ENUEdge using projection to find the start of the edge More...
 
point::ECEFEdge getRightProjectedECEFEdge (LaneInterval const &laneInterval)
 get right edge of the lane interval as ECEFEdge using projection to find the start of the edge More...
 
point::GeoEdge getRightProjectedGeoEdge (LaneInterval const &laneInterval)
 get right edge of the lane interval as GeoEdge using projection to find the start of the edge More...
 
void getLeftEdge (LaneInterval const &laneInterval, point::ENUEdge &enuEdge)
 get Left edge of the lane interval as ENUEdge More...
 
point::ENUEdge getLeftENUEdge (LaneInterval const &laneInterval)
 get left edge of the lane interval as ENUEdge More...
 
point::ECEFEdge getLeftECEFEdge (LaneInterval const &laneInterval)
 get left edge of the lane interval as ECEFEdge More...
 
point::GeoEdge getLeftGeoEdge (LaneInterval const &laneInterval)
 get left edge of the lane interval as GeoEdge More...
 
void getLeftProjectedEdge (LaneInterval const &laneInterval, point::ENUEdge &enuEdge)
 get Left edge of the lane interval as ENUEdge using projection to find the start of the edge More...
 
point::ENUEdge getLeftProjectedENUEdge (LaneInterval const &laneInterval)
 get left edge of the lane interval as ENUEdge using projection to find the start of the edge More...
 
point::ECEFEdge getLeftProjectedECEFEdge (LaneInterval const &laneInterval)
 get left edge of the lane interval as ECEFEdge using projection to find the start of the edge More...
 
point::GeoEdge getLeftProjectedGeoEdge (LaneInterval const &laneInterval)
 get left edge of the lane interval as GeoEdge using projection to find the start of the edge More...
 
lane::GeoBorder getGeoBorder (LaneInterval const &laneInterval)
 get the geo borders of this lane
 
lane::ECEFBorder getECEFBorder (LaneInterval const &laneInterval)
 get the ecef borders of this lane
 
lane::ENUBorder getENUBorder (LaneInterval const &laneInterval)
 get the enu borders of this lane More...
 
lane::ENUBorder getENUProjectedBorder (LaneInterval const &laneInterval)
 get the enu borders of this lane More...
 
LaneInterval shortenIntervalFromBegin (LaneInterval const &laneInterval, physics::Distance const &distance)
 shorten the LaneInterval about a given physics::Distance. Will remove at the begin of the LaneInterval More...
 
LaneInterval shortenIntervalFromEnd (LaneInterval const &laneInterval, physics::Distance const &distance)
 shorten the LaneInterval about a given physics::Distance. Will remove at the end of the LaneInterval More...
 
LaneInterval restrictIntervalFromBegin (LaneInterval const &laneInterval, physics::Distance const &distance)
 Restrict length of the LaneInterval to a given physics::Distance from start. More...
 
LaneInterval extendIntervalUntilEnd (LaneInterval const &laneInterval)
 extend the lane interval until the end of the lane reached More...
 
LaneInterval cutIntervalAtStart (LaneInterval const &laneInterval, physics::ParametricValue const &newIntervalStart)
 cut the LaneInterval at a given parametric point. Will remove at the start of the LaneInterval More...
 
LaneInterval extendIntervalUntilStart (LaneInterval const &laneInterval)
 extend the lane interval until the start of the lane reached More...
 
LaneInterval extendIntervalFromStart (LaneInterval const &laneInterval, physics::Distance const &distance)
 extend the lane interval by moving its start position by physics::Distance More...
 
LaneInterval extendIntervalFromEnd (LaneInterval const &laneInterval, physics::Distance const &distance)
 extend the lane interval by moving its end position by physics::Distance More...
 
LaneInterval cutIntervalAtEnd (LaneInterval const &laneInterval, physics::ParametricValue const &newIntervalEnd)
 cut the LaneInterval at a given parametric point. Will remove at the end of the LaneInterval More...
 
restriction::SpeedLimitList getSpeedLimits (LaneInterval const &laneInterval)
 get the speed limits of the lane interval
 
void getMetricRanges (LaneInterval const &laneInterval, physics::MetricRange &lengthRange, physics::MetricRange &widthRange)
 get the metric ranges of the lane interval
 
RouteIterator getRouteIterator (route::RouteParaPoint const &routePosition, route::FullRoute const &route)
 get the route iterator from a given route position More...
 
point::ParaPoint getLaneParaPoint (physics::ParametricValue const &routeParametricOffset, route::LaneInterval const &laneInterval)
 get the lane para points in respect to the given route parametric offset More...
 
physics::Distance signedDistanceToLane (lane::LaneId const &checkLaneId, FullRoute const &route, match::MapMatchedPositionConfidenceList const &mapMatchedPositions)
 get the signed distance to a lane w.r.t to a given route (direction) for the map matched positions More...
 
point::ParaPointList getLaneParaPoints (route::RouteParaPoint const &routePosition, route::FullRoute const &route)
 get the lane para points in respect to the given route position More...
 
physics::Distance calcLength (FullRoute const &fullRoute)
 calculate the length of the provided full route
 
physics::Distance calcLength (RoadSegment const &roadSegment)
 calculate the length of the provided road segment More...
 
physics::Distance calcLength (LaneSegment const &laneSegment)
 calculate the length of the provided lane segment
 
physics::Distance calcLength (ConnectingRoute const &connectingRoute)
 calculate the length of the provided connecting route More...
 
physics::Distance calcLength (RouteIterator const &startIterator, RouteIterator const &endIterator)
 calculate the length between the two given iterators
 
physics::Distance calcLength (RouteParaPoint const &startRouteParaPoint, RouteParaPoint const &endRouteParaPoint, FullRoute const &route)
 
physics::Duration calcDuration (FullRoute const &fullRoute)
 calculate the Duration of the provided full route
 
physics::Duration calcDuration (RoadSegment const &roadSegment)
 calculate the Duration of the provided road segment More...
 
physics::Duration calcDuration (LaneSegment const &laneSegment)
 calculate the Duration of the provided lane segment
 
physics::Duration calcDuration (ConnectingRoute const &connectingRoute)
 calculate the Duration of the provided connecting route More...
 
restriction::SpeedLimitList getSpeedLimits (RoadSegment const &roadSegment)
 get the speed limits of the road segment
 
restriction::SpeedLimitList getSpeedLimits (LaneSegment const &laneSegment)
 get the speed limits of the lane segment
 
restriction::SpeedLimitList getSpeedLimits (RouteIterator const &startIterator, RouteIterator const &endIterator)
 get the speed limits between the two given iterators
 
restriction::SpeedLimitList getSpeedLimits (FullRoute const &fullRoute)
 get the speed limits of a complete route
 
restriction::SpeedLimitList getSpeedLimits (ConnectingRoute const &connectingRoute)
 get the speed limits of a connecting route
 
bool isWithinInterval (RoadSegment const &roadSegment, point::ParaPoint const &point)
 checks if the point is within the roadSegment More...
 
physics::Distance calcLength (FindWaypointResult const &findWaypointResult)
 calculate the length of the route in respect to FindWaypointResult More...
 
FindWaypointResult findWaypoint (point::ParaPoint const &position, route::FullRoute const &route)
 find a waypoint on the route containing the given position More...
 
FindWaypointResult findWaypoint (lane::LaneId const &laneId, route::FullRoute const &route)
 find a waypoint on the route containing the given laneId More...
 
FindWaypointResult findNearestWaypoint (point::ParaPointList const &positions, route::FullRoute const &route)
 find waypoint on the route containing the given positions More...
 
FindWaypointResult findCenterWaypoint (match::Object const &object, route::FullRoute const &route)
 find waypoint on the route of the given object, preferable the object center More...
 
FindWaypointResult objectOnRoute (match::MapMatchedObjectBoundingBox const &object, route::FullRoute const &route)
 find nearest waypoint on the route containing the given mapmatched bounding box More...
 
FindWaypointResult intersectionOnRoute (intersection::Intersection const &intersection, route::FullRoute const &route)
 find waypoint on the route containing a lane of the given intersection More...
 
bool isConnectedRoutePartOfAnIntersection (route::ConnectingRoute const &connectingRoute)
 
ShortenRouteResult shortenRoute (point::ParaPoint const &currentPosition, route::FullRoute &route, ShortenRouteMode const shortenRouteMode=ShortenRouteMode::Normal)
 follow the route up to a certain position and shorten the route accordingly More...
 
ShortenRouteResult shortenRoute (point::ParaPointList const &currentPositions, route::FullRoute &route, ShortenRouteMode const shortenRouteMode=ShortenRouteMode::Normal)
 follow the route up to a certain position and shorten the route accordingly More...
 
bool calculateRouteParaPointAtDistance (route::FullRoute const &route, route::RouteParaPoint const &origin, physics::Distance const &distance, route::RouteParaPoint &resultingPoint)
 calculate the RouteParaPoint at a given distance to a given RouteParaPoint More...
 
bool getRouteParaPointFromParaPoint (point::ParaPoint const &paraPoint, FullRoute const &route, route::RouteParaPoint &routeParaPoint)
 calculate the RouteParaPoint for a given ParaPoint and FullRoute More...
 
FullRoute getRouteSection (FindWaypointResult const &currentLane, physics::Distance const &distanceFront, physics::Distance const &distanceEnd, FullRoute const &route, RouteSectionCreationMode const routeSectionCreationMode=RouteSectionCreationMode::SingleLane)
 Return a section of the route that is within the given distance around the given LanePoint. More...
 
route::FullRoute getRouteSection (point::ParaPoint const &centerPoint, physics::Distance const &distanceFront, physics::Distance const &distanceEnd, route::FullRoute const &route, RouteSectionCreationMode const routeSectionCreationMode=RouteSectionCreationMode::SingleLane)
 Return a section of the route that is within the given distance around the given LanePoint. More...
 
route::FullRoute getRouteSection (match::Object const &object, route::FullRoute const &route, RouteSectionCreationMode const routeSectionCreationMode=RouteSectionCreationMode::SingleLane)
 Return a section of the route that is around the given object. More...
 
FindLaneChangeResult findFirstLaneChange (match::MapMatchedPosition const &currentPositionEgoVehicle, route::FullRoute const &route)
 finds the first route interval on a given route where a lane change is necessary to travel the given route from start to end. The function finds the first lane change only. More...
 
void shortenRouteToDistance (route::FullRoute &route, const physics::Distance &length)
 shorten the route from the end to have at maximum the given length More...
 
void appendLaneSegmentToRoute (route::LaneInterval const &laneInterval, route::FullRoute &route, route::SegmentCounter const segmentCountFromDestination=0u)
 function to append a new lane interval to a road segment list More...
 
bool extendRouteToDistance (route::FullRoute &route, physics::Distance const &length, route::FullRouteList &additionalRoutes, lane::LaneIdSet const &relevantLanes=ad::map::lane::LaneIdSet())
 extends route to have at least the given length More...
 
bool extendRouteToDestinations (route::FullRoute &route, const std::vector< route::planning::RoutingParaPoint > &dest)
 extends route with the given list of destinations More...
 
bool extendRouteToDestinations (route::FullRoute &route, const std::vector< point::GeoPoint > &dest)
 extends route with the given list of destinations More...
 
bool extendRouteToDestinations (route::FullRoute &route, const std::vector< point::ENUPoint > &dest)
 extends route with the given list of destinations More...
 
void appendRoadSegmentToRoute (route::LaneInterval const &laneInverval, route::RouteLaneOffset const &laneOffset, route::FullRoute &route, lane::LaneIdSet const &relevantLanes)
 function to append a new lane interval to a road segment list More...
 
physics::Distance addOpposingLaneSegmentToRoadSegment (point::ParaPoint const &startpoint, physics::Distance const &distance, route::RoadSegment &roadSegment, route::FullRoute &route)
 add an opposing lane segment to an existing (and not empty) road segment with at most the given length More...
 
bool addOpposingLaneToRoute (point::ParaPoint const &pointOnOppositeLane, physics::Distance const &distanceOnWrongLane, route::FullRoute &route, physics::Distance &coveredDistance)
 add a part of the opposing lane to an existing route. The part is at most distanceOnWrongLane long, but may be shorter (e.g. intersections stop adding more segments of the opposing lane) More...
 
route::FullRoute getRouteExpandedToOppositeLanes (route::FullRoute const &route)
 
route::FullRoute getRouteExpandedToAllNeighborLanes (route::FullRoute const &route)
 
bool calculateBypassingRoute (route::FullRoute const &route, route::FullRoute &bypassingRoute)
 calculate a bypassing route for a given (blocked) route More...
 
lane::ECEFBorder getECEFBorderOfRoadSegment (RoadSegment const &roadSegment, physics::ParametricValue const parametricOffset)
 get borders of a road segment. The road segment is cut at a given parametric offset. More...
 
lane::ECEFBorder getECEFBorderOfRoadSegment (RoadSegment const &roadSegment)
 get borders of a road segment More...
 
lane::ENUBorder getENUBorderOfRoadSegment (RoadSegment const &roadSegment, physics::ParametricValue const parametricOffset)
 get borders of a road segment. The road segment is cut at a given parametric offset. More...
 
lane::ENUBorder getENUBorderOfRoadSegment (RoadSegment const &roadSegment)
 get borders of a road segment More...
 
lane::GeoBorder getGeoBorderOfRoadSegment (RoadSegment const &roadSegment, physics::ParametricValue const parametricOffset)
 get borders of a road segment. The road segment is cut at a given parametric offset. More...
 
lane::GeoBorder getGeoBorderOfRoadSegment (RoadSegment const &roadSegment)
 get borders of a road segment More...
 
lane::ENUBorderList getENUBorderOfRoute (FullRoute const &route)
 get borders of a full route More...
 
lane::ECEFBorderList getECEFBorderOfRoute (FullRoute const &route)
 get borders of a full route More...
 
lane::GeoBorderList getGeoBorderOfRoute (FullRoute const &route)
 get borders of a full route More...
 
point::ENUHeading getENUHeadingOfRoute (match::Object const &object, FullRoute const &route)
 get the ENU heading of a route at the location of the object More...
 
bool isObjectHeadingInRouteDirection (match::Object const &object, FullRoute const &route)
 compare the ENU heading of the route at the location of the object with the ENU heading of the object More...
 
void shortenSegmentFromBegin (RoadSegment &roadSegment, physics::Distance const &distance)
 Shorten the provided road segment by a certain distance from the begin. More...
 
void shortenSegmentFromEnd (RoadSegment &roadSegment, physics::Distance const &distance)
 Shorten the provided road segment by a certain distance from the end. More...
 

Detailed Description

namespace route

Handling of routes

Typedef Documentation

◆ FullRouteList

DataType FullRouteList.

List of FullRoute elements

◆ LaneSegmentList

DataType LaneSegmentList.

A list of lane segments

◆ RoadSegmentList

DataType RoadSegmentList.

A list of road segments

◆ RouteLaneOffset

DataType RouteLaneOffset.

The offset of a lane in number of lane changes left (–) or right (++) from start of the route planning.

◆ SegmentCounter

DataType SegmentCounter.

A counter for segments

Enumeration Type Documentation

◆ ConnectingRouteType

enum ad::map::route::ConnectingRouteType : int32_t
strong

DataType ConnectingRouteType.

The type of a connecting route.

Enumerator
Invalid 

There exists no connecting route (according to the search length/distance restrictions): both routeA and routeB are empty

Following 

A and B are driving in same direction: one is able to reach the other by driving forward, but not vice versa If A is in front of B: routeA is empty, routeB contains the route part from B towards A If B is in front of A: routeB is empty, routeA contains the route part from A towards B

Opposing 

A and B driving in opposite direction: both are able to reach each other by driving forward: routeA contains the route part from A towards B and routeB the inverted route part from B towards A.

Merging 

A and B can reach each other directly, but their routes merge at some point: routeA contains the route part from A towards the merge point routeB contains the route part from B towards the merge point

◆ LaneChangeDirection

enum ad::map::route::LaneChangeDirection : int32_t
strong

DataType LaneChangeDirection.

Direction of a lane change

Enumerator
LeftToRight 

Change a lane from left to right

RightToLeft 

Change a lane from right to left

Invalid 

Invalid lane change direction

◆ RouteCreationMode

enum ad::map::route::RouteCreationMode : int32_t
strong

DataType RouteCreationMode.

The mode on how the full route is created

Enumerator
Undefined 

undefined value

SameDrivingDirection 

Only add lanes having the same driving direction to the route

AllRoutableLanes 

include also lanes in opposite driving direction

AllNeighborLanes 

include all neighbors, which might include not explicitly routeable shoulder lanes

◆ RouteSectionCreationMode

the mode how the route section will be created

Enumerator
SingleLane 

In the resulting route section the LaneSegments contain on single lane interval

AllRouteLanes 

In the resulting route section the LaneSegments contain all the lanes of the original route

◆ ShortenRouteMode

enumeration defining the mode of operation of the shortenRoute() functions

Enumerator
Normal 

Standard behavior

PrependIfSucceededBeforeRoute 

If shorten route result would be: ShortenRouteResult::SucceededBeforeRoute, the route is extended at the beginning so that the result actually becomes ShortenRouteResult::Succeeded

DontCutIntersectionAndPrependIfSucceededBeforeRoute 

If the shorten route operation would cut an intersection in between, the route is not shortened further, before the intersection is actually left.

If shorten route result would be: ShortenRouteResult::SucceededBeforeRoute, the route is extended at the beginning so that the result actually becomes ShortenRouteResult::Succeeded

◆ ShortenRouteResult

enumeration providing more insights into the actual shorten route result

Enumerator
Succeeded 

Shortening succeeded

SucceededBeforeRoute 

Shortening succeeded: the actual provided position(s) were not found with the findNearestWaypoint() function, but at least one position is on a lane of the route start lane segments, just before the route interval starts

SucceededRouteEmpty 

Shortening succeeded, but the resulting route is empty (i.e. crossed the end of the route)

SucceededIntersectionNotCut 

Shortening succeeded: the shortening would cut the current intersection within route. Therefore, actually not cut.

FailedRouteEmpty 

Shortening failed, the resulting (or already the input) route is empty

Function Documentation

◆ addOpposingLaneSegmentToRoadSegment()

physics::Distance ad::map::route::addOpposingLaneSegmentToRoadSegment ( point::ParaPoint const &  startpoint,
physics::Distance const &  distance,
route::RoadSegment roadSegment,
route::FullRoute route 
)

add an opposing lane segment to an existing (and not empty) road segment with at most the given length

This function must only be used, if an existing route should be extended with an opposing lane. Note, the length of the lane segment can be less than the provided distance, in case the neighboring lane segment is shorter as well.

The function is used by addOpposingLaneToRoute

Parameters
[in]startPointis the start point where the opposing lane segment will start
[in]distanceis the maximum distance of the newly added lane segment
[in/out]roadSegment is the road segment which is updated with the opposing lane segment
[in/out]route is the route the road segment belons to
Returns
-1 on failure, otherwise the length of the new lane segment is added

◆ addOpposingLaneToRoute()

bool ad::map::route::addOpposingLaneToRoute ( point::ParaPoint const &  pointOnOppositeLane,
physics::Distance const &  distanceOnWrongLane,
route::FullRoute route,
physics::Distance &  coveredDistance 
)

add a part of the opposing lane to an existing route. The part is at most distanceOnWrongLane long, but may be shorter (e.g. intersections stop adding more segments of the opposing lane)

Note the starting point of adding the opposing lane must be in the first segment of the route

Parameters
[in]pointOnOppositeLaneis the starting point at which the opposite lane should be added
[in]distanceOnWrongLanemaximum distance on the opposite lane
[in/out]route to be updated
[out]coveredDistanceis the actually covered distance of the opposing lane segment(s)

◆ appendLaneSegmentToRoute()

void ad::map::route::appendLaneSegmentToRoute ( route::LaneInterval const &  laneInterval,
route::FullRoute route,
route::SegmentCounter const  segmentCountFromDestination = 0u 
)

function to append a new lane interval to a road segment list

In contrast to appendRoadSegmentToRoute() here only the lane interval without any neighbors is added

Parameters
[in]laneIntervalthe new lane interval to be append
[in]routethe route the interval has to be appended
[in]segmentCountFromDestinationthe segment count for the new road segment to be created

◆ appendRoadSegmentToRoute()

void ad::map::route::appendRoadSegmentToRoute ( route::LaneInterval const &  laneInverval,
route::RouteLaneOffset const &  laneOffset,
route::FullRoute route,
lane::LaneIdSet const &  relevantLanes 
)

function to append a new lane interval to a road segment list

This function is mainly used while creation of a FullRoute object. The lane interval is expanded by it's left and right neighbor lanes (with same driving direction) to a complete road segment; which is then appended to the provided road segment list.

After the route is finished, planning::updateRoutePlanningCounters() should be called to update the planning counters.

Parameters
[in]laneIntervalthe new lane interval to be append
[in]laneOffsetthe lane offset of the new lane interval to be append
[in]routethe route the interval has to be appended
[in]relevantLanesif not empty, the function restricts the extension to the given set of lanes

◆ calcDuration() [1/3]

physics::Duration ad::map::route::calcDuration ( ConnectingRoute const &  connectingRoute)

calculate the Duration of the provided connecting route

For Duration calculations the longest route section of this is used as reference.

◆ calcDuration() [2/3]

physics::Duration ad::map::route::calcDuration ( LaneInterval const &  laneInterval)

calculate the Duration of the provided lane interval as duration value

For Duration calculations maximum allowed speed combined with the length is taken into account

◆ calcDuration() [3/3]

physics::Duration ad::map::route::calcDuration ( RoadSegment const &  roadSegment)

calculate the Duration of the provided road segment

For Duration calculations the shortest road segment of this is used as reference.

◆ calcLength() [1/4]

physics::Distance ad::map::route::calcLength ( ConnectingRoute const &  connectingRoute)

calculate the length of the provided connecting route

For length calculations the longest route section of this is used as reference.

◆ calcLength() [2/4]

physics::Distance ad::map::route::calcLength ( FindWaypointResult const &  findWaypointResult)

calculate the length of the route in respect to FindWaypointResult

calculate the length of the route up to the queryPosition of the FindWaypointResult

◆ calcLength() [3/4]

physics::Distance ad::map::route::calcLength ( LaneInterval const &  laneInterval)

calculate the length of the provided lane interval as physics::Distance value

For length calculation the parametric length of the interval (calcParametricLength()) is multiplied by the lane's length.

◆ calcLength() [4/4]

physics::Distance ad::map::route::calcLength ( RoadSegment const &  roadSegment)

calculate the length of the provided road segment

For length calculations the shortest road segment of this is used as reference.

◆ calculateBypassingRoute()

bool ad::map::route::calculateBypassingRoute ( route::FullRoute const &  route,
route::FullRoute bypassingRoute 
)

calculate a bypassing route for a given (blocked) route

This function is designed to by used to get a route around parking vehicles or for overtaking The output route makes use of neighboring lanes and respects left-hand/right-hand traffic flow The calculation fails when reaching an intersection

Parameters
[in]routeis the input route, which should not be used
[out]bypassingRouteis the new route, making use of neighboring lanes
Returns
false if no valid bypassing route was found

◆ calculateRouteParaPointAtDistance()

bool ad::map::route::calculateRouteParaPointAtDistance ( route::FullRoute const &  route,
route::RouteParaPoint const &  origin,
physics::Distance const &  distance,
route::RouteParaPoint resultingPoint 
)

calculate the RouteParaPoint at a given distance to a given RouteParaPoint

Parameters
[in]route
[in]originthe reference point to this the distance should be calculated
[in]distanceNegative value is towards begin of the route. Positive values is towards end of the route
[out]resultingPointthe point at distance to the origin RouteParaPoint

returns true if the resultingParaPoint was found in the route

◆ cutIntervalAtEnd()

LaneInterval ad::map::route::cutIntervalAtEnd ( LaneInterval const &  laneInterval,
physics::ParametricValue const &  newIntervalEnd 
)

cut the LaneInterval at a given parametric point. Will remove at the end of the LaneInterval

Parameters
[in]theLaneInterval that should be shortened
[in]newIntervalEndthe new end of the interval if the point is within the LaneInterval
Returns
resulting shortened LaneInterval

If the parametric offset is outside of the interval, the original lane interval is returned.

◆ cutIntervalAtStart()

LaneInterval ad::map::route::cutIntervalAtStart ( LaneInterval const &  laneInterval,
physics::ParametricValue const &  newIntervalStart 
)

cut the LaneInterval at a given parametric point. Will remove at the start of the LaneInterval

Parameters
[in]theLaneInterval that should be shortened
[in]newIntervalStartthe new start of the interval if the point is within the LaneInterval
Returns
resulting shortened LaneInterval

If the parametric offset is outside of the interval, the original lane interval is returned.

◆ extendIntervalFromEnd()

LaneInterval ad::map::route::extendIntervalFromEnd ( LaneInterval const &  laneInterval,
physics::Distance const &  distance 
)

extend the lane interval by moving its end position by physics::Distance

If the lane interval is degenerated nothing is done.

Parameters
[in]laneIntervalthe LaneInterval that should be extended
[in]physics::Distanceby which the LaneInterval should be extended
Returns
resulting extended LaneInterval

◆ extendIntervalFromStart()

LaneInterval ad::map::route::extendIntervalFromStart ( LaneInterval const &  laneInterval,
physics::Distance const &  distance 
)

extend the lane interval by moving its start position by physics::Distance

If the lane interval is degenerated nothing is done.

Parameters
[in]laneIntervalthe LaneInterval that should be extended
[in]physics::Distanceby which the LaneInterval should be extended
Returns
resulting extended LaneInterval

◆ extendIntervalUntilEnd()

LaneInterval ad::map::route::extendIntervalUntilEnd ( LaneInterval const &  laneInterval)

extend the lane interval until the end of the lane reached

The end is set to the lane's maximal value (depending on the route direction to 0. or 1.). If the lane interval is degenerated nothing is done.

Parameters
[in]laneIntervalthe LaneInterval that should be extended
Returns
resulting extended LaneInterval

◆ extendIntervalUntilStart()

LaneInterval ad::map::route::extendIntervalUntilStart ( LaneInterval const &  laneInterval)

extend the lane interval until the start of the lane reached

The start is set to the lane's minimal value (depending on the route direction to 1. or 0.). If the lane interval is degenerated nothing is done.

Parameters
[in]laneIntervalthe LaneInterval that should be extended
Returns
resulting extended LaneInterval

◆ extendRouteToDestinations() [1/3]

bool ad::map::route::extendRouteToDestinations ( route::FullRoute route,
const std::vector< point::ENUPoint > &  dest 
)

extends route with the given list of destinations

Parameters
[in/out]route the route to check and to extend
[in]destVector with supporting points as ENU points to be visited on the route. Last point in the list is the actual destination point.
Returns
false is returned if the route is/was empty/degenerated

◆ extendRouteToDestinations() [2/3]

bool ad::map::route::extendRouteToDestinations ( route::FullRoute route,
const std::vector< point::GeoPoint > &  dest 
)

extends route with the given list of destinations

Parameters
[in/out]route the route to check and to extend
[in]destVector with supporting points as geo points to be visited on the route. Last point in the list is the actual destination point.
Returns
false is returned if the route is/was empty/degenerated

◆ extendRouteToDestinations() [3/3]

bool ad::map::route::extendRouteToDestinations ( route::FullRoute route,
const std::vector< route::planning::RoutingParaPoint > &  dest 
)

extends route with the given list of destinations

Parameters
[in/out]route the route to check and to extend
[in]destVector with supporting points as routing parametric points to be visited on the route. Last point in the list is the actual destination point.
Returns
false is returned if the route is/was empty/degenerated

◆ extendRouteToDistance()

bool ad::map::route::extendRouteToDistance ( route::FullRoute route,
physics::Distance const &  length,
route::FullRouteList additionalRoutes,
lane::LaneIdSet const &  relevantLanes = ad::map::lane::LaneIdSet() 
)

extends route to have at least the given length

Parameters
[in/out]route the route to check and to extend
[in]lengththe minimum length
[in/out]additionalRoutes additional routes in case of intersections on the extension
[in]relevantLanesif not empty, the function restricts the extension to the given set of lanes
Returns
pair of bool and vector

true if the route has sufficient length or was extended. If false is returned the route is/was empty/degenerated or the additional routes were not empty.

◆ findCenterWaypoint()

FindWaypointResult ad::map::route::findCenterWaypoint ( match::Object const &  object,
route::FullRoute const &  route 
)

find waypoint on the route of the given object, preferable the object center

This function first calls findNearestWayPoint on the map matched position confidence list of the center position. If this doesn't lead to a result, the center points of the respective occupied regions are used to find a waypoint. The search starts with the longest region and continues in decreasing order. If this still doesn't lead to a match findNearestWayPoint of the other map matched confidence list positions is taken.

Parameters
[in]objectthe object which should be searched for within the route
[in]routethe route to search in
Returns
waypoint result containing an iterator pointing to the route segment the lane of the position is part of and the corresponding route interval having that lane id.

◆ findFirstLaneChange()

FindLaneChangeResult ad::map::route::findFirstLaneChange ( match::MapMatchedPosition const &  currentPositionEgoVehicle,
route::FullRoute const &  route 
)

finds the first route interval on a given route where a lane change is necessary to travel the given route from start to end. The function finds the first lane change only.

The result is returned by an FindLaneChangeResult which holds

  • the routeIteratorLaneChangeStart as the pointer to the route index on where the lane change can start at the earliest. A valid routeIteratorLaneChangeStart can be in the range [std::begin(route), std::end(route)[.
  • the routeIteratorLaneChangeEnd as the point on the route where the lane change needs to be finished at the latest. A valid routeIteratorLaneChangeEnd can be in the range [std::begin(route), std::end(route)[
  • the laneChangeDirection specifying if the lane change goes from left to right or right to left.

This function uses the logger of the AdMapAccess::instance() singleton.

Parameters
[in]currentPositionEgoVehiclethe currentPosition of the ego vehicle
[in]routethe route on which the first lane change is searched
Returns
a valid lane change result as described above if the route contains a lane change. Returns an invalid FindLaneChangeResult if there is no lane change on the route.
Exceptions
std::runtime_errorif the route contains invalid transitions.
std::runtime_errorif the map is not initialized or the road network could not be obtained

◆ findNearestWaypoint()

FindWaypointResult ad::map::route::findNearestWaypoint ( point::ParaPointList const &  positions,
route::FullRoute const &  route 
)

find waypoint on the route containing the given positions

find nearest waypoint on the route containing the given mapmatched positions

A version of findWaypoint() allowing the position to be a vector of positions to consider and select the result near to the begin of the route. All the given positions are searched using the findWaypoint(); therefore

See also
findWaypoint() for further details.
Parameters
[in]positionsthe position vector which should be searched for within the route
[in]routethe route to search in
Returns
waypoint result containing an iterator pointing to the route segment the lane of the position is part of and the corresponding route interval having that lane id. If multiple are matching the one nearest the begin of the route is selected.

This function will return the nearest waypoint along the route

Parameters
[in]mapMatchedPositionsthe map matched positions which should be searched for within the route
[in]routethe route to search in
Returns
waypoint result containing an iterator pointing to the route segment the lane of the position is part of and the corresponding route interval having that lane id. If multiple are matching the one nearest the begin of the route is selected.

◆ findWaypoint() [1/2]

FindWaypointResult ad::map::route::findWaypoint ( lane::LaneId const &  laneId,
route::FullRoute const &  route 
)

find a waypoint on the route containing the given laneId

The position is searched within the given full route. If the position's LaneId is present in the route, an iterator of the route is returned in conjunction with the RouteInterval defining the interval of the route covering the corresponding lane.

Parameters
[in]laneIdthe lane id which should be searched for within the route
[in]routethe route to search in
Returns
waypoint result containing an iterator pointing to the route segment the lane of the position is part of and the corresponding route interval having that lane id. The query position is (on success) the start of the lane interval within the route.

◆ findWaypoint() [2/2]

FindWaypointResult ad::map::route::findWaypoint ( point::ParaPoint const &  position,
route::FullRoute const &  route 
)

find a waypoint on the route containing the given position

The position is searched within the given full route. If the position's LaneId is present in the route, and the position's offset is within the route (i.e. the point lies within the route), an iterator of the route is returned in conjunction with the RouteInterval defining the interval of the route covering the corresponding lane.

Parameters
[in]positionthe position defining the lane id which should be searched for within the route
[in]routethe route to search in
Returns
waypoint result containing an iterator pointing to the route segment the lane of the position is part of and the corresponding route interval having that lane id. The query position is the provided position.

◆ getECEFBorderOfRoadSegment() [1/2]

lane::ECEFBorder ad::map::route::getECEFBorderOfRoadSegment ( RoadSegment const &  roadSegment)
inline

get borders of a road segment

The order of the points within the LaneGeometries are ordered according to the route direction.

Parameters
[in]roadSegmentthe road segment to extract the borders from

◆ getECEFBorderOfRoadSegment() [2/2]

lane::ECEFBorder ad::map::route::getECEFBorderOfRoadSegment ( RoadSegment const &  roadSegment,
physics::ParametricValue const  parametricOffset 
)

get borders of a road segment. The road segment is cut at a given parametric offset.

The order of the points within the LaneGeometries are ordered according to the route direction.

Parameters
[in]roadSegmentthe road segment to extract the borders from
[in]parametricOffsetparametric offset the borders are cut

◆ getECEFBorderOfRoute()

lane::ECEFBorderList ad::map::route::getECEFBorderOfRoute ( FullRoute const &  route)

get borders of a full route

The order of the points within the LaneGeometries are ordered according to the route direction. The borders of successive road segments are collected in the result vector.

Parameters
[in]routethe route to extract the borders from

◆ getENUBorder()

lane::ENUBorder ad::map::route::getENUBorder ( LaneInterval const &  laneInterval)

get the enu borders of this lane

Note: The border (left/right edge) will start with the parametric offset given by the laneInterval.

◆ getENUBorderOfRoadSegment() [1/2]

lane::ENUBorder ad::map::route::getENUBorderOfRoadSegment ( RoadSegment const &  roadSegment)
inline

get borders of a road segment

The order of the points within the LaneGeometries are ordered according to the route direction.

Parameters
[in]roadSegmentthe road segment to extract the borders from

◆ getENUBorderOfRoadSegment() [2/2]

lane::ENUBorder ad::map::route::getENUBorderOfRoadSegment ( RoadSegment const &  roadSegment,
physics::ParametricValue const  parametricOffset 
)

get borders of a road segment. The road segment is cut at a given parametric offset.

The order of the points within the LaneGeometries are ordered according to the route direction.

Parameters
[in]roadSegmentthe road segment to extract the borders from
[in]parametricOffsetparametric offset the borders are cut

◆ getENUBorderOfRoute()

lane::ENUBorderList ad::map::route::getENUBorderOfRoute ( FullRoute const &  route)

get borders of a full route

The order of the points within the LaneGeometries are ordered according to the route direction. The borders of successive road segments are collected in the result vector.

Parameters
[in]routethe route to extract the borders from

◆ getENUHeadingOfRoute()

point::ENUHeading ad::map::route::getENUHeadingOfRoute ( match::Object const &  object,
FullRoute const &  route 
)

get the ENU heading of a route at the location of the object

Parameters
objectthe object on the route
routethe route
Exceptions
std::runtime_errorif the objects map matched bounding box is not on the route

◆ getENUProjectedBorder()

lane::ENUBorder ad::map::route::getENUProjectedBorder ( LaneInterval const &  laneInterval)

get the enu borders of this lane

Note: The border (left/right edge) does not necessarily start/end with the parametric offset given by the laneInterval. Instead this offset is used for the center line and the resulting point is orthogonally projected on the edges to obtain the border

◆ getGeoBorderOfRoadSegment() [1/2]

lane::GeoBorder ad::map::route::getGeoBorderOfRoadSegment ( RoadSegment const &  roadSegment)
inline

get borders of a road segment

The order of the points within the LaneGeometries are ordered according to the route direction.

Parameters
[in]roadSegmentthe road segment to extract the borders from

◆ getGeoBorderOfRoadSegment() [2/2]

lane::GeoBorder ad::map::route::getGeoBorderOfRoadSegment ( RoadSegment const &  roadSegment,
physics::ParametricValue const  parametricOffset 
)

get borders of a road segment. The road segment is cut at a given parametric offset.

The order of the points within the LaneGeometries are ordered according to the route direction.

Parameters
[in]roadSegmentthe road segment to extract the borders from
[in]parametricOffsetparametric offset the borders are cut

◆ getGeoBorderOfRoute()

lane::GeoBorderList ad::map::route::getGeoBorderOfRoute ( FullRoute const &  route)

get borders of a full route

The order of the points within the LaneGeometries are ordered according to the route direction. The borders of successive road segments are collected in the result vector.

Parameters
[in]routethe route to extract the borders from

◆ getIntervalStart() [1/2]

point::ParaPoint ad::map::route::getIntervalStart ( FullRoute const &  route,
lane::LaneId const &  laneId 
)

get interval start as ParaPoint for a given laneId and a given route

throws if laneId not found in route

◆ getIntervalStart() [2/2]

point::ParaPoint ad::map::route::getIntervalStart ( LaneInterval const &  laneInterval)
inline

class defining a route interval with one lane

The route interval consists of the id of the lane, the start and end point of lane on the route as TParam. TParam describes a parametric point along the lane geometry. By defining the start and end of the route interval, also a direction of the route is defined ... at least if start and end points differ from each other.

If start == end, the route interval is degenerated and therefore no meaningful route direction can be derived. Only if start != end, checks like isAfterInterval(), isBeforeInterval(), isRouteDirectionPositive(), isRouteDirectionNegative() provide the expected information.

get interval start as ParaPoint

◆ getLaneParaPoint()

point::ParaPoint ad::map::route::getLaneParaPoint ( physics::ParametricValue const &  routeParametricOffset,
route::LaneInterval const &  laneInterval 
)

get the lane para points in respect to the given route parametric offset

Parameters
[in]routeParametricOffsetthe parametric offset in respect to the route
[in]laneIntervalthe laneInterval to consider, the whole lane interval is considered to be a full segment of a route.
Returns
the parametric point within the corresponding lane interval in respect to the given route parametric offset.

◆ getLaneParaPoints()

point::ParaPointList ad::map::route::getLaneParaPoints ( route::RouteParaPoint const &  routePosition,
route::FullRoute const &  route 
)

get the lane para points in respect to the given route position

Parameters
[in]routePositionthe route position to find
[in]routethe route to check for the position
Returns
the lane segment para points within the corresponding route segment. If the routePosition is not found an empty list is returned.

◆ getLeftECEFEdge()

point::ECEFEdge ad::map::route::getLeftECEFEdge ( LaneInterval const &  laneInterval)

get left edge of the lane interval as ECEFEdge

Be aware: Left is in the sense of the lane interval orientation. If the lane interval has negative direction the physical right edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getLeftEdge()

void ad::map::route::getLeftEdge ( LaneInterval const &  laneInterval,
point::ENUEdge enuEdge 
)

get Left edge of the lane interval as ENUEdge

get Left edge of the lane interval as GeoEdge

get Left edge of the lane interval as ECEFEdge

Be aware: Left is in the sense of the lane interval orientation. If the lane interval has negative direction the physical right edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getLeftENUEdge()

point::ENUEdge ad::map::route::getLeftENUEdge ( LaneInterval const &  laneInterval)

get left edge of the lane interval as ENUEdge

Be aware: Left is in the sense of the lane interval orientation. If the lane interval has negative direction the physical right edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getLeftGeoEdge()

point::GeoEdge ad::map::route::getLeftGeoEdge ( LaneInterval const &  laneInterval)

get left edge of the lane interval as GeoEdge

Be aware: Left is in the sense of the lane interval orientation. If the lane interval has negative direction the physical right edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getLeftProjectedECEFEdge()

point::ECEFEdge ad::map::route::getLeftProjectedECEFEdge ( LaneInterval const &  laneInterval)

get left edge of the lane interval as ECEFEdge using projection to find the start of the edge

Be aware: Left is in the sense of the lane interval orientation. If the lane interval has negative direction the physical right edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getLeftProjectedEdge()

void ad::map::route::getLeftProjectedEdge ( LaneInterval const &  laneInterval,
point::ENUEdge enuEdge 
)

get Left edge of the lane interval as ENUEdge using projection to find the start of the edge

get Left edge of the lane interval as GeoEdge using projection to find the start of the edge

get Left edge of the lane interval as ECEFEdge using projection to find the start of the edge

Be aware: Left is in the sense of the lane interval orientation. If the lane interval has negative direction the physical right edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getLeftProjectedENUEdge()

point::ENUEdge ad::map::route::getLeftProjectedENUEdge ( LaneInterval const &  laneInterval)

get left edge of the lane interval as ENUEdge using projection to find the start of the edge

Be aware: Left is in the sense of the lane interval orientation. If the lane interval has negative direction the physical right edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getLeftProjectedGeoEdge()

point::GeoEdge ad::map::route::getLeftProjectedGeoEdge ( LaneInterval const &  laneInterval)

get left edge of the lane interval as GeoEdge using projection to find the start of the edge

Be aware: Left is in the sense of the lane interval orientation. If the lane interval has negative direction the physical right edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getProjectedParametricOffsetOnNeighborLane()

physics::ParametricValue ad::map::route::getProjectedParametricOffsetOnNeighborLane ( LaneInterval const &  currentInterval,
LaneInterval const &  neighborInterval,
physics::ParametricValue const &  parametricOffset 
)

project a given parametric position (offset) to the center line of the given neighbor lane

Parameters
[in]currentIntervalis the current lane
[in]neighborIntervalis the neighbor lane
[in]parametricOffsetis the current position that should be projected to the neighbor lane

Note: If the given neighborInterval is not a neighbor of the currentInterval the function will throw

Returns
Projected position as parametric offset

◆ getRightECEFEdge()

point::ECEFEdge ad::map::route::getRightECEFEdge ( LaneInterval const &  laneInterval)

get right edge of the lane interval as ECEFEdge

Be aware: Right is in the sense of the lane interval orientation. If the lane interval has negative direction the physical left edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getRightEdge()

void ad::map::route::getRightEdge ( LaneInterval const &  laneInterval,
point::ENUEdge enuEdge 
)

get right edge of the lane interval as ENUEdge

get right edge of the lane interval as GeoEdge

get right edge of the lane interval as ECEFEdge

Be aware: Right is in the sense of the lane interval orientation. If the lane interval has negative direction the physical left edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getRightENUEdge()

point::ENUEdge ad::map::route::getRightENUEdge ( LaneInterval const &  laneInterval)

get right edge of the lane interval as ENUEdge

Be aware: Right is in the sense of the lane interval orientation. If the lane interval has negative direction the physical left edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getRightGeoEdge()

point::GeoEdge ad::map::route::getRightGeoEdge ( LaneInterval const &  laneInterval)

get right edge of the lane interval as GeoEdge

Be aware: Right is in the sense of the lane interval orientation. If the lane interval has negative direction the physical left edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getRightProjectedECEFEdge()

point::ECEFEdge ad::map::route::getRightProjectedECEFEdge ( LaneInterval const &  laneInterval)

get right edge of the lane interval as ECEFEdge using projection to find the start of the edge

Be aware: Right is in the sense of the lane interval orientation. If the lane interval has negative direction the physical left edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getRightProjectedEdge()

void ad::map::route::getRightProjectedEdge ( LaneInterval const &  laneInterval,
point::ENUEdge enuEdge 
)

get right edge of the lane interval as ENUEdge using projection to find the start of the edge

get right edge of the lane interval as GeoEdge using projection to find the start of the edge

get right edge of the lane interval as ECEFEdge using projection to find the start of the edge

Be aware: Right is in the sense of the lane interval orientation. If the lane interval has negative direction the physical left edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getRightProjectedENUEdge()

point::ENUEdge ad::map::route::getRightProjectedENUEdge ( LaneInterval const &  laneInterval)

get right edge of the lane interval as ENUEdge using projection to find the start of the edge

Be aware: Right is in the sense of the lane interval orientation. If the lane interval has negative direction the physical left edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getRightProjectedGeoEdge()

point::GeoEdge ad::map::route::getRightProjectedGeoEdge ( LaneInterval const &  laneInterval)

get right edge of the lane interval as GeoEdge using projection to find the start of the edge

Be aware: Right is in the sense of the lane interval orientation. If the lane interval has negative direction the physical left edge of the underlying lane is returned. Furthermore, the points are ordered in the logical lane interval direction: the first point is at lane interval start and the last one at lane interval end.

◆ getRouteExpandedToAllNeighborLanes()

route::FullRoute ad::map::route::getRouteExpandedToAllNeighborLanes ( route::FullRoute const &  route)
Returns
the input route expanded by all neighbor lanes

Internally recreates the route by calling appendRoadSegmentToRoute() with a new route having RouteCreationMode::AllNeighbors

◆ getRouteExpandedToOppositeLanes()

route::FullRoute ad::map::route::getRouteExpandedToOppositeLanes ( route::FullRoute const &  route)
Returns
the input route expanded by all lanes in opposite driving direction

Internally recreates the route by calling appendRoadSegmentToRoute() with a new route having RouteCreationMode::AllRoutableLanes

◆ getRouteIterator()

RouteIterator ad::map::route::getRouteIterator ( route::RouteParaPoint const &  routePosition,
route::FullRoute const &  route 
)

get the route iterator from a given route position

Parameters
[in]routePositionthe route position to find
[in]routethe route to check for the position
Returns
the RouteIterator pointing to the corresponding route segment. If the routePosition is not found an invalid RouteIterator is returned.

◆ getRouteParaPointFromParaPoint()

bool ad::map::route::getRouteParaPointFromParaPoint ( point::ParaPoint const &  paraPoint,
FullRoute const &  route,
route::RouteParaPoint routeParaPoint 
)

calculate the RouteParaPoint for a given ParaPoint and FullRoute

Parameters
[in]paraPointis the point under consideration
[in]route
[out]routeParaPointthe converted result

returns true if the paraPoint was found in the route

◆ getRouteSection() [1/3]

FullRoute ad::map::route::getRouteSection ( FindWaypointResult const &  currentLane,
physics::Distance const &  distanceFront,
physics::Distance const &  distanceEnd,
FullRoute const &  route,
RouteSectionCreationMode const  routeSectionCreationMode = RouteSectionCreationMode::SingleLane 
)

Return a section of the route that is within the given distance around the given LanePoint.

This section will contain the LaneInterval that the center point is located at and all the predecessors & successors of this lane up to the given distances or the start / end of the route The length of the resulting route will be distanceFront + distanceEnd except the start / end of the route is within the delta region.

Parameters
[in]currentLanespecifying the origin of the delta section as FindWaypointResult
[in]distanceto be included in the delta region towards begin of the route
[in]distanceto be included in the delta region towards end of the route
[in]theroute
[in]routeSectionCreationModethe creation mode for the route section.

return the extracted route (will be empty if the centerPoint is not found in the route)

Exceptions
std::runtime_errorif the route is inconsistent

◆ getRouteSection() [2/3]

route::FullRoute ad::map::route::getRouteSection ( match::Object const &  object,
route::FullRoute const &  route,
RouteSectionCreationMode const  routeSectionCreationMode = RouteSectionCreationMode::SingleLane 
)

Return a section of the route that is around the given object.

This section will contain the LaneInterval that the center point of the object is located at and all the predecessors & successors of this lane up to half of the objects length or the start / end of the route The length of the resulting route will be object's length except the start / end of the route is within the delta region.

Parameters
[in]objectspecifying the object as the origin and dimension of the delta section
[in]theroute
[in]routeSectionCreationModethe creation mode for the route section.

return the extracted route (will be empty if the object is not found in the route)

Exceptions
std::runtime_errorif the route is inconsistent

◆ getRouteSection() [3/3]

route::FullRoute ad::map::route::getRouteSection ( point::ParaPoint const &  centerPoint,
physics::Distance const &  distanceFront,
physics::Distance const &  distanceEnd,
route::FullRoute const &  route,
RouteSectionCreationMode const  routeSectionCreationMode = RouteSectionCreationMode::SingleLane 
)

Return a section of the route that is within the given distance around the given LanePoint.

This section will contain the LaneInterval that the center point is located at and all the predecessors & successors of this lane up to the given distances or the start / end of the route The length of the resulting route will be distanceFront + distanceEnd except the start / end of the route is within the delta region.

Parameters
[in]centerPointspecifying the origin of the delta section
[in]distanceto be included in the delta region towards begin of the route
[in]distanceto be included in the delta region towards end of the route
[in]theroute
[in]routeSectionCreationModethe creation mode for the route section.

return the extracted route (will be empty if the centerPoint is not found in the route)

Exceptions
std::runtime_errorif the route is inconsistent

◆ getSignedDistance()

physics::ParametricValue ad::map::route::getSignedDistance ( LaneInterval const &  laneInterval,
point::ParaPoint const &  first,
point::ParaPoint const &  second 
)

get the signed parametric physics::Distance between two parametric points respecting the laneInterval's direction

Return values
>0, if the first point is before the second point within the interval
<0, if the second point is before the first point within the interval
=0, if both are equal
Exceptions
std::invalid_argumentif the parametric points are not referring to the landId

◆ getUnsignedDistance()

physics::ParametricValue ad::map::route::getUnsignedDistance ( LaneInterval const &  laneInterval,
point::ParaPoint const &  first,
point::ParaPoint const &  second 
)

get the unsigned parametric physics::Distance between two parametric points

Return values
|first.parametricOffset - second.parametricOffset |
Exceptions
std::invalid_argumentif the parametric points are not referring to the landId

◆ intersectionOnRoute()

FindWaypointResult ad::map::route::intersectionOnRoute ( intersection::Intersection const &  intersection,
route::FullRoute const &  route 
)

find waypoint on the route containing a lane of the given intersection

This function will return the nearest waypoint along the route

Parameters
[in]intersectionwhich inner lanes should be searched for within the route
[in]routethe route to search in
Returns
waypoint result containing an iterator pointing to the route segment the lane of the intersection is part of and the corresponding route interval having that lane id. If multiple are matching the one nearest the begin of the route is selected.

◆ isAfterInterval() [1/2]

bool ad::map::route::isAfterInterval ( LaneInterval const &  laneInterval,
physics::ParametricValue const  parametricOffset 
)
inline

checks if the parametric offset is after the interval

Parameters
[in]parametricOffsetparametric offset to be checked against the route interval
Returns
true if given parametric offset is after the interval Be aware: if the route interval is degenerated isAfterInterval() and isBeforeInterval() return the same value

◆ isAfterInterval() [2/2]

bool ad::map::route::isAfterInterval ( LaneInterval const &  laneInterval,
point::ParaPoint const &  point 
)
inline

checks if the point is after the interval

Parameters
[in]pointparametric point to be checked against the route interval
Returns
true if LaneId matches and TParam of the given point is after the interval Be aware: if the route interval is degenerated isAfterInterval() and isBeforeInterval() return the same value ( point != end )

◆ isBeforeInterval() [1/2]

bool ad::map::route::isBeforeInterval ( LaneInterval const &  laneInterval,
physics::ParametricValue const  parametricOffset 
)
inline

checks if the parametric offset is before the interval

Parameters
[in]parametricOffsetparametric offset to be checked against the route interval
Returns
true if parametric offset is before the interval Be aware: if the route interval is degenerated isAfterInterval() and isBeforeInterval() return the same value

◆ isBeforeInterval() [2/2]

bool ad::map::route::isBeforeInterval ( LaneInterval const &  laneInterval,
point::ParaPoint const &  point 
)
inline

checks if the point is before the interval

Parameters
[in]pointparametric point to be checked against the route interval
Returns
true if LaneId matches and TParam of the given point is before the interval Be aware: if the route interval is degenerated isAfterInterval() and isBeforeInterval() return the same value ( point != start )

◆ isConnectedRoutePartOfAnIntersection()

bool ad::map::route::isConnectedRoutePartOfAnIntersection ( route::ConnectingRoute const &  connectingRoute)
Returns
true if the connecting route contains road segments which are part of an intersection

◆ isDegenerated()

bool ad::map::route::isDegenerated ( LaneInterval const &  laneInterval)
inline

checks if the interval is degenerated

The interval is degenerated if start and end of the interval are equal. In such a case no meaningful information on route direction is possible.

Returns
true if the interval is degenerated: start == end

◆ isEndOfInterval()

bool ad::map::route::isEndOfInterval ( LaneInterval const &  laneInterval,
point::ParaPoint const &  point 
)
inline

checks if the point marks the end of the interval

Parameters
[in]pointparametric point to be checked against the route interval end
Returns
true if LaneId and TParam at end of this matches the given point

◆ isObjectHeadingInRouteDirection()

bool ad::map::route::isObjectHeadingInRouteDirection ( match::Object const &  object,
FullRoute const &  route 
)

compare the ENU heading of the route at the location of the object with the ENU heading of the object

Returns
true if the difference between object heading and route heading at the object position is not larger than 90°
Exceptions
std::runtime_errorif the objects map matched bounding box is not on the route

◆ isRouteDirectionNegative()

bool ad::map::route::isRouteDirectionNegative ( LaneInterval const &  laneInterval)
inline

checks if the direction of this route interval is negative in respect to the lane geometry

Returns
!isRouteDirectionPositive()

◆ isRouteDirectionPositive()

bool ad::map::route::isRouteDirectionPositive ( LaneInterval const &  laneInterval)

checks if the direction of this route interval is positive in respect to the lane geometry

Returns
true if the parametric points follow: start < end
lane::isLaneDirectionPositive(laneInterval.laneId) ^ wrongWay if start == end (degenerated interval uses wrong way flag to determine the route direction)

◆ isStartOfInterval()

bool ad::map::route::isStartOfInterval ( LaneInterval const &  laneInterval,
point::ParaPoint const &  point 
)
inline

checks if the point marks the start of the interval

Parameters
[in]pointparametric point to be checked against the route interval start
Returns
true if LaneId and TParam at start of this matches the given point

◆ isWithinInterval() [1/3]

bool ad::map::route::isWithinInterval ( LaneInterval const &  laneInterval,
physics::ParametricValue const &  parametricOffset 
)
inline

checks if the parametric offset is within the interval

Parameters
[in]parametricOffsetparametric offset to be checked against the route interval
Returns
true if parametric offset is within the interval

◆ isWithinInterval() [2/3]

bool ad::map::route::isWithinInterval ( LaneInterval const &  laneInterval,
point::ParaPoint const &  point 
)
inline

checks if the point is within the interval

Parameters
[in]pointparametric point to be checked against the route interval
Returns
true if LaneId matches and TParam of the given point is within the interval

◆ isWithinInterval() [3/3]

bool ad::map::route::isWithinInterval ( RoadSegment const &  roadSegment,
point::ParaPoint const &  point 
)

checks if the point is within the roadSegment

Parameters
[in]pointparametric point to be checked against the road segment
Returns
true if the point is within one of the segments lane intervals

◆ objectOnRoute()

FindWaypointResult ad::map::route::objectOnRoute ( match::MapMatchedObjectBoundingBox const &  object,
route::FullRoute const &  route 
)

find nearest waypoint on the route containing the given mapmatched bounding box

This function will return the nearest waypoint along the route

Parameters
[in]objectwhich position which should be searched for within the route
[in]routethe route to search in
Returns
waypoint result containing an iterator pointing to the route segment the lane of the position is part of and the corresponding route interval having that lane id. If multiple are matching the one nearest the begin of the route is selected.

◆ operator<<() [1/9]

std::ostream& ad::map::route::operator<< ( std::ostream &  os,
ConnectingRoute const &  _value 
)
inline

standard ostream operator

Parameters
[in]osThe output stream to write to
[in]_valueConnectingRoute value
Returns
The stream object.

◆ operator<<() [2/9]

std::ostream& ad::map::route::operator<< ( std::ostream &  os,
ConnectingRouteType const &  value 
)
inline

standard ostream operator

Parameters
[in]osThe output stream to write to
[in]valueConnectingRouteType value
Returns
The stream object.

◆ operator<<() [3/9]

std::ostream& ad::map::route::operator<< ( std::ostream &  os,
FullRoute const &  _value 
)
inline

standard ostream operator

Parameters
[in]osThe output stream to write to
[in]_valueFullRoute value
Returns
The stream object.

◆ operator<<() [4/9]

std::ostream& ad::map::route::operator<< ( std::ostream &  os,
LaneChangeDirection const &  value 
)
inline

standard ostream operator

Parameters
[in]osThe output stream to write to
[in]valueLaneChangeDirection value
Returns
The stream object.

◆ operator<<() [5/9]

std::ostream& ad::map::route::operator<< ( std::ostream &  os,
LaneInterval const &  _value 
)
inline

standard ostream operator

Parameters
[in]osThe output stream to write to
[in]_valueLaneInterval value
Returns
The stream object.

◆ operator<<() [6/9]

std::ostream& ad::map::route::operator<< ( std::ostream &  os,
LaneSegment const &  _value 
)
inline

standard ostream operator

Parameters
[in]osThe output stream to write to
[in]_valueLaneSegment value
Returns
The stream object.

◆ operator<<() [7/9]

std::ostream& ad::map::route::operator<< ( std::ostream &  os,
RoadSegment const &  _value 
)
inline

standard ostream operator

Parameters
[in]osThe output stream to write to
[in]_valueRoadSegment value
Returns
The stream object.

◆ operator<<() [8/9]

std::ostream& ad::map::route::operator<< ( std::ostream &  os,
RouteCreationMode const &  value 
)
inline

standard ostream operator

Parameters
[in]osThe output stream to write to
[in]valueRouteCreationMode value
Returns
The stream object.

◆ operator<<() [9/9]

std::ostream& ad::map::route::operator<< ( std::ostream &  os,
RouteParaPoint const &  _value 
)
inline

standard ostream operator

Parameters
[in]osThe output stream to write to
[in]_valueRouteParaPoint value
Returns
The stream object.

◆ overlapsInterval()

bool ad::map::route::overlapsInterval ( LaneInterval const &  laneInterval,
physics::ParametricRange const &  range 
)
inline

checks if the range overlaps with the interval

Parameters
[in]rangeparametric range to be checked against the route interval
Returns
true if range overlaps with the interval

◆ restrictIntervalFromBegin()

LaneInterval ad::map::route::restrictIntervalFromBegin ( LaneInterval const &  laneInterval,
physics::Distance const &  distance 
)

Restrict length of the LaneInterval to a given physics::Distance from start.

Parameters
[in]laneIntervalthe LaneInterval that should be restricted
[in]physics::Distancethe LaneInterval should be restricted to
Returns
resulting shortened LaneInterval

If physics::Distance is bigger then the length of the interval. Resulting LaneInterval is the input Interval.

◆ shortenIntervalFromBegin()

LaneInterval ad::map::route::shortenIntervalFromBegin ( LaneInterval const &  laneInterval,
physics::Distance const &  distance 
)

shorten the LaneInterval about a given physics::Distance. Will remove at the begin of the LaneInterval

Parameters
[in]theLaneInterval that should be shortened
[in]physics::Distancethe LaneInterval should be shortened
Returns
resulting shortened LaneInterval

If physics::Distance is bigger then the length of the interval. Resulting length will be zero. LaneInterval.start = LaneInterval.end

◆ shortenIntervalFromEnd()

LaneInterval ad::map::route::shortenIntervalFromEnd ( LaneInterval const &  laneInterval,
physics::Distance const &  distance 
)

shorten the LaneInterval about a given physics::Distance. Will remove at the end of the LaneInterval

Parameters
[in]laneIntervalthe LaneInterval that should be shortened
[in]physics::Distancethe LaneInterval should be shortened
Returns
resulting shortened LaneInterval

If physics::Distance is bigger then the length of the interval. Resulting length will be zero. LaneInterval.end = LaneInterval.start

◆ shortenRoute() [1/2]

ShortenRouteResult ad::map::route::shortenRoute ( point::ParaPoint const &  currentPosition,
route::FullRoute route,
ShortenRouteMode const  shortenRouteMode = ShortenRouteMode::Normal 
)

follow the route up to a certain position and shorten the route accordingly

Parameters
[in]currentPositionthe position which should mark the start of the route after shortening
[in/out]route the route to be shortened
[in]extendIfSucceededBeforeRouteif this flag is set true,
Return values
ShortenRouteResult::Succeeded,SucceededBeforeRoute::SucceededBeforeRouteif the shortening request was accepted resulting in a valid route.
ShortenRouteResult::SucceededRouteEmptyif the shortening request was accepted resulting in an empty route (i.e. end of route just crossed).
ShortenRouteResult::FailedRouteEmptyif the shortening failed and resulting route is empty.

◆ shortenRoute() [2/2]

ShortenRouteResult ad::map::route::shortenRoute ( point::ParaPointList const &  currentPositions,
route::FullRoute route,
ShortenRouteMode const  shortenRouteMode = ShortenRouteMode::Normal 
)

follow the route up to a certain position and shorten the route accordingly

Overloaded version of shortenRoute() allow the position to be a vector of positions to consider. If multiple of the positions were actually present within the route, the one is selected providing the longest resulting route.

Parameters
[in]currentPositionsthe vector of positions which should mark the start of the route after shortening
[in/out]route the route to be shortened
Return values
ShortenRouteResult::Succeeded,SucceededBeforeRoute::SucceededBeforeRouteif the shortening request was accepted resulting in a valid route.
ShortenRouteResult::SucceededRouteEmptyif the shortening request was accepted resulting in an empty route (i.e. end of route just crossed).
ShortenRouteResult::FailedRouteEmptyif the shortening failed and resulting route is empty.

Overloaded version of shortenRoute() allow the position to be a list of mapmatched positions to consider. If multiple of the positions were actually present within the route, the one is selected providing the longest resulting route.

Parameters
[in]mapMatchedPositionsthe map matched positions which should mark the start of the route after shortening
[in/out]route the route to be shortened
Return values
ShortenRouteResult::Succeeded,SucceededBeforeRoute::SucceededBeforeRouteif the shortening request was accepted resulting in a valid route.
ShortenRouteResult::SucceededRouteEmptyif the shortening request was accepted resulting in an empty route (i.e. end of route just crossed).
ShortenRouteResult::FailedRouteEmptyif the shortening failed and resulting route is empty.

◆ shortenRouteToDistance()

void ad::map::route::shortenRouteToDistance ( route::FullRoute route,
const physics::Distance &  length 
)

shorten the route from the end to have at maximum the given length

A cut of the route is not performed within an intersection, the intersection is kept fully within the route.

Parameters
[in/out]route the route to check and to shorten at the end
[in]lengththe maximum length

◆ shortenSegmentFromBegin()

void ad::map::route::shortenSegmentFromBegin ( RoadSegment roadSegment,
physics::Distance const &  distance 
)

Shorten the provided road segment by a certain distance from the begin.

The intervals of the segment are shortened as described in shortenIntervalFromBegin()

Exceptions
std::runtime_errorif the roadSegment is invalid

◆ shortenSegmentFromEnd()

void ad::map::route::shortenSegmentFromEnd ( RoadSegment roadSegment,
physics::Distance const &  distance 
)

Shorten the provided road segment by a certain distance from the end.

The intervals of the segment are shortened as described in shortenIntervalFromEnd()

Exceptions
std::runtime_errorif the roadSegment is invalid

◆ signedDistanceToLane()

physics::Distance ad::map::route::signedDistanceToLane ( lane::LaneId const &  checkLaneId,
FullRoute const &  route,
match::MapMatchedPositionConfidenceList const &  mapMatchedPositions 
)

get the signed distance to a lane w.r.t to a given route (direction) for the map matched positions

This check searches the mapMatchedPositions for the given checkLaneId and returns a signed distance value to the lane.

Parameters
[in]checkLaneIdthe lane id to find
[in]routein which the lane should be in
[in]mapMatchedPositionsthe map matched positions to check
Returns
: If not part of the mapMatchedPositions: distance = std::numeric_limits<physics::Distance>::max() If it's found and map matched type is:
  • map matched position is on the lane: distance = 0
  • map matched position is left of lane: distance < 0
  • map matched position is right of lane: distance > 0
Exceptions
std::runtime_errorif the lane is not found inside the route