Eclipse SUMO - Simulation of Urban MObility
|
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. | |
Exporter writing networks using XML (native input) format.
Definition at line 55 of file NWWriter_XML.h.
|
staticprivate |
Writes the configuration file for assempling the network from plain-xml files.
[in] | oc | The options to use |
[in] | prefix | The 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().
|
staticprivate |
writes imported districts (TAZ) to file
Definition at line 521 of file NWWriter_XML.cpp.
References NBDistrictCont::begin(), NBDistrictCont::end(), OutputDevice::getDevice(), OptionsCont::getString(), NWWriter_SUMO::writeDistrict(), and OutputDevice::writeXMLHeader().
Referenced by writeNetwork().
|
staticprivate |
Writes the edges and connections files.
[in] | oc | The options to use |
[in] | nb | The network build from which to read data |
Definition at line 218 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().
|
static |
Writes the joined-juncionts to file.
[in] | oc | The options to use |
[in] | nc | The node-container from which to read data |
Definition at line 451 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().
|
static |
Writes the network into XML-files (nodes, edges, connections, traffic lights)
[in] | oc | The options to use |
[in] | nb | The 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().
|
staticprivate |
Writes the nodes file.
[in] | oc | The options to use |
[in] | nc | The node-container from which to read data |
Definition at line 115 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().
|
staticprivate |
writes imported parking areas to file
Definition at line 510 of file NWWriter_XML.cpp.
References OutputDevice::close(), OutputDevice::getDevice(), OptionsCont::getString(), and OutputDevice::writeXMLHeader().
Referenced by writeNetwork().
|
staticprivate |
Definition at line 500 of file NWWriter_XML.cpp.
References OutputDevice::close(), OutputDevice::getDevice(), NBPTLineCont::getLines(), OptionsCont::getString(), and OutputDevice::writeXMLHeader().
Referenced by writeNetwork().
|
staticprivate |
Writes the pt stops file.
[in] | oc | The options to use |
[in] | nc | The pt stop container from which to read data |
Definition at line 490 of file NWWriter_XML.cpp.
References OutputDevice::close(), OutputDevice::getDevice(), NBPTStopCont::getStops(), OptionsCont::getString(), and OutputDevice::writeXMLHeader().
Referenced by writeNetwork().
|
staticprivate |
Definition at line 531 of file NWWriter_XML.cpp.
References GeoConvHelper::cartesian2geo(), gPrecisionGeo, OutputDevice::setPrecision(), and OutputDevice::writeAttr().
Referenced by writeEdgesAndConnections(), and writeNodes().
|
static |
Writes street signs as POIs to file.
[in] | oc | The options to use |
[in] | ec | The edge-container from which to read data |
Definition at line 475 of file NWWriter_XML.cpp.
References NBEdgeCont::begin(), OutputDevice::close(), NBEdgeCont::end(), OutputDevice::getDevice(), NBEdge::getSigns(), OptionsCont::getString(), and OutputDevice::writeXMLHeader().
Referenced by writeNetwork().
|
staticprivate |
Writes the traffic lights file.
[in] | oc | The options to use |
[in] | tc | The tll-container from which to read data |
[in] | ec | The edge-container from which to read data |
Definition at line 428 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().
|
staticprivate |
Writes the types file.
[in] | oc | The options to use |
[in] | nc | The type-container from which to read data |
Definition at line 206 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().