ad_map_access
Public Member Functions | Static Public Member Functions | List of all members
ad::map::match::AdMapMatching Class Reference

performs map matching of a given point to the map More...

#include <ad/map/match/AdMapMatching.hpp>

Public Member Functions

 AdMapMatching ()
 default constructor
 
 ~AdMapMatching ()=default
 destructor
 
void setMaxHeadingHintFactor (double newHeadingHintFactor)
 set the maximum probability multiplier for heading hints
 
double getMaxHeadingHintFactor () const
 get the maximum probability multiplier for heading hints
 
void setRouteHintFactor (double newRouteHintFactor)
 set the probability multiplier for valid route hints
 
double getRouteHintFactor () const
 get the probability multiplier for valid route hints
 
void addHeadingHint (point::ECEFHeading const &headingHint)
 add a hint for the heading of the vehicle/object More...
 
void addHeadingHint (point::ENUHeading const &yaw, point::GeoPoint const &enuReferencePoint)
 add a hint for the heading of the vehicle/object More...
 
void clearHeadingHints ()
 clears the list of heading hints
 
void addRouteHint (route::FullRoute const &routeHint)
 add a hint for the route of the vehicle/object More...
 
void clearRouteHints ()
 clears the list of route hints
 
void clearHints ()
 clears route and heading hints at once
 
void setRelevantLanes (::ad::map::lane::LaneIdSet const &relevantLanes)
 set the lanes that are relevant for map matching All the rest of the lanes in the map are ignored.
 
void clearRelevantLanes ()
 clear the list of relevant lanes.
 
MapMatchedPositionConfidenceList getMapMatchedPositions (point::GeoPoint const &geoPoint, physics::Distance const &distance, physics::Probability const &minProbability) const
 get the map matched positions More...
 
MapMatchedPositionConfidenceList getMapMatchedPositions (point::ENUPoint const &enuPoint, point::GeoPoint const &enuReferencePoint, physics::Distance const &distance, physics::Probability const &minProbability) const
 get the map matched positions More...
 
MapMatchedPositionConfidenceList getMapMatchedPositions (point::ENUPoint const &enuPoint, physics::Distance const &distance, physics::Probability const &minProbability) const
 get the map matched positions More...
 
MapMatchedPositionConfidenceList getMapMatchedPositions (ENUObjectPosition const &enuObjectPosition, physics::Distance const &distance, physics::Probability const &minProbability)
 get the map matched positions More...
 
MapMatchedObjectBoundingBox getMapMatchedBoundingBox (ENUObjectPosition const &enuObjectPosition, physics::Distance const &samplingDistance=physics::Distance(1.)) const
 get the map matched bounding box More...
 
LaneOccupiedRegionList getLaneOccupiedRegions (ENUObjectPositionList enuObjectPositionList, physics::Distance const &samplingDistance=physics::Distance(1.)) const
 get the lane occupied regions from a list of ENUObjectPositionList More...
 
point::ENUHeading getLaneENUHeading (MapMatchedPosition const &mapMatchedPosition) const
 Method to be called to retrieve the lane heading at a mapMatchedPosition.
 

Static Public Member Functions

static MapMatchedPositionConfidenceList findLanes (point::ECEFPoint const &ecefPoint, physics::Distance const &distance, ::ad::map::lane::LaneIdSet const &relevantLanes=::ad::map::lane::LaneIdSet())
 Spatial Lane Search. Returns all Lanes where any part of surface is less than specified physics::Distance from given point. More...
 
static MapMatchedPositionConfidenceList findLanes (point::GeoPoint const &geoPoint, physics::Distance const &distance, ::ad::map::lane::LaneIdSet const &relevantLanes=::ad::map::lane::LaneIdSet())
 Spatial Lane Search. Returns all Lanes where any part of surface is less than specified physics::Distance from given point. More...
 
static MapMatchedPositionConfidenceList findRouteLanes (point::ECEFPoint const &ecefPoint, route::FullRoute const &route)
 Spatial Lane Search. Returns the map matched position in respect to all Lanes of the given route. More...
 

Detailed Description

performs map matching of a given point to the map

In general, there are multiple possible matches for a given point available, especially if the point is e.g. located within an intersection area. Therefore, map matching always returns a std::multimap of map matched positions ordered by their probabilities.

Besides the actual position, there are additional input parameters influencing the probabilistic calculation. Observed heading or possible routes of a vehicle/object can be provided to influence the map matching result.

Member Function Documentation

◆ addHeadingHint() [1/2]

void ad::map::match::AdMapMatching::addHeadingHint ( point::ECEFHeading const &  headingHint)
inline

add a hint for the heading of the vehicle/object

It is possible to provide hints on the heading of the vehicle/object to be considered on map matching. This increases the map matching probabilities for lanes with respective direction. The matches are multiplied with a headingFactor:

  1. <= headingFactor <= getMaxHeadingHintFactor()
Parameters
[in]headingHintthe heading hint of the object/vehicle to consider

◆ addHeadingHint() [2/2]

void ad::map::match::AdMapMatching::addHeadingHint ( point::ENUHeading const &  yaw,
point::GeoPoint const &  enuReferencePoint 
)
inline

add a hint for the heading of the vehicle/object

It is possible to provide hints on the heading of the vehicle/object to be considered on map matching. This increases the map matching probabilities for lanes with respective direction.

Parameters
[in]yawthe yaw of the object/vehicle to consider
[in]enuReferencePointthe reference point of the corresponding ENUCoordinate system

◆ addRouteHint()

void ad::map::match::AdMapMatching::addRouteHint ( route::FullRoute const &  routeHint)
inline

add a hint for the route of the vehicle/object

This function allows to provide a hint for the current route of the object. This increases the map matching probabilities for lanes along the route.

Parameters
[in]routeHintthe route hint to consider

◆ findLanes() [1/2]

static MapMatchedPositionConfidenceList ad::map::match::AdMapMatching::findLanes ( point::ECEFPoint const &  ecefPoint,
physics::Distance const &  distance,
::ad::map::lane::LaneIdSet const &  relevantLanes = ::ad::map::lane::LaneIdSet() 
)
static

Spatial Lane Search. Returns all Lanes where any part of surface is less than specified physics::Distance from given point.

Parameters
[in]ecefPointPoint that is used as base for the search.
[in]distanceSearch radius.
[in]relevantLanesif not empty, the function restricts the search to the given set of lanes

This static function doesn't make use of any matching hints.

Returns
Map matching results that satisfy search criteria.

◆ findLanes() [2/2]

static MapMatchedPositionConfidenceList ad::map::match::AdMapMatching::findLanes ( point::GeoPoint const &  geoPoint,
physics::Distance const &  distance,
::ad::map::lane::LaneIdSet const &  relevantLanes = ::ad::map::lane::LaneIdSet() 
)
static

Spatial Lane Search. Returns all Lanes where any part of surface is less than specified physics::Distance from given point.

Parameters
[in]geoPointPoint that is used as base for the search.
[in]distanceSearch radius.
[in]relevantLanesif not empty, the function restricts the search to the given set of lanes

This static function doesn't make use of any matching hints.

Returns
Map matching results that satisfy search criteria. The individual matching result probabilities are equal.

◆ findRouteLanes()

static MapMatchedPositionConfidenceList ad::map::match::AdMapMatching::findRouteLanes ( point::ECEFPoint const &  ecefPoint,
route::FullRoute const &  route 
)
static

Spatial Lane Search. Returns the map matched position in respect to all Lanes of the given route.

Parameters
[in]ecefPointPoint that is used as base for the search.
[in]routeThe route providing the lane subset to be searched.

This static function doesn't make use of any matching hints.

Returns
The individual matching result probabilities are relative to the actual distance of the matchedPoint to the queryPoint.

◆ getLaneOccupiedRegions()

LaneOccupiedRegionList ad::map::match::AdMapMatching::getLaneOccupiedRegions ( ENUObjectPositionList  enuObjectPositionList,
physics::Distance const &  samplingDistance = physics::Distance(1.) 
) const

get the lane occupied regions from a list of ENUObjectPositionList

Merge the lane occupied regions of the getMapMatchedBoundingBox() results of all position entries. See getMapMatchedBoundingBox() for a detailed description. For a correct handling of the inner borders crossed on matching a bigger object, this function only works as expected if the the provided enuObjectPositionList covers the whole object.

Parameters
[in]enuObjectPositionListlist of ENUObjectPosition entries
[in]samplingDistanceThe step size to be used to perform map matching in between the vehicle boundaries A samplingDistance of 0.1 at a car (3x5m) means 1500x map matching. With a distance of 1.0 we get only 15x map matching.
Returns
the map matched bounding box of the object

◆ getMapMatchedBoundingBox()

MapMatchedObjectBoundingBox ad::map::match::AdMapMatching::getMapMatchedBoundingBox ( ENUObjectPosition const &  enuObjectPosition,
physics::Distance const &  samplingDistance = physics::Distance(1.) 
) const

get the map matched bounding box

Calculate the map matched bounding box. This will calculate the map matched positions of all the corner points and the center point In addition it will calculate all lane regions that are covered by the bounding box by sampling the objects geometry in between with the provided samplingDistance

Parameters
[in]enuObjectPositionobject position, orientation, dimensions and ENRReferencePoint to match against the map in ENU coordinate frame
[in]samplingDistanceThe step size to be used to perform map matching in between the vehicle boundaries This parameter is heavily influencing the performance of this function: A samplingDistance of 0.1 at a car (3x5m) means 1500x map matching. With a distance of 1.0 we get only 15x map matching.
Returns
the map matched bounding box of the object

◆ getMapMatchedPositions() [1/4]

MapMatchedPositionConfidenceList ad::map::match::AdMapMatching::getMapMatchedPositions ( ENUObjectPosition const &  enuObjectPosition,
physics::Distance const &  distance,
physics::Probability const &  minProbability 
)

get the map matched positions

Calculate the map matched positions and return these.

Parameters
[in]enuObjectPositionobject position, orientation, dimensions and ENRReferencePoint to match against the map in ENU coordinate frame
[in]distancesearch radius around geoPoint to select a lane as a match
[in]minProbabiltyA probability threshold to be considered for the results.

The orientation of the ENUObjectPosition is set as heading hint before matching and cleared afterwards This function makes use of the ENUReferencePoint of the provided ENUObjectPosition. The dimensions of the ENUObjectPosition is not required.

◆ getMapMatchedPositions() [2/4]

MapMatchedPositionConfidenceList ad::map::match::AdMapMatching::getMapMatchedPositions ( point::ENUPoint const &  enuPoint,
physics::Distance const &  distance,
physics::Probability const &  minProbability 
) const

get the map matched positions

Calculate the map matched positions and return these.

Parameters
[in]enuPointposition to match against the map in ENU coordinate frame
[in]distancesearch radius around geoPoint to select a lane as a match
[in]minProbabiltyA probability threshold to be considered for the results.

This function makes use of the globally set ENUReferencePoint (see AdMapAccess::setENUReferencePoint())

◆ getMapMatchedPositions() [3/4]

MapMatchedPositionConfidenceList ad::map::match::AdMapMatching::getMapMatchedPositions ( point::ENUPoint const &  enuPoint,
point::GeoPoint const &  enuReferencePoint,
physics::Distance const &  distance,
physics::Probability const &  minProbability 
) const

get the map matched positions

Calculate the map matched positions and return these.

Parameters
[in]enuPointposition to match against the map in ENU coordinate frame
[in]enuReferencePointthe enu reference point
[in]distancesearch radius around geoPoint to select a lane as a match
[in]minProbabiltyA probability threshold to be considered for the results.

◆ getMapMatchedPositions() [4/4]

MapMatchedPositionConfidenceList ad::map::match::AdMapMatching::getMapMatchedPositions ( point::GeoPoint const &  geoPoint,
physics::Distance const &  distance,
physics::Probability const &  minProbability 
) const

get the map matched positions

Calculate the map matched positions and return these.

Parameters
[in]geoPointposition to match against the map
[in]distancesearch radius around geoPoint to select a lane as a match
[in]minProbabiltyA probability threshold to be considered for the results.

The documentation for this class was generated from the following file: