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:
Collaboration graph

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 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)
 get the left border of the given lane (the leftmost one by default) More...
 
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)
 

Detailed Description

Exporter writing networks using the openDRIVE format.

Definition at line 56 of file NWWriter_OpenDrive.h.

Member Function Documentation

◆ 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 694 of file NWWriter_OpenDrive.cpp.

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

Referenced by writeNetwork().

◆ 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 
)
staticprotected

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

it would be tempting to use

Definition at line 415 of file NWWriter_OpenDrive.cpp.

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

Referenced by writeNetwork().

◆ writeElevationProfile()

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

Definition at line 672 of file NWWriter_OpenDrive.cpp.

References OutputDevice_String::getString(), and NUMERICAL_EPS.

Referenced by writeNetwork().

◆ writeEmptyCenterLane()

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

Definition at line 359 of file NWWriter_OpenDrive.cpp.

Referenced by writeNetwork().

◆ 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

◆ writeNetwork()

void NWWriter_OpenDrive::writeNetwork ( const OptionsCont oc,
NBNetBuilder nb 
)
static

Writes the network into a openDRIVE-file.

Parameters
[in]ocThe options to use
[in]nbThe network builder to fill

Definition at line 62 of file NWWriter_OpenDrive.cpp.

References NBNodeCont::begin(), NBEdgeCont::begin(), bezier(), NBNode::bezierControlPoints(), checkLaneGeometries(), OutputDevice::closeTag(), DEBUGCOND, DEG2RAD, NBNodeCont::end(), NBEdgeCont::end(), StringUtils::escapeXML(), NBEdge::Connection::fromLane, OptionsCont::getBool(), NBEdge::getConnections(), GeoConvHelper::getConvBoundary(), OutputDevice::getDevice(), NBNetBuilder::getEdgeCont(), GeoConvHelper::getFinal(), OptionsCont::getFloat(), NBEdge::getFromNode(), Named::getID(), getID(), NBNode::getIncomingEdges(), NBEdge::getIncomingEdges(), NBEdge::Connection::getInternalLaneID(), NBEdge::getLaneID(), NBEdge::getLanes(), getLaneType(), NBEdge::getLaneWidth(), getLeftLaneBorder(), NBNetBuilder::getNodeCont(), NBEdge::getNumLanes(), NBEdge::getPermissions(), NBEdge::getSpeed(), NBEdge::getStreetName(), OutputDevice_String::getString(), OptionsCont::getString(), NBEdge::getToNode(), gPrecision, OptionsCont::isSet(), NBEdge::isTurningDirectionAt(), PositionVector::length2D(), MAX2(), OutputDevice::openTag(), POSITION_EPS, OutputDevice::setPrecision(), NBNodeCont::size(), SVC_PEDESTRIAN, NBEdge::Connection::toEdge, NBEdge::Connection::toLane, WRITE_WARNING, writeElevationProfile(), writeEmptyCenterLane(), writeGeomLines(), writeGeomPP3(), writeGeomSmooth(), Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().

Referenced by NWFrame::writeNetwork().


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