Eclipse SUMO - Simulation of Urban MObility
NWWriter_XML Class Reference

Exporter writing networks using XML (native input) format. More...

#include <NWWriter_XML.h>

Static Public Member Functions

static void writeJoinedJunctions (const std::string &filename, NBNodeCont &nc)
 Writes the joined-juncionts to file. More...
 
static void writeNetwork (const OptionsCont &oc, const std::string &prefix, NBNetBuilder &nb)
 Writes the network into XML-files (nodes, edges, connections, traffic lights) More...
 
static void writeStreetSigns (const OptionsCont &oc, NBEdgeCont &ec)
 Writes street signs as POIs to file. More...
 

Static Private Member Functions

static void writeDistricts (const OptionsCont &oc, NBDistrictCont &dc)
 writes imported districts (TAZ) to file More...
 
static void writeEdgesAndConnections (const OptionsCont &oc, const std::string &prefix, NBNodeCont &nc, NBEdgeCont &ec)
 Writes the edges and connections files. More...
 
static void writeNodes (const OptionsCont &oc, const std::string &prefix, NBNodeCont &nc)
 Writes the nodes file. More...
 
static void writeParkingAreas (const OptionsCont &cont, NBParkingCont &pc, NBEdgeCont &ec)
 writes imported parking areas to file More...
 
static void writePTLines (const OptionsCont &cont, NBPTLineCont &lc)
 
static void writePTStops (const OptionsCont &oc, NBPTStopCont &ec)
 Writes the pt stops file. More...
 
static void writeShape (OutputDevice &out, const GeoConvHelper &gch, PositionVector shape, SumoXMLAttr attr, bool useGeo, bool geoAccuracy)
 
static void writeTrafficLights (const std::string &prefix, NBTrafficLightLogicCont &tc, NBEdgeCont &ec)
 Writes the traffic lights file. More...
 
static void writeTypes (const std::string &prefix, NBEdgeCont &ec, NBTypeCont &tc)
 Writes the types file. More...
 

Detailed Description

Exporter writing networks using XML (native input) format.

Definition at line 55 of file NWWriter_XML.h.

Member Function Documentation

◆ writeDistricts()

void NWWriter_XML::writeDistricts ( const OptionsCont oc,
NBDistrictCont dc 
)
staticprivate

writes imported districts (TAZ) to file

Definition at line 490 of file NWWriter_XML.cpp.

References NBDistrictCont::begin(), NBDistrictCont::end(), OutputDevice::getDevice(), OptionsCont::getString(), NWWriter_SUMO::writeDistrict(), and OutputDevice::writeXMLHeader().

Referenced by writeNetwork().

Here is the caller graph for this function:

◆ writeEdgesAndConnections()

void NWWriter_XML::writeEdgesAndConnections ( const OptionsCont oc,
const std::string &  prefix,
NBNodeCont nc,
NBEdgeCont ec 
)
staticprivate

Writes the edges and connections files.

Parameters
[in]ocThe options to use
[in]nbThe network build from which to read data

Definition at line 187 of file NWWriter_XML.cpp.

References NBEdgeCont::begin(), NBNodeCont::begin(), GeoConvHelper::cartesian2geo(), OutputDevice::close(), OutputDevice::closeTag(), NBEdgeCont::end(), NBNodeCont::end(), StringUtils::escapeXML(), OptionsCont::exists(), StringBijection< T >::get(), NBEdge::getBidiEdge(), OptionsCont::getBool(), NBEdge::getConnections(), OutputDevice::getDevice(), NBEdge::getDistance(), NBEdge::getEdgeStopOffset(), NBEdge::getEndOffset(), GeoConvHelper::getFinal(), NBEdge::getFriction(), NBEdge::getFromNode(), NBEdge::getGeometry(), NBEdge::getID(), Named::getID(), NBEdge::getLanes(), NBEdge::getLaneSpreadFunction(), NBEdge::getLaneWidth(), NBEdge::getLoadedLength(), NBEdge::getNumLanes(), NBNode::getOutgoingEdges(), NBEdge::getPermissions(), NBEdge::getPriority(), NBEdgeCont::getRoundabouts(), NBEdge::getSpeed(), NBEdge::getStreetName(), OptionsCont::getString(), NBEdge::getToNode(), NBEdge::getTypeID(), getVehicleClassNames(), NBEdge::hasDefaultGeometry(), NBEdge::hasLaneSpecificEndOffset(), NBEdge::hasLaneSpecificFriction(), NBEdge::hasLaneSpecificPermissions(), NBEdge::hasLaneSpecificSpeed(), NBEdge::hasLaneSpecificStopOffsets(), NBEdge::hasLaneSpecificWidth(), NBEdge::hasLoadedLength(), StopOffset::isDefined(), joinNamedToString(), SUMOXMLDefinitions::LaneSpreadFunctions, OutputDevice::lf(), NBEdge::needsLaneSpecificOutput(), NETWORK_VERSION(), OutputDevice::openTag(), NWWriter_SUMO::PLAIN, SUMO_ATTR_ACCELERATION, SUMO_ATTR_BIDI, SUMO_ATTR_CHANGE_LEFT, SUMO_ATTR_CHANGE_RIGHT, SUMO_ATTR_DISTANCE, SUMO_ATTR_EDGES, SUMO_ATTR_ENDOFFSET, SUMO_ATTR_FRICTION, SUMO_ATTR_FROM, SUMO_ATTR_ID, SUMO_ATTR_INDEX, SUMO_ATTR_LANE, SUMO_ATTR_LENGTH, SUMO_ATTR_NAME, SUMO_ATTR_NODE, SUMO_ATTR_NUMLANES, SUMO_ATTR_OUTLINESHAPE, SUMO_ATTR_PRIORITY, SUMO_ATTR_SHAPE, SUMO_ATTR_SPEED, SUMO_ATTR_SPREADTYPE, SUMO_ATTR_TLLINKINDEX, SUMO_ATTR_TLLINKINDEX2, SUMO_ATTR_TO, SUMO_ATTR_TYPE, SUMO_ATTR_VERSION, SUMO_ATTR_WIDTH, SUMO_TAG_CONNECTION, SUMO_TAG_CROSSING, SUMO_TAG_EDGE, SUMO_TAG_LANE, SUMO_TAG_NEIGH, SUMO_TAG_WALKINGAREA, SVC_IGNORING, SVC_PEDESTRIAN, SVC_UNSPECIFIED, SVCAll, toString(), NBEdge::UNSPECIFIED_FRICTION, NBEdge::UNSPECIFIED_OFFSET, NBEdge::UNSPECIFIED_WIDTH, GeoConvHelper::usingGeoProjection(), GeoConvHelper::usingInverseGeoProjection(), OutputDevice::writeAttr(), NWWriter_SUMO::writeConnection(), GeoConvHelper::writeLocation(), Parameterised::writeParams(), writePermissions(), writePreferences(), NWWriter_SUMO::writeProhibitions(), NWWriter_SUMO::writeRoundabouts(), writeShape(), NWWriter_SUMO::writeStopOffsets(), and OutputDevice::writeXMLHeader().

Referenced by writeNetwork().

Here is the caller graph for this function:

◆ writeJoinedJunctions()

void NWWriter_XML::writeJoinedJunctions ( const std::string &  filename,
NBNodeCont nc 
)
static

Writes the joined-juncionts to file.

Parameters
[in]ocThe options to use
[in]ncThe node-container from which to read data

Definition at line 420 of file NWWriter_XML.cpp.

References OutputDevice::close(), OutputDevice::closeTag(), OutputDevice::getDevice(), NBNodeCont::getJoinedClusters(), NETWORK_VERSION(), OutputDevice::openTag(), SUMO_ATTR_NODES, SUMO_ATTR_VERSION, SUMO_TAG_JOIN, toString(), OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().

Referenced by GNENet::saveJoined(), and writeNetwork().

Here is the caller graph for this function:

◆ writeNetwork()

void NWWriter_XML::writeNetwork ( const OptionsCont oc,
const std::string &  prefix,
NBNetBuilder nb 
)
static

Writes the network into XML-files (nodes, edges, connections, traffic lights)

Parameters
[in]ocThe options to use
[in]nbThe network builder from which to read data

Definition at line 51 of file NWWriter_XML.cpp.

References OptionsCont::exists(), NBNetBuilder::getDistrictCont(), NBNetBuilder::getEdgeCont(), NBNetBuilder::getNodeCont(), NBNetBuilder::getParkingCont(), NBNetBuilder::getPTLineCont(), NBNetBuilder::getPTStopCont(), OptionsCont::getString(), NBNetBuilder::getTLLogicCont(), NBNetBuilder::getTypeCont(), OptionsCont::isSet(), NBTypeCont::size(), writeDistricts(), writeEdgesAndConnections(), writeJoinedJunctions(), writeNodes(), writeParkingAreas(), writePTLines(), writePTStops(), writeStreetSigns(), writeTrafficLights(), and writeTypes().

Referenced by GNENet::savePlain(), and NWFrame::writeNetwork().

Here is the caller graph for this function:

◆ writeNodes()

void NWWriter_XML::writeNodes ( const OptionsCont oc,
const std::string &  prefix,
NBNodeCont nc 
)
staticprivate

Writes the nodes file.

Parameters
[in]ocThe options to use
[in]ncThe node-container from which to read data

Definition at line 84 of file NWWriter_XML.cpp.

References NBNodeCont::begin(), GeoConvHelper::cartesian2geo(), OutputDevice::close(), OutputDevice::closeTag(), DEFAULT, NBNodeCont::end(), StringUtils::escapeXML(), OptionsCont::exists(), StringBijection< T >::get(), OptionsCont::getBool(), NBNode::getControllingTLS(), OutputDevice::getDevice(), GeoConvHelper::getFinal(), NBNode::getFringeType(), Named::getID(), NBNode::getKeepClear(), NBNode::getName(), NBNode::getPosition(), NBNode::getRadius(), NBNode::getRightOfWay(), NBNode::getShape(), OptionsCont::getString(), NBNode::getType(), gPrecisionGeo, NBNode::hasCustomShape(), NBNode::isTLControlled(), joinToString(), NETWORK_VERSION(), OutputDevice::openTag(), OutputDevice::setPrecision(), SUMO_ATTR_CONTROLLED_INNER, SUMO_ATTR_FRINGE, SUMO_ATTR_ID, SUMO_ATTR_KEEP_CLEAR, SUMO_ATTR_NAME, SUMO_ATTR_RADIUS, SUMO_ATTR_RIGHT_OF_WAY, SUMO_ATTR_SHAPE, SUMO_ATTR_TLID, SUMO_ATTR_TLTYPE, SUMO_ATTR_TYPE, SUMO_ATTR_VERSION, SUMO_TAG_NODE, TL, toString(), SUMOXMLDefinitions::TrafficLightTypes, NBNode::UNSPECIFIED_RADIUS, GeoConvHelper::usingGeoProjection(), GeoConvHelper::usingInverseGeoProjection(), WRITE_WARNING, OutputDevice::writeAttr(), GeoConvHelper::writeLocation(), Parameterised::writeParams(), NWFrame::writePositionLong(), writeShape(), and OutputDevice::writeXMLHeader().

Referenced by writeNetwork().

Here is the caller graph for this function:

◆ writeParkingAreas()

void NWWriter_XML::writeParkingAreas ( const OptionsCont cont,
NBParkingCont pc,
NBEdgeCont ec 
)
staticprivate

writes imported parking areas to file

Definition at line 479 of file NWWriter_XML.cpp.

References OutputDevice::close(), OutputDevice::getDevice(), OptionsCont::getString(), and OutputDevice::writeXMLHeader().

Referenced by writeNetwork().

Here is the caller graph for this function:

◆ writePTLines()

void NWWriter_XML::writePTLines ( const OptionsCont cont,
NBPTLineCont lc 
)
staticprivate

Definition at line 469 of file NWWriter_XML.cpp.

References OutputDevice::close(), OutputDevice::getDevice(), NBPTLineCont::getLines(), OptionsCont::getString(), and OutputDevice::writeXMLHeader().

Referenced by writeNetwork().

Here is the caller graph for this function:

◆ writePTStops()

void NWWriter_XML::writePTStops ( const OptionsCont oc,
NBPTStopCont ec 
)
staticprivate

Writes the pt stops file.

Parameters
[in]ocThe options to use
[in]ncThe pt stop container from which to read data

Definition at line 459 of file NWWriter_XML.cpp.

References OutputDevice::close(), OutputDevice::getDevice(), NBPTStopCont::getStops(), OptionsCont::getString(), and OutputDevice::writeXMLHeader().

Referenced by writeNetwork().

Here is the caller graph for this function:

◆ writeShape()

void NWWriter_XML::writeShape ( OutputDevice out,
const GeoConvHelper gch,
PositionVector  shape,
SumoXMLAttr  attr,
bool  useGeo,
bool  geoAccuracy 
)
staticprivate

Definition at line 500 of file NWWriter_XML.cpp.

References GeoConvHelper::cartesian2geo(), gPrecisionGeo, OutputDevice::setPrecision(), and OutputDevice::writeAttr().

Referenced by writeEdgesAndConnections(), and writeNodes().

Here is the caller graph for this function:

◆ writeStreetSigns()

void NWWriter_XML::writeStreetSigns ( const OptionsCont oc,
NBEdgeCont ec 
)
static

Writes street signs as POIs to file.

Parameters
[in]ocThe options to use
[in]ecThe edge-container from which to read data

Definition at line 444 of file NWWriter_XML.cpp.

References NBEdgeCont::begin(), OutputDevice::close(), NBEdgeCont::end(), OutputDevice::getDevice(), NBEdge::getSigns(), OptionsCont::getString(), and OutputDevice::writeXMLHeader().

Referenced by writeNetwork().

Here is the caller graph for this function:

◆ writeTrafficLights()

void NWWriter_XML::writeTrafficLights ( const std::string &  prefix,
NBTrafficLightLogicCont tc,
NBEdgeCont ec 
)
staticprivate

Writes the traffic lights file.

Parameters
[in]ocThe options to use
[in]tcThe tll-container from which to read data
[in]ecThe edge-container from which to read data

Definition at line 397 of file NWWriter_XML.cpp.

References NBEdgeCont::begin(), OutputDevice::close(), NBEdgeCont::end(), NBEdge::getConnections(), OutputDevice::getDevice(), NETWORK_VERSION(), SUMO_ATTR_VERSION, NWWriter_SUMO::TLL, toString(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeTrafficLights(), and OutputDevice::writeXMLHeader().

Referenced by writeNetwork().

Here is the caller graph for this function:

◆ writeTypes()

void NWWriter_XML::writeTypes ( const std::string &  prefix,
NBEdgeCont ec,
NBTypeCont tc 
)
staticprivate

Writes the types file.

Parameters
[in]ocThe options to use
[in]ncThe type-container from which to read data

Definition at line 175 of file NWWriter_XML.cpp.

References OutputDevice::close(), OutputDevice::getDevice(), NBEdgeCont::getUsedTypes(), NETWORK_VERSION(), SUMO_ATTR_VERSION, toString(), NBTypeCont::writeEdgeTypes(), and OutputDevice::writeXMLHeader().

Referenced by writeNetwork().

Here is the caller graph for this function:

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