 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
56 oc.
addDescription(
"output-file",
"Output",
"The generated net will be written to FILE");
59 oc.
addSynonyme(
"plain-output-prefix",
"plain-output");
61 oc.
addDescription(
"plain-output-prefix",
"Output",
"Prefix of files to write plain xml nodes, edges and connections to");
65 "Writes information about joined junctions to FILE (can be loaded as additional node-file to reproduce joins");
68 oc.
addDescription(
"prefix",
"Output",
"Defines a prefix for edge and junction names");
73 oc.
addDescription(
"proj.plain-geo",
"Projection",
"Write geo coordinates in plain-xml");
75 #endif // PROJ_API_FILE
78 oc.
addDescription(
"amitran-output",
"Output",
"The generated net will be written to FILE using Amitran format");
81 oc.
addDescription(
"matsim-output",
"Output",
"The generated net will be written to FILE using MATsim format");
84 oc.
addDescription(
"opendrive-output",
"Output",
"The generated net will be written to FILE using OpenDRIVE format");
87 oc.
addDescription(
"dlr-navteq-output",
"Output",
"The generated net will be written to dlr-navteq files with the given PREFIX");
90 oc.
addDescription(
"dlr-navteq.precision",
"Output",
"The network coordinates are written with the specified level of output precision");
93 oc.
addDescription(
"output.street-names",
"Output",
"Street names will be included in the output (if available)");
96 oc.
addDescription(
"output.original-names",
"Output",
"Writes original names, if given, as parameter");
99 oc.
addDescription(
"street-sign-output",
"Output",
"Writes street signs as POIs to FILE");
103 oc.
addDescription(
"ptstop-output",
"Output",
"Writes public transport stops to FILE");
105 oc.
addDescription(
"ptline-output",
"Output",
"Writes public transport lines to FILE");
107 oc.
addDescription(
"ptline-clean-up",
"Output",
"Clean-up pt stops that are not served by any line");
110 oc.
addDescription(
"parking-output",
"Output",
"Writes parking areas to FILE");
113 oc.
addDescription(
"railway.topology.output",
"Output",
"Analyse topology of the railway network");
116 oc.
addDescription(
"polygon-output",
"Output",
"Write shapes that are embedded in the network input and that are not supported by polyconvert (OpenDRIVE)");
121 oc.
addDescription(
"opendrive-output.straight-threshold",
"Output",
"Builds parameterized curves whenever the angular change between straight segments exceeds FLOAT degrees");
130 if (!oc.
isSet(
"output-file")
131 && !oc.
isSet(
"plain-output-prefix")
132 && !oc.
isSet(
"amitran-output")
133 && !oc.
isSet(
"matsim-output")
134 && !oc.
isSet(
"opendrive-output")
135 && !oc.
isSet(
"dlr-navteq-output")) {
136 std::string net =
"net.net.xml";
137 if (oc.
isSet(
"configuration-file")) {
143 if (oc.
isSet(
"opendrive-output") && oc.
getBool(
"no-internal-links")) {
144 WRITE_ERROR(
"OpenDRIVE export needs internal links computation.");
147 if (oc.
isSet(
"opendrive-output") && oc.
isDefault(
"no-internal-links")) {
148 oc.
set(
"no-internal-links",
"false");
150 if (oc.
isSet(
"opendrive-output") && oc.
isDefault(
"rectangular-lane-cut")) {
151 oc.
set(
"rectangular-lane-cut",
"true");
153 if (oc.
isSet(
"opendrive-output") && !oc.
getBool(
"rectangular-lane-cut")) {
154 WRITE_WARNING(
"OpenDRIVE cannot represent oblique lane cuts and should use option 'rectangular-lane-cut'.");
156 if (oc.
isSet(
"dlr-navteq-output") && oc.
isDefault(
"numerical-ids")) {
157 oc.
set(
"numerical-ids",
"true");
159 if (oc.
isSet(
"dlr-navteq-output") && oc.
isDefault(
"osm.all-attributes")) {
160 oc.
set(
"osm.all-attributes",
"true");
162 if (oc.
exists(
"ptline-output") && oc.
isSet(
"ptline-output") && !oc.
isSet(
"ptstop-output")) {
163 WRITE_ERROR(
"public transport lines output requires 'ptstop-output' to be set");
166 if (oc.
exists(
"ptline-clean-up") && oc.
getBool(
"ptline-clean-up") && !oc.
isSet(
"ptline-output")) {
167 WRITE_WARNING(
"'ptline-clean-up' only works in conjunction with 'ptline-output'. Ignoring invalid option.");
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into XML-files (nodes, edges, connections, traffic lights)
#define WRITE_WARNING(msg)
Instance responsible for building networks.
Static storage of an output device and its base (abstract) implementation.
double z() const
Returns the z-position.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into a openDRIVE-file.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool exists(const std::string &name) const
Returns the information whether the named option is known.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
static void fillOptions(bool forNetgen)
Inserts options used by the network writer.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into XML-files (nodes, edges, connections, traffic lights)
#define PROGRESS_TIME_MESSAGE(before)
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into a SUMO-file.
static long getCurrentMillis()
Returns the current time in milliseconds.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network stored in the given net builder.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
A storage for options typed value containers)
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
double y() const
Returns the y-position.
#define PROGRESS_BEGIN_MESSAGE(msg)
static void writePositionLong(const Position &pos, OutputDevice &dev)
Writes the given position to device in long format (one attribute per dimension)
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into a Amitran-file.
bool setDefault(const std::string &name, const std::string &value)
Sets the given value for the named option as new default value.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into a MATSim-file.