SUMO - Simulation of Urban MObility
NIImporter_OpenDrive::OpenDriveLaneSection Struct Reference

Representation of a lane section. More...

#include <NIImporter_OpenDrive.h>

Collaboration diagram for NIImporter_OpenDrive::OpenDriveLaneSection:
Collaboration graph

Public Member Functions

void buildLaneMapping (const NBTypeCont &tc)
 Build the mapping from OpenDrive to SUMO lanes. More...
 
OpenDriveLaneSection buildLaneSection (double startPos)
 
bool buildSpeedChanges (const NBTypeCont &tc, std::vector< OpenDriveLaneSection > &newSections)
 
std::map< int, int > getInnerConnections (OpenDriveXMLTag dir, const OpenDriveLaneSection &prev)
 Returns the links from the previous to this lane section. More...
 
 OpenDriveLaneSection (double sArg)
 Constructor. More...
 

Data Fields

std::map< int, int > laneMap
 A mapping from OpenDrive to SUMO-index (the first is signed, the second unsigned) More...
 
std::map< OpenDriveXMLTag, std::vector< OpenDriveLane > > lanesByDir
 The lanes, sorted by their direction. More...
 
int leftLaneNumber
 
std::string leftType
 
int rightLaneNumber
 The number of lanes on the right and on the left side, respectively. More...
 
std::string rightType
 the composite type built from all used lane types More...
 
double s
 The starting offset of this lane section. More...
 
double sOrig
 The original starting offset of this lane section (differs from s if the section had to be split) More...
 
std::string sumoID
 The id (generic, without the optionally leading '-') of the edge generated for this section. More...
 

Detailed Description

Representation of a lane section.

Definition at line 313 of file NIImporter_OpenDrive.h.

Constructor & Destructor Documentation

◆ OpenDriveLaneSection()

NIImporter_OpenDrive::OpenDriveLaneSection::OpenDriveLaneSection ( double  sArg)

Constructor.

Parameters
[in]sArgThe offset from the start, counted from the begin

Definition at line 1303 of file NIImporter_OpenDrive.cpp.

References lanesByDir, NIImporter_OpenDrive::OPENDRIVE_TAG_CENTER, NIImporter_OpenDrive::OPENDRIVE_TAG_LEFT, and NIImporter_OpenDrive::OPENDRIVE_TAG_RIGHT.

Member Function Documentation

◆ buildLaneMapping()

void NIImporter_OpenDrive::OpenDriveLaneSection::buildLaneMapping ( const NBTypeCont tc)

Build the mapping from OpenDrive to SUMO lanes.

Not all lanes are converted to SUMO-lanes; the mapping includes only those which are included in the SUMO network.

Parameters
[in]tcThe type container needed to determine whether a lane shall be imported by using the lane's type

Definition at line 1311 of file NIImporter_OpenDrive.cpp.

References NBTypeCont::getShallBeDiscarded(), joinToString(), NBTypeCont::knows(), laneMap, lanesByDir, leftLaneNumber, leftType, NIImporter_OpenDrive::myImportAllTypes, NIImporter_OpenDrive::OPENDRIVE_TAG_LEFT, NIImporter_OpenDrive::OPENDRIVE_TAG_RIGHT, rightLaneNumber, and rightType.

◆ buildLaneSection()

◆ buildSpeedChanges()

◆ getInnerConnections()

std::map< int, int > NIImporter_OpenDrive::OpenDriveLaneSection::getInnerConnections ( OpenDriveXMLTag  dir,
const OpenDriveLaneSection prev 
)

Returns the links from the previous to this lane section.

Parameters
[in]dirThe OpenDrive-direction of drive
[in]preThe previous lane section
Returns
which lane is approached from which lane of the given previous lane section

Definition at line 1346 of file NIImporter_OpenDrive.cpp.

References laneMap, lanesByDir, NIImporter_OpenDrive::OPENDRIVE_TAG_LEFT, and UNSET_CONNECTION.

Field Documentation

◆ laneMap

std::map<int, int> NIImporter_OpenDrive::OpenDriveLaneSection::laneMap

A mapping from OpenDrive to SUMO-index (the first is signed, the second unsigned)

Definition at line 345 of file NIImporter_OpenDrive.h.

Referenced by buildLaneMapping(), getInnerConnections(), and NIImporter_OpenDrive::setEdgeLinks2().

◆ lanesByDir

std::map<OpenDriveXMLTag, std::vector<OpenDriveLane> > NIImporter_OpenDrive::OpenDriveLaneSection::lanesByDir

◆ leftLaneNumber

int NIImporter_OpenDrive::OpenDriveLaneSection::leftLaneNumber

◆ leftType

std::string NIImporter_OpenDrive::OpenDriveLaneSection::leftType

Definition at line 354 of file NIImporter_OpenDrive.h.

Referenced by buildLaneMapping().

◆ rightLaneNumber

int NIImporter_OpenDrive::OpenDriveLaneSection::rightLaneNumber

The number of lanes on the right and on the left side, respectively.

Definition at line 351 of file NIImporter_OpenDrive.h.

Referenced by buildLaneMapping(), NIImporter_OpenDrive::recomputeWidths(), and NIImporter_OpenDrive::splitMinWidths().

◆ rightType

std::string NIImporter_OpenDrive::OpenDriveLaneSection::rightType

the composite type built from all used lane types

Definition at line 353 of file NIImporter_OpenDrive.h.

Referenced by buildLaneMapping().

◆ s

double NIImporter_OpenDrive::OpenDriveLaneSection::s

◆ sOrig

double NIImporter_OpenDrive::OpenDriveLaneSection::sOrig

The original starting offset of this lane section (differs from s if the section had to be split)

Definition at line 343 of file NIImporter_OpenDrive.h.

Referenced by NIImporter_OpenDrive::splitMinWidths().

◆ sumoID

std::string NIImporter_OpenDrive::OpenDriveLaneSection::sumoID

The id (generic, without the optionally leading '-') of the edge generated for this section.

Definition at line 349 of file NIImporter_OpenDrive.h.


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