54 oc.
addDescription(
"output-file",
"Output",
TL(
"The generated net will be written to FILE"));
57 oc.
addSynonyme(
"plain-output-prefix",
"plain-output");
59 oc.
addDescription(
"plain-output-prefix",
"Output",
TL(
"Prefix of files to write plain xml nodes, edges and connections to"));
62 oc.
addDescription(
"plain-output.lanes",
"Output",
TL(
"Write all lanes and their attributes even when they are not customized"));
66 "Writes information about joined junctions to FILE (can be loaded as additional node-file to reproduce joins");
69 oc.
addDescription(
"prefix",
"Output",
TL(
"Defines a prefix for edge and junction names"));
74 oc.
addDescription(
"proj.plain-geo",
"Projection",
TL(
"Write geo coordinates in plain-xml"));
79 oc.
addDescription(
"amitran-output",
"Output",
TL(
"The generated net will be written to FILE using Amitran format"));
82 oc.
addDescription(
"matsim-output",
"Output",
TL(
"The generated net will be written to FILE using MATSim format"));
85 oc.
addDescription(
"opendrive-output",
"Output",
TL(
"The generated net will be written to FILE using OpenDRIVE format"));
88 oc.
addDescription(
"dlr-navteq-output",
"Output",
TL(
"The generated net will be written to dlr-navteq files with the given PREFIX"));
91 oc.
addDescription(
"dlr-navteq.version",
"Output",
TL(
"The dlr-navteq output format version to write"));
94 oc.
addDescription(
"dlr-navteq.precision",
"Output",
TL(
"The network coordinates are written with the specified level of output precision"));
97 oc.
addDescription(
"output.street-names",
"Output",
TL(
"Street names will be included in the output (if available)"));
100 oc.
addDescription(
"output.original-names",
"Output",
TL(
"Writes original names, if given, as parameter"));
103 oc.
addDescription(
"street-sign-output",
"Output",
TL(
"Writes street signs as POIs to FILE"));
107 oc.
addDescription(
"ptstop-output",
"Output",
TL(
"Writes public transport stops to FILE"));
109 oc.
addDescription(
"ptline-output",
"Output",
TL(
"Writes public transport lines to FILE"));
111 oc.
addDescription(
"ptline-clean-up",
"Output",
TL(
"Clean-up pt stops that are not served by any line"));
114 oc.
addDescription(
"parking-output",
"Output",
TL(
"Writes parking areas to FILE"));
117 oc.
addDescription(
"railway.topology.output",
"Output",
TL(
"Analyze topology of the railway network"));
121 oc.
addDescription(
"polygon-output",
"Output",
TL(
"Write shapes that are embedded in the network input and that are not supported by polyconvert (OpenDRIVE)"));
126 oc.
addDescription(
"opendrive-output.straight-threshold",
"Output",
TL(
"Builds parameterized curves whenever the angular change between straight segments exceeds FLOAT degrees"));
130 oc.
addDescription(
"opendrive-output.lefthand-left",
"Output",
TL(
"Write lanes in lefthand networks on the left side (positive indices)"));
133 oc.
addDescription(
"opendrive-output.shape-match-dist",
"Output",
TL(
"Match loaded shapes to the closest edge within FLOAT and export as road objects"));
142 if (!oc.
isSet(
"output-file")
143 && !oc.
isSet(
"plain-output-prefix")
144 && !oc.
isSet(
"amitran-output")
145 && !oc.
isSet(
"matsim-output")
146 && !oc.
isSet(
"opendrive-output")
147 && !oc.
isSet(
"dlr-navteq-output")) {
148 std::string net =
"net.net.xml";
149 if (oc.
isSet(
"configuration-file")) {
155 if (oc.
isSet(
"opendrive-output") && oc.
getBool(
"no-internal-links")) {
156 WRITE_ERROR(
TL(
"OpenDRIVE export needs internal links computation."));
159 if (oc.
isSet(
"opendrive-output") && oc.
isDefault(
"no-internal-links")) {
162 if (oc.
isSet(
"opendrive-output") && oc.
isDefault(
"rectangular-lane-cut")) {
163 oc.
setDefault(
"rectangular-lane-cut",
"true");
165 if (oc.
isSet(
"opendrive-output") && !oc.
getBool(
"rectangular-lane-cut")) {
166 WRITE_WARNING(
TL(
"OpenDRIVE cannot represent oblique lane cuts and should use option 'rectangular-lane-cut'."));
168 if (oc.
isSet(
"dlr-navteq-output") && oc.
isDefault(
"numerical-ids")) {
171 if (oc.
isSet(
"dlr-navteq-output") && oc.
isDefault(
"osm.all-attributes")) {
173 oc.
setDefault(
"osm.extra-attributes",
"bridge,tunnel,layer,postal_code,maxheight,maxwidth,maxweight,surface");
175 if (oc.
exists(
"ptline-output") && oc.
isSet(
"ptline-output") && !oc.
isSet(
"ptstop-output")) {
176 WRITE_ERROR(
TL(
"public transport lines output requires 'ptstop-output' to be set"));
179 if (oc.
exists(
"ptline-clean-up") && oc.
getBool(
"ptline-clean-up") && !oc.
isSet(
"ptline-output")) {
180 WRITE_WARNING(
TL(
"'ptline-clean-up' only works in conjunction with 'ptline-output'. Ignoring invalid option."));
#define WRITE_WARNING(msg)
#define PROGRESS_BEGIN_TIME_MESSAGE(msg)
#define PROGRESS_TIME_MESSAGE(before)
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
Instance responsible for building networks.
static void fillOptions(OptionsCont &oc, bool forNetgen)
Inserts options used by the network writer.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network stored in the given net builder.
static void writePositionLong(const Position &pos, OutputDevice &dev)
Writes the given position to device in long format (one attribute per dimension)
static bool checkOptions(OptionsCont &oc)
Checks set options for being valid.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into a Amitran-file.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into XML-files (nodes, edges, connections, traffic lights)
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into a MATSim-file.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into a openDRIVE-file.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into a SUMO-file.
static void writeNetwork(const OptionsCont &oc, const std::string &prefix, NBNetBuilder &nb)
Writes the network into XML-files (nodes, edges, connections, traffic lights)
A storage for options typed value containers)
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
bool setDefault(const std::string &name, const std::string &value)
Sets the given value for the named option as new default value.
void doRegister(const std::string &name, Option *o)
Adds an option under the given name.
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 storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
double z() const
Returns the z-position.
double y() const
Returns the y-position.