Eclipse SUMO - Simulation of Urban MObility
NWWriter_XML.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // Exporter writing networks using XML (native input) format
17 /****************************************************************************/
18 #ifndef NWWriter_XML_h
19 #define NWWriter_XML_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <map>
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 class NBEdge;
37 class NBEdgeCont;
38 class NBNetBuilder;
39 class NBNode;
40 class NBNodeCont;
41 class NBParkingCont;
42 class NBPTStopCont;
43 class NBPTLineCont;
45 class NBTypeCont;
46 class OptionsCont;
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
57 class NWWriter_XML {
58 public:
64  static void writeNetwork(const OptionsCont& oc, NBNetBuilder& nb);
65 
70  static void writeJoinedJunctions(const OptionsCont& oc, NBNodeCont& nc);
71 
76  static void writeStreetSigns(const OptionsCont& oc, NBEdgeCont& ec);
77 
78 private:
83  static void writeNodes(const OptionsCont& oc, NBNodeCont& nc);
84 
89  static void writeTypes(const OptionsCont& oc, NBTypeCont& tc);
90 
95  static void writeEdgesAndConnections(const OptionsCont& oc, NBNodeCont& nc, NBEdgeCont& ec);
96 
97 
103  static void writeTrafficLights(const OptionsCont& oc, NBTrafficLightLogicCont& tc, NBEdgeCont& ec);
104 
109  static void writePTStops(const OptionsCont& oc, NBPTStopCont& ec);
110  static void writePTLines(const OptionsCont& cont, NBPTLineCont& lc, NBEdgeCont& ec);
111 
113  static void writeParkingAreas(const OptionsCont& cont, NBParkingCont& pc, NBEdgeCont& ec);
114 
116  static void writeDistricts(const OptionsCont& oc, NBDistrictCont& dc);
117 
118  static void writeShape(OutputDevice& out, const GeoConvHelper& gch, PositionVector shape, SumoXMLAttr attr, bool useGeo, bool geoAccuracy);
119 };
120 
121 
122 #endif
123 
124 /****************************************************************************/
125 
NBPTStopCont
Definition: NBPTStopCont.h:27
NBEdgeCont
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:60
NBNetBuilder
Instance responsible for building networks.
Definition: NBNetBuilder.h:109
NBTrafficLightLogicCont
A container for traffic light definitions and built programs.
Definition: NBTrafficLightLogicCont.h:57
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
SUMOSAXHandler.h
NWWriter_XML::writeStreetSigns
static void writeStreetSigns(const OptionsCont &oc, NBEdgeCont &ec)
Writes street signs as POIs to file.
Definition: NWWriter_XML.cpp:404
NWWriter_XML::writeNetwork
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into XML-files (nodes, edges, connections, traffic lights)
Definition: NWWriter_XML.cpp:52
PositionVector
A list of positions.
Definition: PositionVector.h:45
NBDistrictCont
A container for districts.
Definition: NBDistrictCont.h:52
GeoConvHelper
static methods for processing the coordinates conversion for the current net
Definition: GeoConvHelper.h:55
NBNodeCont
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:59
NWWriter_XML::writeJoinedJunctions
static void writeJoinedJunctions(const OptionsCont &oc, NBNodeCont &nc)
Writes the joined-juncionts to file.
Definition: NWWriter_XML.cpp:380
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
NWWriter_XML::writeTrafficLights
static void writeTrafficLights(const OptionsCont &oc, NBTrafficLightLogicCont &tc, NBEdgeCont &ec)
Writes the traffic lights file.
Definition: NWWriter_XML.cpp:357
NWWriter_XML::writeEdgesAndConnections
static void writeEdgesAndConnections(const OptionsCont &oc, NBNodeCont &nc, NBEdgeCont &ec)
Writes the edges and connections files.
Definition: NWWriter_XML.cpp:177
NBPTLineCont
Definition: NBPTLineCont.h:26
UtilExceptions.h
NBParkingCont
Definition: NBParking.h:66
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
NWWriter_XML::writeParkingAreas
static void writeParkingAreas(const OptionsCont &cont, NBParkingCont &pc, NBEdgeCont &ec)
writes imported parking areas to file
Definition: NWWriter_XML.cpp:434
NWWriter_XML::writeTypes
static void writeTypes(const OptionsCont &oc, NBTypeCont &tc)
Writes the types file.
Definition: NWWriter_XML.cpp:166
NBTypeCont
A storage for available types of edges.
Definition: NBTypeCont.h:54
NWWriter_XML::writeNodes
static void writeNodes(const OptionsCont &oc, NBNodeCont &nc)
Writes the nodes file.
Definition: NWWriter_XML.cpp:85
config.h
NWWriter_XML::writePTLines
static void writePTLines(const OptionsCont &cont, NBPTLineCont &lc, NBEdgeCont &ec)
Definition: NWWriter_XML.cpp:425
NWWriter_XML::writeShape
static void writeShape(OutputDevice &out, const GeoConvHelper &gch, PositionVector shape, SumoXMLAttr attr, bool useGeo, bool geoAccuracy)
Definition: NWWriter_XML.cpp:453
NBNode
Represents a single node (junction) during network building.
Definition: NBNode.h:67
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:372
NWWriter_XML
Exporter writing networks using XML (native input) format.
Definition: NWWriter_XML.h:57
NWWriter_XML::writeDistricts
static void writeDistricts(const OptionsCont &oc, NBDistrictCont &dc)
writes imported districts (TAZ) to file
Definition: NWWriter_XML.cpp:444
NWWriter_XML::writePTStops
static void writePTStops(const OptionsCont &oc, NBPTStopCont &ec)
Writes the pt stops file.
Definition: NWWriter_XML.cpp:417