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 (SUMOReal 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 (SUMOReal 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...
 
SUMOReal s
 The starting offset of this lane section. 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 301 of file NIImporter_OpenDrive.h.

Constructor & Destructor Documentation

§ OpenDriveLaneSection()

NIImporter_OpenDrive::OpenDriveLaneSection::OpenDriveLaneSection ( SUMOReal  sArg)

Constructor.

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

Definition at line 1098 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 1106 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 1141 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 331 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

Definition at line 337 of file NIImporter_OpenDrive.h.

Referenced by buildLaneMapping().

§ leftType

std::string NIImporter_OpenDrive::OpenDriveLaneSection::leftType

Definition at line 340 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 337 of file NIImporter_OpenDrive.h.

Referenced by buildLaneMapping().

§ rightType

std::string NIImporter_OpenDrive::OpenDriveLaneSection::rightType

the composite type built from all used lane types

Definition at line 339 of file NIImporter_OpenDrive.h.

Referenced by buildLaneMapping().

§ s

SUMOReal NIImporter_OpenDrive::OpenDriveLaneSection::s

The starting offset of this lane section.

Definition at line 329 of file NIImporter_OpenDrive.h.

Referenced by buildLaneSection(), NIImporter_OpenDrive::loadNetwork(), and NIImporter_OpenDrive::sections_by_s_sorter::operator()().

§ sumoID

std::string NIImporter_OpenDrive::OpenDriveLaneSection::sumoID

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

Definition at line 335 of file NIImporter_OpenDrive.h.


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