Public Member Functions | List of all members
lanelet::LaneletMap Class Reference

Basic element for accessing and managing the elements of a map. More...

#include <LaneletMap.h>

Inheritance diagram for lanelet::LaneletMap:
Inheritance graph
[legend]

Public Member Functions

void add (Area area)
 adds an area and all the elements it owns More...
 
void add (const RegulatoryElementPtr &regElem)
 adds a new regulatory element and all elements it owns to the map. More...
 
void add (Lanelet lanelet)
 adds a lanelet and all the elements it owns to the map More...
 
void add (LineString3d lineString)
 adds a new lineString and all elements it owns to the map. More...
 
void add (Point3d point)
 adds a new point and all elements it owns to the map. More...
 
void add (Polygon3d polygon)
 adds a new polygon and all elements it owns to the map. More...
 
 LaneletMapLayers ()=default
 
 LaneletMapLayers (const LaneletLayer::Map &lanelets, const AreaLayer::Map &areas, const RegulatoryElementLayer::Map &regulatoryElements, const PolygonLayer::Map &polygons, const LineStringLayer::Map &lineStrings, const PointLayer::Map &points)
 Construct from already initialized layers. More...
 
 LaneletMapLayers (const LaneletMapLayers &rhs)=delete
 
 LaneletMapLayers (LaneletMapLayers &&rhs) noexcept=default
 
- Public Member Functions inherited from lanelet::LaneletMapLayers
bool empty () const noexcept
 Returns whether all layers of this object are empty. More...
 
 LaneletMapLayers ()=default
 
 LaneletMapLayers (const LaneletLayer::Map &lanelets, const AreaLayer::Map &areas, const RegulatoryElementLayer::Map &regulatoryElements, const PolygonLayer::Map &polygons, const LineStringLayer::Map &lineStrings, const PointLayer::Map &points)
 Construct from already initialized layers. More...
 
 LaneletMapLayers (const LaneletMapLayers &rhs)=delete
 
 LaneletMapLayers (LaneletMapLayers &&rhs) noexcept=default
 
LaneletMapLayersoperator= (const LaneletMapLayers &rhs)=delete
 
LaneletMapLayersoperator= (LaneletMapLayers &&rhs) noexcept=default
 
size_t size () const noexcept
 Returns the total number of elements in all layers. More...
 
 ~LaneletMapLayers () noexcept=default
 

Additional Inherited Members

- Public Attributes inherited from lanelet::LaneletMapLayers
AreaLayer areaLayer
 access to areas More...
 
LaneletLayer laneletLayer
 access to the lanelets within this map More...
 
LineStringLayer lineStringLayer
 access to the lineStrings More...
 
PointLayer pointLayer
 access to the points More...
 
PolygonLayer polygonLayer
 access to the polygons More...
 
RegulatoryElementLayer regulatoryElementLayer
 access to regElems More...
 

Detailed Description

Basic element for accessing and managing the elements of a map.

The map is divided in individual layers, one for each primitive in lanelet2. Each layer offers efficient functions to find elements by its id or spacial position. A LaneletMap can not be copied because maps are unique. You can only std::move them.

A LaneletMap is designed to be always self contained. This means it always contains all elements that are used by any element in the map. If you add a Lanelet, all its LineString boundaries, all RegulatoryElements, all things referenced by the regulatory elements are added to the map as well. This also means that if a lanelet has regulatory elements that in turn also reference lanelets, these lanelets will also be added to the map. If this behaviour is not what you want, consider using a LaneletSubmap.

Definition at line 375 of file LaneletMap.h.

Member Function Documentation

◆ add() [1/6]

void lanelet::LaneletMap::add ( Area  area)

adds an area and all the elements it owns

Parameters
areathe area to add
Exceptions
InvalidInputErrorif area has a reglatory element without members

If the area or elements owned by it have InvalId as Id, they will be assigned a new, unique id. Otherwise you are responsible for making sure that the id has not already been for a different element.

Definition at line 594 of file LaneletMap.cpp.

◆ add() [2/6]

void lanelet::LaneletMap::add ( const RegulatoryElementPtr regElem)

adds a new regulatory element and all elements it owns to the map.

Exceptions
NullptrErrorif regElem is a nullptr
InvalidInputErrorif regElem has no members

If the regulatory elemnet or elements owned it lanelet have InvalId as Id, they will be assigned a new, unique id. Otherwise you are responsible for making sure that the id has not already been for a different element.

Definition at line 623 of file LaneletMap.cpp.

◆ add() [3/6]

void lanelet::LaneletMap::add ( Lanelet  lanelet)

adds a lanelet and all the elements it owns to the map

Exceptions
InvalidInputErrorif lanelet has a reglatory element without members

If the lanelet or elements owned by the lanelet have InvalId as Id, they will be assigned a new, unique id. Otherwise you are responsible for making sure that the id has not already been for a different element.

Definition at line 568 of file LaneletMap.cpp.

◆ add() [4/6]

void lanelet::LaneletMap::add ( LineString3d  lineString)

adds a new lineString and all elements it owns to the map.

If the lineString or elements owned by it have InvalId as Id, they will be assigned a new, unique id. Otherwise you are responsible for making sure that the id has not already been for a different element.

Definition at line 660 of file LaneletMap.cpp.

◆ add() [5/6]

void lanelet::LaneletMap::add ( Point3d  point)

adds a new point and all elements it owns to the map.

If the point or elements owned by it have InvalId as Id, they will be assigned a new, unique id. Otherwise you are responsible for making sure that the id has not already been for a different element.

Definition at line 674 of file LaneletMap.cpp.

◆ add() [6/6]

void lanelet::LaneletMap::add ( Polygon3d  polygon)

adds a new polygon and all elements it owns to the map.

If the polygon or elements owned by it have InvalId as Id, they will be assigned a new, unique id. Otherwise you are responsible for making sure that the id has not already been for a different element.

Definition at line 646 of file LaneletMap.cpp.

◆ LaneletMapLayers() [1/4]

lanelet::LaneletMapLayers::LaneletMapLayers
default

◆ LaneletMapLayers() [2/4]

lanelet::LaneletMapLayers::LaneletMapLayers

Construct from already initialized layers.

Parameters
laneletsnew lanelet layer
areasnew area layer
regulatoryElementsnew regulatoryElement layer
polygonspolygon layer
lineStringslinesting layer
pointspoint layer

Constructs a map from its individual elements for the layers. Unlike with the add functions you are responsible that e.g. all points of a linestring are in the point layer. However, this is the most efficient way to create a map because this will result in the most efficient RTree structure for fastest lookups.

Definition at line 557 of file LaneletMap.cpp.

◆ LaneletMapLayers() [3/4]

lanelet::LaneletMapLayers::LaneletMapLayers
delete

◆ LaneletMapLayers() [4/4]

lanelet::LaneletMapLayers::LaneletMapLayers
defaultnoexcept

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


lanelet2_core
Author(s): Fabian Poggenhans
autogenerated on Thu Mar 6 2025 03:25:52