Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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.
static void writeNetwork (const OptionsCont &oc, const std::string &prefix, NBNetBuilder &nb)
 Writes the network into XML-files (nodes, edges, connections, traffic lights).
static void writeStreetSigns (const OptionsCont &oc, NBEdgeCont &ec)
 Writes street signs as POIs to file.

Static Private Member Functions

static void writeConfig (const OptionsCont &oc, const std::string &prefix, bool haveTypes)
 Writes the configuration file for assempling the network from plain-xml files.
static void writeDistricts (const OptionsCont &oc, NBDistrictCont &dc)
 writes imported districts (TAZ) to file
static void writeEdgesAndConnections (const OptionsCont &oc, const std::string &prefix, NBNodeCont &nc, NBEdgeCont &ec)
 Writes the edges and connections files.
static void writeNodes (const OptionsCont &oc, const std::string &prefix, NBNodeCont &nc)
 Writes the nodes file.
static void writeParkingAreas (const OptionsCont &cont, NBParkingCont &pc, NBEdgeCont &ec)
 writes imported parking areas to file
static void writePTLines (const OptionsCont &cont, NBPTLineCont &lc)
static void writePTStops (const OptionsCont &oc, NBPTStopCont &ec)
 Writes the pt stops file.
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.
static void writeTypes (const std::string &prefix, NBEdgeCont &ec, NBTypeCont &tc)
 Writes the types file.

Detailed Description

Exporter writing networks using XML (native input) format.

Definition at line 55 of file NWWriter_XML.h.

Member Function Documentation

◆ writeConfig()

void NWWriter_XML::writeConfig ( const OptionsCont & oc,
const std::string & prefix,
bool haveTypes )
staticprivate

Writes the configuration file for assempling the network from plain-xml files.

Parameters
[in]ocThe options to use
[in]prefixThe file name prefix

Definition at line 86 of file NWWriter_XML.cpp.

References OptionsCont::clone(), OptionsCont::exists(), OptionsCont::set(), OptionsCont::setDefault(), TLF, and OptionsCont::writeConfiguration().

Referenced by writeNetwork().

Here is the caller graph for this function:

◆ writeDistricts()

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

writes imported districts (TAZ) to file

Definition at line 527 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 221 of file NWWriter_XML.cpp.

References NBEdgeCont::begin(), NBNodeCont::begin(), GeoConvHelper::cartesian2geo(), OutputDevice::close(), OutputDevice::closeTag(), NBEdgeCont::end(), NBNodeCont::end(), StringUtils::escapeXML(), OptionsCont::exists(), NBEdge::getBidiEdge(), OptionsCont::getBool(), NBEdge::getConnections(), OutputDevice::getDevice(), NBEdge::getDistance(), NBEdge::getEdgeStopOffset(), NBEdge::getEndOffset(), GeoConvHelper::getFinal(), NBEdge::getFriction(), NBEdge::getFromNode(), NBEdge::getGeometry(), Named::getID(), NBEdge::getID(), NBEdge::getLanes(), NBEdge::getLaneSpreadFunction(), NBEdge::getLaneWidth(), NBEdge::getLoadedLength(), NBEdge::getNumLanes(), NBNode::getOutgoingEdges(), NBEdge::getPermissions(), NBEdge::getPriority(), NBEdgeCont::getRoundabouts(), NBEdge::getRoutingType(), 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_ROUTINGTYPE, 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 457 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(), writeConfig(), 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()

◆ writeParkingAreas()

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

writes imported parking areas to file

Definition at line 516 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 506 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 496 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 537 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 481 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 434 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 209 of file NWWriter_XML.cpp.

References OutputDevice::close(), OutputDevice::getDevice(), NBEdgeCont::getUsedTypes(), NETWORK_VERSION(), SUMO_ATTR_VERSION, SUMO_TAG_TYPES, 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: