Eclipse SUMO - Simulation of Urban MObility
NWWriter_OpenDrive Class Reference

Exporter writing networks using the openDRIVE format. More...

#include <NWWriter_OpenDrive.h>

Collaboration diagram for NWWriter_OpenDrive:

Static Public Member Functions

static void writeNetwork (const OptionsCont &oc, NBNetBuilder &nb)
 Writes the network into a openDRIVE-file. More...
 

Static Protected Member Functions

static void addPedestrianConnection (const NBEdge *inEdge, const NBEdge *outEdge, std::vector< NBEdge::Connection > &parallel)
 
static void checkLaneGeometries (const NBEdge *e)
 check if the lane geometries are compatible with OpenDRIVE assumptions (colinear stop line) More...
 
static int getID (const std::string &origID, StringBijection< int > &map, int &lastID)
 
static std::string getLaneType (SVCPermissions permissions)
 
static PositionVector getLeftLaneBorder (const NBEdge *edge, int laneIndex=-1, double widthOffset=0)
 get the left border of the given lane (the leftmost one by default) More...
 
static PositionVector getRightLaneBorder (const NBEdge *edge, int laneIndex=-1)
 
static void writeElevationProfile (const PositionVector &shape, OutputDevice &device, const OutputDevice_String &elevationDevice)
 
static void writeEmptyCenterLane (OutputDevice &device, const std::string &mark, double markWidth)
 
static double writeGeomLines (const PositionVector &shape, OutputDevice &device, OutputDevice &elevationDevice, double offset=0)
 write geometry as sequence of lines (sumo style) More...
 
static double writeGeomPP3 (OutputDevice &device, OutputDevice &elevationDevice, PositionVector init, double length, double offset=0)
 write geometry as a single bezier curve (paramPoly3) More...
 
static bool writeGeomSmooth (const PositionVector &shape, double speed, OutputDevice &device, OutputDevice &elevationDevice, double straightThresh, double &length)
 
static int writeInternalEdge (OutputDevice &device, OutputDevice &junctionDevice, const NBEdge *inEdge, int nodeID, int edgeID, int inEdgeID, int outEdgeID, int connectionID, const std::vector< NBEdge::Connection > &parallel, const bool isOuterEdge, const double straightThresh, const std::string &centerMark)
 write internal edge to device, return next connectionID More...
 
static void writeNormalEdge (OutputDevice &device, const NBEdge *e, int edgeID, int fromNodeID, int toNodeID, const bool origNames, const double straightThresh, const ShapeContainer &shc)
 write normal edge to device More...
 
static void writeRoadObjects (OutputDevice &device, const NBEdge *e, const ShapeContainer &shc)
 write road objects referenced as edge parameters More...
 

Detailed Description

Exporter writing networks using the openDRIVE format.

Definition at line 50 of file NWWriter_OpenDrive.h.

Member Function Documentation

◆ addPedestrianConnection()

void NWWriter_OpenDrive::addPedestrianConnection ( const NBEdge inEdge,
const NBEdge outEdge,
std::vector< NBEdge::Connection > &  parallel 
)
staticprotected

Definition at line 325 of file NWWriter_OpenDrive.cpp.

References NBEdge::getLanes(), NBEdge::getPermissions(), and SVC_PEDESTRIAN.

Referenced by writeNetwork().

◆ checkLaneGeometries()

void NWWriter_OpenDrive::checkLaneGeometries ( const NBEdge e)
staticprotected

check if the lane geometries are compatible with OpenDRIVE assumptions (colinear stop line)

Definition at line 853 of file NWWriter_OpenDrive.cpp.

References PositionVector::distance2D(), NBEdge::getLaneID(), NBEdge::getLaneShape(), NBEdge::getNumLanes(), NUMERICAL_EPS, PositionVector::sideOffset(), toString(), and WRITE_WARNING.

Referenced by writeNormalEdge().

◆ getID()

int NWWriter_OpenDrive::getID ( const std::string &  origID,
StringBijection< int > &  map,
int &  lastID 
)
staticprotected

◆ getLaneType()

std::string NWWriter_OpenDrive::getLaneType ( SVCPermissions  permissions)
staticprotected

◆ getLeftLaneBorder()

PositionVector NWWriter_OpenDrive::getLeftLaneBorder ( const NBEdge edge,
int  laneIndex = -1,
double  widthOffset = 0 
)
staticprotected

get the left border of the given lane (the leftmost one by default)

it would be tempting to use

Definition at line 562 of file NWWriter_OpenDrive.cpp.

References OptionsCont::getBool(), NBEdge::getLaneShape(), NBEdge::getLaneWidth(), NBEdge::getNumLanes(), OptionsCont::getOptions(), and PositionVector::move2side().

Referenced by getRightLaneBorder(), writeInternalEdge(), writeNormalEdge(), and writeRoadObjects().

◆ getRightLaneBorder()

PositionVector NWWriter_OpenDrive::getRightLaneBorder ( const NBEdge edge,
int  laneIndex = -1 
)
staticprotected

Definition at line 595 of file NWWriter_OpenDrive.cpp.

References NBEdge::getLaneWidth(), and getLeftLaneBorder().

Referenced by writeInternalEdge().

◆ writeElevationProfile()

void NWWriter_OpenDrive::writeElevationProfile ( const PositionVector shape,
OutputDevice device,
const OutputDevice_String elevationDevice 
)
staticprotected

Definition at line 831 of file NWWriter_OpenDrive.cpp.

References OutputDevice_String::getString(), and NUMERICAL_EPS.

Referenced by writeInternalEdge(), and writeNormalEdge().

◆ writeEmptyCenterLane()

void NWWriter_OpenDrive::writeEmptyCenterLane ( OutputDevice device,
const std::string &  mark,
double  markWidth 
)
staticprotected

Definition at line 505 of file NWWriter_OpenDrive.cpp.

Referenced by writeInternalEdge(), and writeNormalEdge().

◆ writeGeomLines()

double NWWriter_OpenDrive::writeGeomLines ( const PositionVector shape,
OutputDevice device,
OutputDevice elevationDevice,
double  offset = 0 
)
staticprotected

◆ writeGeomPP3()

double NWWriter_OpenDrive::writeGeomPP3 ( OutputDevice device,
OutputDevice elevationDevice,
PositionVector  init,
double  length,
double  offset = 0 
)
staticprotected

◆ writeGeomSmooth()

bool NWWriter_OpenDrive::writeGeomSmooth ( const PositionVector shape,
double  speed,
OutputDevice device,
OutputDevice elevationDevice,
double  straightThresh,
double &  length 
)
staticprotected

◆ writeInternalEdge()

◆ writeNetwork()

◆ writeNormalEdge()

◆ writeRoadObjects()


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