50 #ifdef CHECK_MEMORY_LEAKS 52 #endif // CHECK_MEMORY_LEAKS 64 oc.
addDescription(
"sumo-net-file",
"Input",
"Read SUMO-net from FILE");
68 oc.
addSynonyme(
"node-files",
"xml-node-files",
true);
71 oc.
addDescription(
"node-files",
"Input",
"Read XML-node defs from FILE");
74 oc.
addSynonyme(
"edge-files",
"xml-edge-files",
true);
77 oc.
addDescription(
"edge-files",
"Input",
"Read XML-edge defs from FILE");
80 oc.
addSynonyme(
"connection-files",
"xml-connection-files",
true);
81 oc.
addSynonyme(
"connection-files",
"xml-connections",
true);
83 oc.
addDescription(
"connection-files",
"Input",
"Read XML-connection defs from FILE");
86 oc.
addDescription(
"tllogic-files",
"Input",
"Read XML-traffic light defs from FILE");
89 oc.
addSynonyme(
"type-files",
"xml-type-files",
true);
92 oc.
addDescription(
"type-files",
"Input",
"Read XML-type defs from FILE");
96 oc.
addSynonyme(
"shapefile-prefix",
"arcview",
true);
98 oc.
addDescription(
"shapefile-prefix",
"Input",
"Read shapefiles (ArcView, Tiger, ...) from files starting with 'FILE'");
102 oc.
addSynonyme(
"dlr-navteq-prefix",
"elmar2",
true);
103 oc.
addDescription(
"dlr-navteq-prefix",
"Input",
"Read converted Navteq GDF data (unsplitted Elmar-network) from path 'FILE'");
107 oc.
addDescription(
"osm-files",
"Input",
"Read OSM-network from path 'FILE(s)'");
111 oc.
addDescription(
"opendrive-files",
"Input",
"Read OpenDRIVE-network from FILE");
115 oc.
addDescription(
"visum-file",
"Input",
"Read VISUM-net from FILE");
119 oc.
addDescription(
"vissim-file",
"Input",
"Read VISSIM-net from FILE");
122 oc.
addSynonyme(
"robocup-dir",
"robocup-net",
true);
124 oc.
addDescription(
"robocup-dir",
"Input",
"Read RoboCup-net from DIR");
128 oc.
addDescription(
"matsim-files",
"Input",
"Read MATsim-net from FILE");
132 oc.
addDescription(
"itsumo-files",
"Input",
"Read ITSUMO-net from FILE");
135 oc.
addDescription(
"heightmap.shapefiles",
"Input",
"Read heightmap from ArcGIS shapefile");
138 oc.
addDescription(
"heightmap.geotiff",
"Input",
"Read heightmap from GeoTIFF");
142 oc.
addSynonyme(
"ignore-errors",
"dismiss-loading-errors",
true);
143 oc.
addDescription(
"ignore-errors",
"Processing",
"Continue on broken input");
146 oc.
addDescription(
"ignore-errors.connections",
"Processing",
"Continue on invalid connections");
149 oc.
addDescription(
"show-errors.connections-first-try",
"Processing",
"Show errors in connections at parsing");
152 oc.
addDescription(
"ignore-errors.edge-type",
"Processing",
"Continue on unknown edge types");
155 oc.
addSynonyme(
"lanes-from-capacity.norm",
"capacity-norm");
156 oc.
addDescription(
"lanes-from-capacity.norm",
"Processing",
"The factor for flow to no. lanes conversion");
159 oc.
addDescription(
"speed-in-kmh",
"Processing",
"vmax is parsed as given in km/h (some)");
162 oc.
addDescription(
"construction-date",
"Processing",
"Use YYYY-MM-DD date to determine the readiness of features under construction");
167 oc.
addSynonyme(
"plain.extend-edge-shape",
"xml.keep-shape",
true);
168 oc.
addDescription(
"plain.extend-edge-shape",
"Processing",
"If edge shapes do not end at the node positions, extend them");
173 oc.
addDescription(
"matsim.keep-length",
"Processing",
"The edge lengths given in the MATSIM-file will be kept");
176 oc.
addDescription(
"matsim.lanes-from-capacity",
"Processing",
"The lane number will be computed from the capacity");
181 oc.
addSynonyme(
"shapefile.street-id",
"arcview.street-id",
true);
182 oc.
addDescription(
"shapefile.street-id",
"Processing",
"Read edge ids from column STR");
185 oc.
addSynonyme(
"shapefile.from-id",
"arcview.from-id",
true);
186 oc.
addDescription(
"shapefile.from-id",
"Processing",
"Read from-node ids from column STR");
189 oc.
addSynonyme(
"shapefile.to-id",
"arcview.to-id",
true);
190 oc.
addDescription(
"shapefile.to-id",
"Processing",
"Read to-node ids from column STR");
193 oc.
addSynonyme(
"shapefile.type-id",
"arcview.type-id",
true);
194 oc.
addDescription(
"shapefile.type-id",
"Processing",
"Read type ids from column STR");
197 oc.
addSynonyme(
"shapefile.use-defaults-on-failure",
"arcview.use-defaults-on-failure",
true);
198 oc.
addDescription(
"shapefile.use-defaults-on-failure",
"Processing",
"Uses edge type defaults on problems");
201 oc.
addSynonyme(
"shapefile.all-bidirectional",
"shapefile.all-bidi");
202 oc.
addSynonyme(
"shapefile.all-bidirectional",
"arcview.all-bidi",
true);
203 oc.
addDescription(
"shapefile.all-bidirectional",
"Processing",
"Insert edges in both directions");
206 oc.
addSynonyme(
"shapefile.guess-projection",
"arcview.guess-projection",
true);
207 oc.
addDescription(
"shapefile.guess-projection",
"Processing",
"Guess the proper projection");
212 oc.
addSynonyme(
"vissim.join-distance",
"vissim.offset",
true);
213 oc.
addDescription(
"vissim.join-distance",
"Processing",
"Structure join offset");
216 oc.
addDescription(
"vissim.default-speed",
"Processing",
"Use FLOAT as default speed");
219 oc.
addDescription(
"vissim.speed-norm",
"Processing",
"Factor for edge velocity");
222 oc.
addDescription(
"vissim.report-unset-speeds",
"Processing",
"Writes lanes without an explicit speed set");
227 oc.
addDescription(
"visum.use-type-priority",
"Processing",
"Uses priorities from types");
230 oc.
addDescription(
"visum.use-type-laneno",
"Processing",
"Uses lane numbers from types");
233 oc.
addDescription(
"visum.use-type-speed",
"Processing",
"Uses speeds from types");
236 oc.
addDescription(
"visum.connector-speeds",
"Processing",
"Sets connector speed");
239 oc.
addSynonyme(
"visum.connectors-lane-number",
"visum.connector-laneno",
true);
240 oc.
addDescription(
"visum.connectors-lane-number",
"Processing",
"Sets connector lane number");
243 oc.
addDescription(
"visum.no-connectors",
"Processing",
"Excludes connectors");
246 oc.
addSynonyme(
"visum.recompute-lane-number",
"visum.recompute-laneno",
true);
247 oc.
addDescription(
"visum.recompute-lane-number",
"Processing",
"Computes the number of lanes from the edges' capacities");
250 oc.
addDescription(
"visum.verbose-warnings",
"Processing",
"Prints all warnings, some of which are due to VISUM misbehaviour");
255 oc.
addDescription(
"osm.skip-duplicates-check",
"Processing",
"Skips the check for duplicate nodes and edges");
258 oc.
addDescription(
"osm.elevation",
"Processing",
"Imports elevation data");
261 oc.
addDescription(
"osm.layer-elevation",
"Processing",
"Reconstruct (relative) elevation based on layer data. Each layer is raised by FLOAT m");
264 oc.
addDescription(
"osm.layer-elevation.max-grade",
"Processing",
"Maximum grade threshold in % at 50km/h when reconstrucing elevation based on layer data. The value is scaled according to road speed.");
267 oc.
addDescription(
"osm.oneway-spread-right",
"Processing",
"Whether one-way roads should be spread to the side instead of centered");
271 oc.
addDescription(
"opendrive.import-all-lanes",
"Processing",
"Imports all lane types");
273 oc.
addDescription(
"opendrive.ignore-widths",
"Processing",
"Whether lane widths shall be ignored.");
277 oc.
addDescription(
"tls.discard-loaded",
"TLS Building",
"Does not instatiate traffic lights loaded from other formats than XML");
280 oc.
addDescription(
"tls.discard-simple",
"TLS Building",
"Does not instatiate traffic lights at geometry-like nodes loaded from other formats than XML");
292 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-prefix") || oc.
isSet(
"shapefile-prefix")) && numProjections == 0) {
294 oc.
set(
"proj.utm",
"true");
297 if (oc.
isSet(
"dlr-navteq-prefix") && oc.
isDefault(
"proj.scale")) {
301 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-prefix") || oc.
isSet(
"shapefile-prefix")) && !oc.
getBool(
"simple-projection")) {
302 WRITE_ERROR(
"Cannot import network data without PROJ-Library. Please install packages proj before building sumo");
306 if (oc.
isSet(
"sumo-net-file")) {
309 oc.
set(
"no-turnarounds",
"true");
311 if (oc.
isWriteable(
"offset.disable-normalization")) {
313 oc.
set(
"offset.disable-normalization",
"true");
316 if (!oc.
isSet(
"type-files")) {
317 const char* sumoPath = std::getenv(
"SUMO_HOME");
319 WRITE_WARNING(
"Environment variable SUMO_HOME is not set, using built in type maps.");
321 const std::string path = sumoPath + std::string(
"/data/typemap/");
322 if (oc.
isSet(
"osm-files")) {
323 oc.
setDefault(
"type-files", path +
"osmNetconvert.typ.xml");
325 if (oc.
isSet(
"opendrive-files")) {
326 oc.
setDefault(
"type-files", path +
"opendriveNetconvert.typ.xml");
330 if (oc.
isSet(
"opendrive-files")) {
331 if (oc.
isDefault(
"tls.left-green.time")) {
333 oc.
set(
"tls.left-green.time",
"0");
335 if (oc.
isDefault(
"rectangular-lane-cut")) {
337 oc.
set(
"rectangular-lane-cut",
"true");
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
bool checkDependingSuboptions(const std::string &name, const std::string &prefix) const
Checks whether an option is set, which has options with a prefix depending on it. ...
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static void fillOptions()
Inserts options used by the network importer and network building modules.
#define WRITE_WARNING(msg)
static OptionsCont & getOptions()
Retrieves the options.
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
bool setDefault(const std::string &name, const std::string &value)
Sets the given value for the named option as new default value.
bool isWriteable(const std::string &name)
Returns the information whether the named option may be set.
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
void addXMLDefault(const std::string &name, const std::string &xmlRoot="")
Adds an XML root element to handle by default. The special root "" denotes the default handler...
A storage for options typed value containers)
static const int GEO_SCALE
scaling factor for geo coordinates (DLRNavteq format uses this to increase floating point precisions)...
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.