Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
NWWriter_XML.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
20// Exporter writing networks using XML (native input) format
21/****************************************************************************/
22#pragma once
23#include <config.h>
24
25#include <string>
26#include <map>
29
30
31// ===========================================================================
32// class declarations
33// ===========================================================================
34class NBEdge;
35class NBEdgeCont;
36class NBNetBuilder;
37class NBNode;
38class NBNodeCont;
39class NBParkingCont;
40class NBPTStopCont;
41class NBPTLineCont;
43class NBTypeCont;
44class OptionsCont;
45
46
47// ===========================================================================
48// class definitions
49// ===========================================================================
56public:
62 static void writeNetwork(const OptionsCont& oc, const std::string& prefix, NBNetBuilder& nb);
63
68 static void writeJoinedJunctions(const std::string& filename, NBNodeCont& nc);
69
74 static void writeStreetSigns(const OptionsCont& oc, NBEdgeCont& ec);
75
76private:
81 static void writeNodes(const OptionsCont& oc, const std::string& prefix, NBNodeCont& nc);
82
87 static void writeTypes(const std::string& prefix, NBEdgeCont& ec, NBTypeCont& tc);
88
93 static void writeEdgesAndConnections(const OptionsCont& oc, const std::string& prefix, NBNodeCont& nc, NBEdgeCont& ec);
94
95
101 static void writeTrafficLights(const std::string& prefix, NBTrafficLightLogicCont& tc, NBEdgeCont& ec);
102
107 static void writePTStops(const OptionsCont& oc, NBPTStopCont& ec);
108 static void writePTLines(const OptionsCont& cont, NBPTLineCont& lc);
109
111 static void writeParkingAreas(const OptionsCont& cont, NBParkingCont& pc, NBEdgeCont& ec);
112
114 static void writeDistricts(const OptionsCont& oc, NBDistrictCont& dc);
115
116 static void writeShape(OutputDevice& out, const GeoConvHelper& gch, PositionVector shape, SumoXMLAttr attr, bool useGeo, bool geoAccuracy);
117};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
static methods for processing the coordinates conversion for the current net
A container for districts.
Storage for edges, including some functionality operating on multiple edges.
Definition NBEdgeCont.h:59
The representation of a single edge during network building.
Definition NBEdge.h:92
Instance responsible for building networks.
Container for nodes during the netbuilding process.
Definition NBNodeCont.h:57
Represents a single node (junction) during network building.
Definition NBNode.h:66
Container for public transport stops during the net building process.
A container for traffic light definitions and built programs.
A storage for available edgeTypes of edges.
Definition NBTypeCont.h:52
Exporter writing networks using XML (native input) format.
static void writeStreetSigns(const OptionsCont &oc, NBEdgeCont &ec)
Writes street signs as POIs to file.
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.
static void writeParkingAreas(const OptionsCont &cont, NBParkingCont &pc, NBEdgeCont &ec)
writes imported parking areas to file
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 writePTLines(const OptionsCont &cont, NBPTLineCont &lc)
static void writeEdgesAndConnections(const OptionsCont &oc, const std::string &prefix, NBNodeCont &nc, NBEdgeCont &ec)
Writes the edges and connections files.
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 writeDistricts(const OptionsCont &oc, NBDistrictCont &dc)
writes imported districts (TAZ) to file
static void writeNodes(const OptionsCont &oc, const std::string &prefix, NBNodeCont &nc)
Writes the nodes file.
A storage for options typed value containers)
Definition OptionsCont.h:89
Static storage of an output device and its base (abstract) implementation.
A list of positions.