Database Manager in charge of:
- loading the XODR file (XML format).
- parsing the XML nodes into known structures.
- providing XODR data.
The common workflow is to: 1 - Construct a DBManager
object using the provided methods. std::unique_ptr<xodr::DBManager> manager = xodr::LoadDataBaseFromFile(<path_to_xodr_file>)
- See also
- LoadDataBaseFromFile LoadDataBaseFromStr. 2 - Query the data base, e.g.:
manager->GetRoadHeaders();
#include <src/maliput_malidrive/xodr/db_manager.h>
◆ DBManager() [1/2]
Creates a database manager from a XMLDocument which contains a XODR description.
- Parameters
-
xodr_doc | Contains the XODR description. |
parser_configuration | Holds the configuration for the parser. |
- Exceptions
-
◆ DBManager() [2/2]
◆ ~DBManager()
◆ GetGeometriesToSimplify()
Analyses all the RoadHeaders' geometries looking for pieces that can be unified or merged together into a simpler description.
Candidate geometries to be merged should meet one of the following conditions:
- Two or more consecutive lines that share the same heading and are contiguous.
- Two or more consecutive arcs that share the same curvature and are contiguous.
- Two or more consecutive geometries are shorter than
tolerance
.
- Parameters
-
tolerance | Threshold that defines when whether two geometries are simplified when their accumulated length is below this value. It must be non negative. When it is zero, two consecutive geometries will not be simplified because of length. |
- Returns
- A dictionary of RoadHeader::Id to a vector of vectors of indices of geometries. Indices that are grouped together are contiguous and given that there might be more than one group per RoadHeader::Id we have a vector of vectors.
- Exceptions
-
maliput::common::assertion::error | When tolerance is negative. |
◆ GetJunctions()
- Returns
- A xodr::Junction map which contains all the junction information about the XODR description.
◆ GetLargestElevationGap()
Get the largest gap between elevations.
DBManager extracts this information from the XODR only the first time that either this or GetShortestElevationGap()
methods are called. Results are stored to be consulted as many times as needed but without carrying out the analysis more than once in order to avoid performance drop.
- Returns
- Data from the largest gap between elevations in the entire XODR description. When RoadHeaderId is "none" it means there are no possible gaps to be analyzed: roads only have one or none elevations.
◆ GetLargestGap()
Get the largest gap between Geometries.
DBManager extracts this information from the XODR only the first time that either this or 'GetShortestGap()' methods are called. Results are stored to be consulted as many times as needed but without carrying out the analysis more than once in order to avoid performance drop.
- Returns
- Data from the largest gap between Geometries in the entire XODR description. When RoadHeaderId is "none" it means there are no possible gaps to be analyzed: Roads only have one Geometry.
◆ GetLargestGeometry()
- Returns
- Data from the largest Geometry in the entire XODR description.
◆ GetLargestLaneSection()
- Returns
- Data from the largest LaneSection in the entire XODR description.
◆ GetLargestSuperelevationGap()
Get the largest gap between superelevations.
DBManager extracts this information from the XODR only the first time that either this or GetShortestSuperelevationGap()
methods are called. Results are stored to be consulted as many times as needed but without carrying out the analysis more than once in order to avoid performance drop.
- Returns
- Data from the largest gap between superelevations in the entire XODR description. When RoadHeaderId is "none" it means there are no possible gaps to be analyzed: roads only have one or none superelevations.
◆ GetRoadHeaders()
- Returns
- A xodr::RoadHeader map which contains all the road information about the XODR description.
◆ GetShortestElevationGap()
Get the shortest gap between elevations.
DBManager extracts this information from the XODR only the first time that either this or GetLargestElevationGap()
methods are called. Results are stored to be consulted as many times as needed but without carrying out the analysis more than once in order to avoid performance drop.
- Returns
- Data from the shortest gap between elevations in the entire XODR description. When RoadHeaderId is "none" it means there are no possible gaps to be analyzed: roads only have one or none elevations.
◆ GetShortestGap()
Get the shortest gap between Geometries.
DBManager extracts this information from the XODR only the first time that either this or GetLargestGap()
methods are called. Results are stored to be consulted as many times as needed but without carrying out the analysis more than once in order to avoid performance drop.
- Returns
- Data from the shortest gap between Geometries in the entire XODR description. When RoadHeaderId is "none" it means there are no possible gaps to be analyzed: Roads only have one Geometry.
◆ GetShortestGeometry()
Xodr geometry introspection queries.
- Returns
- Data from the shortest Geometry in the entire XODR description.
◆ GetShortestLaneSection()
- Returns
- Data from the shortest LaneSection in the entire XODR description.
◆ GetShortestSuperelevationGap()
Get the shortest gap between superelevations.
DBManager extracts this information from the XODR only the first time that either this or GetLargestSuperelevationGap()
methods are called. Results are stored to be consulted as many times as needed but without carrying out the analysis more than once in order to avoid performance drop.
- Returns
- Data from the shortest gap between superelevations in the entire XODR description. When RoadHeaderId is "none" it means there are no possible gaps to be analyzed: roads only have one or none superelevations.
◆ GetXodrHeader()
const Header & GetXodrHeader |
( |
| ) |
const |
- Returns
- A xodr::Header which contains general information about the XODR description.
◆ MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN()
MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN |
( |
DBManager |
| ) |
|
The documentation for this class was generated from the following files: