ad_map_access
Classes | Typedefs | Enumerations | Functions
ad::map::access Namespace Reference

namespace access More...

Classes

class  Factory
 Autonomus Driving Map Factory. Contains method to be used to initialize and modify content in the Store. More...
 
struct  GeometryStoreItem
 DataType GeometryStoreItem. More...
 
struct  MapMetaData
 DataType MapMetaData. More...
 
class  PartitionId
 DataType PartitionId. More...
 
class  Store
 Autonomus Driving Map Store. More...
 

Typedefs

typedef std::vector<::ad::map::access::PartitionIdPartitionIdList
 DataType PartitionIdList.
 

Enumerations

enum  TrafficType : int32_t { TrafficType::INVALID = 0, TrafficType::LEFT_HAND_TRAFFIC = 1, TrafficType::RIGHT_HAND_TRAFFIC = 2 }
 DataType TrafficType. More...
 

Functions

std::ostream & operator<< (std::ostream &os, GeometryStoreItem const &_value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, MapMetaData const &_value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, PartitionId const &_value)
 standard ostream operator More...
 
std::ostream & operator<< (std::ostream &os, TrafficType const &value)
 standard ostream operator More...
 
std::shared_ptr< spdlog::logger > getLogger ()
 get the admap logger
 
bool isValid (MapMetaData const &metaData, bool const logErrors=true)
 checks if the given MapMetaData is valid More...
 
std::shared_ptr< point::CoordinateTransformgetCoordinateTransform ()
 get the coordinate transformation object
 
bool init (std::string const &configFileName)
 initialize singleton with given configuration file More...
 
bool initFromOpenDriveContent (std::string const &openDriveContent, double const overlapMargin, intersection::IntersectionType const defaultIntersectionType, landmark::TrafficLightType const defaultTrafficLightType=landmark::TrafficLightType::SOLID_RED_YELLOW_GREEN)
 initialize singleton with OpenDRIVE content More...
 
bool init (Store::Ptr store)
 initialize singleton with given store More...
 
void cleanup ()
 remove all loaded maps and configuration
 
void setENUReferencePoint (point::GeoPoint const &point)
 set the current ENU reference point More...
 
point::GeoPoint getENUReferencePoint ()
 get the current ENU reference point set in the map More...
 
bool isENUReferencePointSet ()
 check if ENU Reference Point is set
 
std::vector< config::PointOfInterestgetPointsOfInterest (point::GeoPoint const &geoPoint, physics::Distance const &radius)
 get points of interest in the surrounding of a given geoPoint More...
 
const std::vector< config::PointOfInterest > & getPointsOfInterest ()
 get all points of interest More...
 
bool getPointOfInterest (std::string const &name, config::PointOfInterest &poi)
 get a certain point of interest if exists More...
 
bool isLeftHandedTraffic ()
 
bool isRightHandedTraffic ()
 
StoregetStore ()
 

Detailed Description

namespace access

Accessing map data

Enumeration Type Documentation

◆ TrafficType

enum ad::map::access::TrafficType : int32_t
strong

DataType TrafficType.

Country specific standard traffic regulation, in bidirectional traffic, of keeping to one side of the road.

Enumerator
INVALID 

Invalid value.

LEFT_HAND_TRAFFIC 

Traffic is on left side of the road (e.g. in UK)

RIGHT_HAND_TRAFFIC 

Traffic is on right side of the road.

Function Documentation

◆ getENUReferencePoint()

point::GeoPoint ad::map::access::getENUReferencePoint ( )

get the current ENU reference point set in the map

Returns
Set ENU reference point in Geo coordinates

◆ getPointOfInterest()

bool ad::map::access::getPointOfInterest ( std::string const &  name,
config::PointOfInterest poi 
)

get a certain point of interest if exists

Calls getPointsOfInterest() and searches for the point with the given name.

Parameters
[in]namethe name of the POI to query
[out]poithe found PointOfInterest
Returns
true if the PointOfInterest with the given name if exits

◆ getPointsOfInterest() [1/2]

const std::vector<config::PointOfInterest>& ad::map::access::getPointsOfInterest ( )

get all points of interest

Returns
the complete list of PointOfInterest currently available

◆ getPointsOfInterest() [2/2]

std::vector<config::PointOfInterest> ad::map::access::getPointsOfInterest ( point::GeoPoint const &  geoPoint,
physics::Distance const &  radius 
)

get points of interest in the surrounding of a given geoPoint

Parameters
[in]geoPointGeoPoint to be used to query the POIs
[in]radiusradius to be use for the query
Returns
the list with the PointOfInterest within the queried region.

◆ getStore()

Store& ad::map::access::getStore ( )
Returns
reference to the map store object

◆ init() [1/2]

bool ad::map::access::init ( std::string const &  configFileName)

initialize singleton with given configuration file

The configuration file specifies all available maps, see ConfigFileHandler for details of the semantics

Returns
true if initialization was successful (i.e. config file exists or singleton was already initialized)
false if config file doesn't exist or the singleton was already initialized with a different config file

◆ init() [2/2]

bool ad::map::access::init ( Store::Ptr  store)

initialize singleton with given store

No map files will be read. The store has to be filled by other means.

◆ initFromOpenDriveContent()

bool ad::map::access::initFromOpenDriveContent ( std::string const &  openDriveContent,
double const  overlapMargin,
intersection::IntersectionType const  defaultIntersectionType,
landmark::TrafficLightType const  defaultTrafficLightType = landmark::TrafficLightType::SOLID_RED_YELLOW_GREEN 
)

initialize singleton with OpenDRIVE content

Returns
true if initialization was successful (i.e. map content was valid or singleton was already initialized)
false if map content was invalid or the singleton was already initialized with a different config file

◆ isLeftHandedTraffic()

bool ad::map::access::isLeftHandedTraffic ( )
Returns
true if the map is a left hand traffic map

◆ isRightHandedTraffic()

bool ad::map::access::isRightHandedTraffic ( )
Returns
true if the map is a left hand traffic map

◆ isValid()

bool ad::map::access::isValid ( MapMetaData const &  metaData,
bool const  logErrors = true 
)
inline

checks if the given MapMetaData is valid

The metaData is valid if it's within valid input range.

◆ operator<<() [1/4]

std::ostream& ad::map::access::operator<< ( std::ostream &  os,
GeometryStoreItem const &  _value 
)
inline

standard ostream operator

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

◆ operator<<() [2/4]

std::ostream& ad::map::access::operator<< ( std::ostream &  os,
MapMetaData const &  _value 
)
inline

standard ostream operator

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

◆ operator<<() [3/4]

std::ostream& ad::map::access::operator<< ( std::ostream &  os,
PartitionId const &  _value 
)
inline

standard ostream operator

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

◆ operator<<() [4/4]

std::ostream& ad::map::access::operator<< ( std::ostream &  os,
TrafficType const &  value 
)
inline

standard ostream operator

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

◆ setENUReferencePoint()

void ad::map::access::setENUReferencePoint ( point::GeoPoint const &  point)

set the current ENU reference point

Parameters
[in]pointthe geo point defining the reference point