57 oc.
addSynonyme(
"node-files",
"xml-node-files",
true);
60 oc.
addDescription(
"node-files",
"Input",
TL(
"Read XML-node defs from FILE"));
63 oc.
addSynonyme(
"edge-files",
"xml-edge-files",
true);
66 oc.
addDescription(
"edge-files",
"Input",
TL(
"Read XML-edge defs from FILE"));
69 oc.
addSynonyme(
"connection-files",
"xml-connection-files",
true);
70 oc.
addSynonyme(
"connection-files",
"xml-connections",
true);
72 oc.
addDescription(
"connection-files",
"Input",
TL(
"Read XML-connection defs from FILE"));
75 oc.
addDescription(
"tllogic-files",
"Input",
TL(
"Read XML-traffic light defs from FILE"));
78 oc.
addSynonyme(
"type-files",
"xml-type-files",
true);
81 oc.
addDescription(
"type-files",
"Input",
TL(
"Read XML-type defs from FILE"));
86 oc.
addDescription(
"ptstop-files",
"Input",
TL(
"Reads public transport stops from FILE"));
88 oc.
addDescription(
"ptline-files",
"Input",
TL(
"Reads public transport lines from FILE"));
90 oc.
addDescription(
"polygon-files",
"Input",
TL(
"Reads polygons from FILE for embedding in network where applicable"));
95 oc.
addSynonyme(
"shapefile-prefix",
"arcview",
true);
97 oc.
addDescription(
"shapefile-prefix",
"Input",
TL(
"Read shapefiles (ArcView, Tiger, ...) from files starting with 'FILE'"));
101 oc.
addSynonyme(
"dlr-navteq-prefix",
"elmar2",
true);
102 oc.
addDescription(
"dlr-navteq-prefix",
"Input",
TL(
"Read converted Navteq GDF data (unsplitted Elmar-network) from path 'FILE'"));
106 oc.
addDescription(
"osm-files",
"Input",
TL(
"Read OSM-network from path 'FILE(s)'"));
110 oc.
addDescription(
"opendrive-files",
"Input",
TL(
"Read OpenDRIVE-network from FILE"));
121 oc.
addSynonyme(
"robocup-dir",
"robocup-net",
true);
127 oc.
addDescription(
"matsim-files",
"Input",
TL(
"Read MATSim-net from FILE"));
131 oc.
addDescription(
"itsumo-files",
"Input",
TL(
"Read ITSUMO-net from FILE"));
134 oc.
addDescription(
"heightmap.shapefiles",
"Input",
TL(
"Read heightmap from ArcGIS shapefile"));
137 oc.
addDescription(
"heightmap.geotiff",
"Input",
TL(
"Read heightmap from GeoTIFF"));
144 oc.
addSynonyme(
"ignore-errors",
"dismiss-loading-errors",
true);
145 oc.
addDescription(
"ignore-errors",
"Report",
TL(
"Continue on broken input"));
148 oc.
addDescription(
"ignore-errors.connections",
"Report",
TL(
"Continue on invalid connections"));
151 oc.
addDescription(
"show-errors.connections-first-try",
"Report",
TL(
"Show errors in connections at parsing"));
154 oc.
addDescription(
"ignore-errors.edge-type",
"Report",
TL(
"Continue on unknown edge types"));
157 oc.
addDescription(
"speed-in-kmh",
"Processing",
TL(
"vmax is parsed as given in km/h"));
160 oc.
addDescription(
"construction-date",
"Processing",
TL(
"Use YYYY-MM-DD date to determine the readiness of features under construction"));
166 oc.
addDescription(
"discard-params",
"Formats",
TL(
"Remove the list of keys from all params"));
169 oc.
addDescription(
"ignore-change-restrictions",
"Formats",
TL(
"List vehicle classes that may ignore lane changing restrictions ('all' discards all restrictions)"));
172 oc.
addSynonyme(
"ignore-widths",
"opendrive.ignore-widths",
false);
173 oc.
addDescription(
"ignore-widths",
"Formats",
TL(
"Whether lane widths shall be ignored."));
177 oc.
addSynonyme(
"plain.extend-edge-shape",
"xml.keep-shape",
true);
178 oc.
addDescription(
"plain.extend-edge-shape",
"Processing",
TL(
"If edge shapes do not end at the node positions, extend them"));
182 oc.
addDescription(
"osm.skip-duplicates-check",
"Formats",
TL(
"Skips the check for duplicate nodes and edges"));
185 oc.
addDescription(
"osm.elevation",
"Formats",
TL(
"Imports elevation data"));
188 oc.
addDescription(
"osm.layer-elevation",
"Formats",
TL(
"Reconstruct (relative) elevation based on layer data. Each layer is raised by FLOAT m"));
191 oc.
addDescription(
"osm.layer-elevation.max-grade",
"Formats",
TL(
"Maximum grade threshold in % at 50km/h when reconstructing elevation based on layer data. The value is scaled according to road speed."));
194 oc.
addDescription(
"osm.oneway-spread-right",
"Formats",
TL(
"Whether one-way roads should be spread to the side instead of centered"));
197 oc.
addDescription(
"osm.lane-access",
"Formats",
TL(
"Import lane-specific access restrictions"));
200 oc.
addSynonyme(
"osm.bike-access",
"osm.bike-lanes");
201 oc.
addDescription(
"osm.bike-access",
"Formats",
TL(
"Import bike lanes and fix directions and permissions on bike paths"));
210 oc.
addDescription(
"osm.turn-lanes",
"Formats",
TL(
"Import turning arrows from OSM to help with connection building"));
213 oc.
addDescription(
"osm.stop-output.length",
"Formats",
TL(
"The default length of a public transport stop in FLOAT m"));
215 oc.
addDescription(
"osm.stop-output.length.bus",
"Formats",
TL(
"The default length of a bus stop in FLOAT m"));
217 oc.
addDescription(
"osm.stop-output.length.tram",
"Formats",
TL(
"The default length of a tram stop in FLOAT m"));
219 oc.
addDescription(
"osm.stop-output.length.train",
"Formats",
TL(
"The default length of a train stop in FLOAT m"));
222 oc.
addDescription(
"osm.railsignals",
"Formats",
TL(
"Specify custom rules for importing railway signals"));
225 oc.
addSynonyme(
"osm.all-attributes",
"osm.all-tags");
226 oc.
addDescription(
"osm.all-attributes",
"Formats",
TL(
"Whether additional attributes shall be imported"));
229 oc.
addSynonyme(
"osm.extra-attributes",
"osm.extra-tags");
230 oc.
addDescription(
"osm.extra-attributes",
"Formats",
TL(
"List of additional attributes that shall be imported from OSM via osm.all-attributes (set 'all' to import all)"));
233 oc.
addDescription(
"osm.speedlimit-none",
"Formats",
TL(
"The speed limit to be set when there is no actual speed limit in reality"));
237 oc.
addDescription(
"matsim.keep-length",
"Formats",
TL(
"The edge lengths given in the MATSim-file will be kept"));
240 oc.
addDescription(
"matsim.lanes-from-capacity",
"Formats",
TL(
"The lane number will be computed from the capacity"));
245 oc.
addSynonyme(
"shapefile.street-id",
"arcview.street-id",
true);
246 oc.
addDescription(
"shapefile.street-id",
"Formats",
TL(
"Read edge ids from column STR"));
249 oc.
addSynonyme(
"shapefile.from-id",
"arcview.from-id",
true);
250 oc.
addDescription(
"shapefile.from-id",
"Formats",
TL(
"Read from-node ids from column STR"));
253 oc.
addSynonyme(
"shapefile.to-id",
"arcview.to-id",
true);
254 oc.
addDescription(
"shapefile.to-id",
"Formats",
TL(
"Read to-node ids from column STR"));
257 oc.
addSynonyme(
"shapefile.type-id",
"arcview.type-id",
true);
258 oc.
addDescription(
"shapefile.type-id",
"Formats",
TL(
"Read type ids from column STR"));
261 oc.
addDescription(
"shapefile.laneNumber",
"Formats",
TL(
"Read lane number from column STR"));
264 oc.
addDescription(
"shapefile.speed",
"Formats",
TL(
"Read speed from column STR"));
267 oc.
addDescription(
"shapefile.length",
"Formats",
TL(
"Read custom edge length from column STR"));
270 oc.
addDescription(
"shapefile.width",
"Formats",
TL(
"Read total edge width from column STR"));
273 oc.
addDescription(
"shapefile.name",
"Formats",
TL(
"Read (non-unique) name from column STR"));
276 oc.
addDescription(
"shapefile.node-join-dist",
"Formats",
TL(
"Distance threshold for determining whether distinct shapes are connected (used when from-id and to-id are not available)"));
279 oc.
addDescription(
"shapefile.add-params",
"Formats",
TL(
"Add the list of field names as edge params"));
282 oc.
addSynonyme(
"shapefile.use-defaults-on-failure",
"arcview.use-defaults-on-failure",
true);
283 oc.
addDescription(
"shapefile.use-defaults-on-failure",
"Formats",
TL(
"Uses edge type defaults on problems"));
286 oc.
addSynonyme(
"shapefile.all-bidirectional",
"shapefile.all-bidi");
287 oc.
addSynonyme(
"shapefile.all-bidirectional",
"arcview.all-bidi",
true);
288 oc.
addDescription(
"shapefile.all-bidirectional",
"Formats",
TL(
"Insert edges in both directions"));
291 oc.
addSynonyme(
"shapefile.guess-projection",
"arcview.guess-projection",
true);
292 oc.
addDescription(
"shapefile.guess-projection",
"Formats",
TL(
"Guess the proper projection"));
295 oc.
addDescription(
"shapefile.traditional-axis-mapping",
"Formats",
TL(
"Use traditional axis order (lon, lat)"));
300 oc.
addDescription(
"dlr-navteq.tolerant-permissions",
"Formats",
TL(
"Allow more vehicle classes by default"));
303 oc.
addDescription(
"dlr-navteq.keep-length",
"Formats",
TL(
"The edge lengths given in the DLR Navteq-file will be kept"));
308 oc.
addSynonyme(
"vissim.join-distance",
"vissim.offset",
true);
309 oc.
addDescription(
"vissim.join-distance",
"Formats",
TL(
"Structure join offset"));
312 oc.
addDescription(
"vissim.default-speed",
"Formats",
TL(
"Use FLOAT as default speed"));
315 oc.
addDescription(
"vissim.speed-norm",
"Formats",
TL(
"Factor for edge velocity"));
318 oc.
addDescription(
"vissim.report-unset-speeds",
"Formats",
TL(
"Writes lanes without an explicit speed set"));
323 oc.
addDescription(
"visum.language-file",
"Formats",
TL(
"Load language mappings from FILE"));
326 oc.
addDescription(
"visum.use-type-priority",
"Formats",
TL(
"Uses priorities from types"));
329 oc.
addDescription(
"visum.use-type-laneno",
"Formats",
TL(
"Uses lane numbers from types"));
332 oc.
addDescription(
"visum.use-type-speed",
"Formats",
TL(
"Uses speeds from types"));
335 oc.
addDescription(
"visum.connector-speeds",
"Formats",
TL(
"Sets connector speed"));
338 oc.
addSynonyme(
"visum.connectors-lane-number",
"visum.connector-laneno",
true);
339 oc.
addDescription(
"visum.connectors-lane-number",
"Formats",
TL(
"Sets connector lane number"));
342 oc.
addDescription(
"visum.no-connectors",
"Formats",
TL(
"Excludes connectors"));
345 oc.
addSynonyme(
"visum.recompute-lane-number",
"visum.recompute-laneno",
true);
346 oc.
addDescription(
"visum.recompute-lane-number",
"Formats",
TL(
"Computes the number of lanes from the edges' capacities"));
349 oc.
addDescription(
"visum.verbose-warnings",
"Formats",
TL(
"Prints all warnings, some of which are due to VISUM misbehaviour"));
352 oc.
addSynonyme(
"visum.lanes-from-capacity.norm",
"capacity-norm",
true);
353 oc.
addSynonyme(
"visum.lanes-from-capacity.norm",
"lanes-from-capacity.norm");
354 oc.
addDescription(
"visum.lanes-from-capacity.norm",
"Formats",
TL(
"The factor for flow to no. lanes conversion"));
359 oc.
addDescription(
"opendrive.import-all-lanes",
"Formats",
TL(
"Imports all lane types"));
361 oc.
addDescription(
"opendrive.curve-resolution",
"Formats",
TL(
"The geometry resolution in m when importing curved geometries as line segments."));
363 oc.
addDescription(
"opendrive.advance-stopline",
"Formats",
TL(
"Allow stop lines to be built beyond the start of the junction if the geometries allow so"));
365 oc.
addDescription(
"opendrive.min-width",
"Formats",
TL(
"The minimum lane width for determining start or end of variable-width lanes"));
367 oc.
addDescription(
"opendrive.internal-shapes",
"Formats",
TL(
"Import internal lane shapes"));
369 oc.
addDescription(
"opendrive.position-ids",
"Formats",
TL(
"Sets edge-id based on road-id and offset in m (legacy)"));
371 oc.
addDescription(
"opendrive.lane-shapes",
"Formats",
TL(
"Use custom lane shapes to compensate discarded lane types"));
373 oc.
addDescription(
"opendrive.signal-groups",
"Formats",
TL(
"Use the OpenDRIVE controller information for the generated signal program"));
375 oc.
addDescription(
"opendrive.ignore-misplaced-signals",
"Formats",
TL(
"Ignore traffic signals which do not control any driving lane"));
379 oc.
addDescription(
"tls.discard-loaded",
"TLS Building",
"Does not instantiate traffic lights loaded from other formats than plain-XML");
382 oc.
addDescription(
"tls.discard-simple",
"TLS Building",
"Does not instantiate traffic lights at geometry-like nodes loaded from other formats than plain-XML");
386 oc.
addDescription(
"railway.signals.discard",
"Railway",
TL(
"Discard all railway signal information loaded from other formats than plain-xml"));
397 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-prefix") || oc.
isSet(
"shapefile-prefix")) && numProjections == 0) {
399 oc.
set(
"proj.utm",
"true");
402 if (oc.
isSet(
"dlr-navteq-prefix") && oc.
isDefault(
"proj.scale")) {
406 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-prefix") || oc.
isSet(
"shapefile-prefix")) && !oc.
getBool(
"simple-projection")) {
407 WRITE_ERROR(
TL(
"Cannot import network data without PROJ-Library. Please install package proj before building sumo"));
411 if (oc.
isSet(
"sumo-net-file")) {
414 oc.
set(
"no-turnarounds",
"true");
416 if (oc.
isWriteable(
"offset.disable-normalization")) {
418 oc.
set(
"offset.disable-normalization",
"true");
422 oc.
set(
"geometry.max-grade.fix",
"false");
424 if (oc.
isWriteable(
"geometry.min-radius.fix.railways")) {
426 oc.
set(
"geometry.min-radius.fix.railways",
"false");
429 if (!oc.
isSet(
"type-files")) {
430 const char* sumoPath = std::getenv(
"SUMO_HOME");
431 if (sumoPath ==
nullptr) {
432 WRITE_WARNING(
TL(
"Environment variable SUMO_HOME is not set, using built in type maps."));
434 const std::string path = sumoPath + std::string(
"/data/typemap/");
435 if (oc.
isSet(
"osm-files")) {
436 oc.
setDefault(
"type-files", path +
"osmNetconvert.typ.xml");
438 if (oc.
isSet(
"opendrive-files")) {
439 oc.
setDefault(
"type-files", path +
"opendriveNetconvert.typ.xml");
443 if (oc.
isSet(
"opendrive-files")) {
444 if (oc.
isDefault(
"tls.left-green.time")) {
448 if (oc.
isDefault(
"rectangular-lane-cut")) {
450 oc.
setDefault(
"rectangular-lane-cut",
"true");
452 if (oc.
isDefault(
"geometry.max-grade.fix")) {
454 oc.
setDefault(
"geometry.max-grade.fix",
"false");
456 if (oc.
isDefault(
"no-turnarounds") && oc.
isDefault(
"no-turnarounds.except-deadend")) {
458 oc.
set(
"no-turnarounds.except-deadend",
"true");
464 if (oc.
getBool(
"osm.crossings") && !oc.
getBool(
"osm.sidewalks")) {
465 WRITE_WARNING(
TL(
"It is recommended to use option osm.crossings with osm.sidewalks"));
467 if (oc.
isSet(
"shapefile-prefix") && !oc.
isDefault(
"shapefile.name")) {
#define WRITE_WARNING(msg)
std::vector< std::string > StringVector
Definition of a vector of strings.
static bool checkOptions(OptionsCont &oc)
Checks set options for being valid.
static void fillOptions(OptionsCont &oc, bool forNetedit=false)
Inserts options used by the network importer and network building modules.
static const std::string GEO_SCALE
scaling factor for geo coordinates (DLRNavteq format uses this to increase floating point precisions)
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.
bool isWriteable(const std::string &name)
Returns the information whether the named option may be 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 set(const std::string &name, const std::string &value, const bool append=false)
Sets the given value for the named option.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
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.
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.
static void addReportOptions(OptionsCont &oc)
Adds reporting options to the given container.