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)"));
173 oc.
addSynonyme(
"plain.extend-edge-shape",
"xml.keep-shape",
true);
174 oc.
addDescription(
"plain.extend-edge-shape",
"Processing",
TL(
"If edge shapes do not end at the node positions, extend them"));
178 oc.
addDescription(
"osm.skip-duplicates-check",
"Formats",
TL(
"Skips the check for duplicate nodes and edges"));
181 oc.
addDescription(
"osm.elevation",
"Formats",
TL(
"Imports elevation data"));
184 oc.
addDescription(
"osm.layer-elevation",
"Formats",
TL(
"Reconstruct (relative) elevation based on layer data. Each layer is raised by FLOAT m"));
187 oc.
addDescription(
"osm.layer-elevation.max-grade",
"Formats",
TL(
"Maximum grade threshold in % at 50km/h when reconstrucing elevation based on layer data. The value is scaled according to road speed."));
190 oc.
addDescription(
"osm.oneway-spread-right",
"Formats",
TL(
"Whether one-way roads should be spread to the side instead of centered"));
193 oc.
addDescription(
"osm.lane-access",
"Formats",
TL(
"Import lane-specific access restrictions"));
196 oc.
addSynonyme(
"osm.bike-access",
"osm.bike-lanes");
197 oc.
addDescription(
"osm.bike-access",
"Formats",
TL(
"Import bike lanes and fix directions and permissions on bike paths"));
206 oc.
addDescription(
"osm.turn-lanes",
"Formats",
TL(
"Import turning arrows from OSM to help with connection building"));
209 oc.
addDescription(
"osm.stop-output.length",
"Formats",
TL(
"The default length of a public transport stop in FLOAT m"));
211 oc.
addDescription(
"osm.stop-output.length.bus",
"Formats",
TL(
"The default length of a bus stop in FLOAT m"));
213 oc.
addDescription(
"osm.stop-output.length.tram",
"Formats",
TL(
"The default length of a tram stop in FLOAT m"));
215 oc.
addDescription(
"osm.stop-output.length.train",
"Formats",
TL(
"The default length of a train stop in FLOAT m"));
218 oc.
addSynonyme(
"osm.all-attributes",
"osm.all-tags");
219 oc.
addDescription(
"osm.all-attributes",
"Formats",
TL(
"Whether additional attributes shall be imported"));
222 oc.
addSynonyme(
"osm.extra-attributes",
"osm.extra-tags");
223 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)"));
226 oc.
addDescription(
"osm.speedlimit-none",
"Formats",
TL(
"The speed limit to be set when there is no actual speed limit in reality"));
230 oc.
addDescription(
"matsim.keep-length",
"Formats",
TL(
"The edge lengths given in the MATSIM-file will be kept"));
233 oc.
addDescription(
"matsim.lanes-from-capacity",
"Formats",
TL(
"The lane number will be computed from the capacity"));
238 oc.
addSynonyme(
"shapefile.street-id",
"arcview.street-id",
true);
239 oc.
addDescription(
"shapefile.street-id",
"Formats",
TL(
"Read edge ids from column STR"));
242 oc.
addSynonyme(
"shapefile.from-id",
"arcview.from-id",
true);
243 oc.
addDescription(
"shapefile.from-id",
"Formats",
TL(
"Read from-node ids from column STR"));
246 oc.
addSynonyme(
"shapefile.to-id",
"arcview.to-id",
true);
247 oc.
addDescription(
"shapefile.to-id",
"Formats",
TL(
"Read to-node ids from column STR"));
250 oc.
addSynonyme(
"shapefile.type-id",
"arcview.type-id",
true);
251 oc.
addDescription(
"shapefile.type-id",
"Formats",
TL(
"Read type ids from column STR"));
254 oc.
addDescription(
"shapefile.laneNumber",
"Formats",
TL(
"Read lane number from column STR"));
257 oc.
addDescription(
"shapefile.speed",
"Formats",
TL(
"Read speed from column STR"));
260 oc.
addDescription(
"shapefile.length",
"Formats",
TL(
"Read custom edge length from column STR"));
263 oc.
addDescription(
"shapefile.width",
"Formats",
TL(
"Read total edge width from column STR"));
266 oc.
addDescription(
"shapefile.name",
"Formats",
TL(
"Read (non-unique) name from column STR"));
269 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)"));
272 oc.
addDescription(
"shapefile.add-params",
"Formats",
TL(
"Add the list of field names as edge params"));
275 oc.
addSynonyme(
"shapefile.use-defaults-on-failure",
"arcview.use-defaults-on-failure",
true);
276 oc.
addDescription(
"shapefile.use-defaults-on-failure",
"Formats",
TL(
"Uses edge type defaults on problems"));
279 oc.
addSynonyme(
"shapefile.all-bidirectional",
"shapefile.all-bidi");
280 oc.
addSynonyme(
"shapefile.all-bidirectional",
"arcview.all-bidi",
true);
281 oc.
addDescription(
"shapefile.all-bidirectional",
"Formats",
TL(
"Insert edges in both directions"));
284 oc.
addSynonyme(
"shapefile.guess-projection",
"arcview.guess-projection",
true);
285 oc.
addDescription(
"shapefile.guess-projection",
"Formats",
TL(
"Guess the proper projection"));
288 oc.
addDescription(
"shapefile.traditional-axis-mapping",
"Formats",
TL(
"Use traditional axis order (lon, lat)"));
293 oc.
addDescription(
"dlr-navteq.tolerant-permissions",
"Formats",
TL(
"Allow more vehicle classes by default"));
296 oc.
addDescription(
"dlr-navteq.keep-length",
"Formats",
TL(
"The edge lengths given in the DLR Navteq-file will be kept"));
301 oc.
addSynonyme(
"vissim.join-distance",
"vissim.offset",
true);
302 oc.
addDescription(
"vissim.join-distance",
"Formats",
TL(
"Structure join offset"));
305 oc.
addDescription(
"vissim.default-speed",
"Formats",
TL(
"Use FLOAT as default speed"));
308 oc.
addDescription(
"vissim.speed-norm",
"Formats",
TL(
"Factor for edge velocity"));
311 oc.
addDescription(
"vissim.report-unset-speeds",
"Formats",
TL(
"Writes lanes without an explicit speed set"));
316 oc.
addDescription(
"visum.language-file",
"Formats",
TL(
"Load language mappings from FILE"));
319 oc.
addDescription(
"visum.use-type-priority",
"Formats",
TL(
"Uses priorities from types"));
322 oc.
addDescription(
"visum.use-type-laneno",
"Formats",
TL(
"Uses lane numbers from types"));
325 oc.
addDescription(
"visum.use-type-speed",
"Formats",
TL(
"Uses speeds from types"));
328 oc.
addDescription(
"visum.connector-speeds",
"Formats",
TL(
"Sets connector speed"));
331 oc.
addSynonyme(
"visum.connectors-lane-number",
"visum.connector-laneno",
true);
332 oc.
addDescription(
"visum.connectors-lane-number",
"Formats",
TL(
"Sets connector lane number"));
335 oc.
addDescription(
"visum.no-connectors",
"Formats",
TL(
"Excludes connectors"));
338 oc.
addSynonyme(
"visum.recompute-lane-number",
"visum.recompute-laneno",
true);
339 oc.
addDescription(
"visum.recompute-lane-number",
"Formats",
TL(
"Computes the number of lanes from the edges' capacities"));
342 oc.
addDescription(
"visum.verbose-warnings",
"Formats",
TL(
"Prints all warnings, some of which are due to VISUM misbehaviour"));
345 oc.
addSynonyme(
"visum.lanes-from-capacity.norm",
"capacity-norm",
true);
346 oc.
addSynonyme(
"visum.lanes-from-capacity.norm",
"lanes-from-capacity.norm");
347 oc.
addDescription(
"visum.lanes-from-capacity.norm",
"Formats",
TL(
"The factor for flow to no. lanes conversion"));
352 oc.
addDescription(
"opendrive.import-all-lanes",
"Formats",
TL(
"Imports all lane types"));
354 oc.
addDescription(
"opendrive.ignore-widths",
"Formats",
TL(
"Whether lane widths shall be ignored."));
356 oc.
addDescription(
"opendrive.curve-resolution",
"Formats",
TL(
"The geometry resolution in m when importing curved geometries as line segments."));
358 oc.
addDescription(
"opendrive.advance-stopline",
"Formats",
TL(
"Allow stop lines to be built beyond the start of the junction if the geometries allow so"));
360 oc.
addDescription(
"opendrive.min-width",
"Formats",
TL(
"The minimum lane width for determining start or end of variable-width lanes"));
362 oc.
addDescription(
"opendrive.internal-shapes",
"Formats",
TL(
"Import internal lane shapes"));
364 oc.
addDescription(
"opendrive.position-ids",
"Formats",
TL(
"Sets edge-id based on road-id and offset in m (legacy)"));
366 oc.
addDescription(
"opendrive.lane-shapes",
"Formats",
TL(
"Use custom lane shapes to compensate discarded lane types"));
368 oc.
addDescription(
"opendrive.signal-groups",
"Formats",
TL(
"Use the OpenDRIVE controller information for the generated signal program"));
372 oc.
addDescription(
"tls.discard-loaded",
"TLS Building",
"Does not instatiate traffic lights loaded from other formats than plain-XML");
375 oc.
addDescription(
"tls.discard-simple",
"TLS Building",
"Does not instatiate traffic lights at geometry-like nodes loaded from other formats than plain-XML");
379 oc.
addDescription(
"railway.signals.discard",
"Railway",
TL(
"Discard all railway signal information loaded from other formats than plain-xml"));
390 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-prefix") || oc.
isSet(
"shapefile-prefix")) && numProjections == 0) {
392 oc.
set(
"proj.utm",
"true");
395 if (oc.
isSet(
"dlr-navteq-prefix") && oc.
isDefault(
"proj.scale")) {
399 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-prefix") || oc.
isSet(
"shapefile-prefix")) && !oc.
getBool(
"simple-projection")) {
400 WRITE_ERROR(
TL(
"Cannot import network data without PROJ-Library. Please install package proj before building sumo"));
404 if (oc.
isSet(
"sumo-net-file")) {
407 oc.
set(
"no-turnarounds",
"true");
409 if (oc.
isWriteable(
"offset.disable-normalization")) {
411 oc.
set(
"offset.disable-normalization",
"true");
415 oc.
set(
"geometry.max-grade.fix",
"false");
417 if (oc.
isWriteable(
"geometry.min-radius.fix.railways")) {
419 oc.
set(
"geometry.min-radius.fix.railways",
"false");
422 if (!oc.
isSet(
"type-files")) {
423 const char* sumoPath = std::getenv(
"SUMO_HOME");
424 if (sumoPath ==
nullptr) {
425 WRITE_WARNING(
TL(
"Environment variable SUMO_HOME is not set, using built in type maps."));
427 const std::string path = sumoPath + std::string(
"/data/typemap/");
428 if (oc.
isSet(
"osm-files")) {
429 oc.
setDefault(
"type-files", path +
"osmNetconvert.typ.xml");
431 if (oc.
isSet(
"opendrive-files")) {
432 oc.
setDefault(
"type-files", path +
"opendriveNetconvert.typ.xml");
436 if (oc.
isSet(
"opendrive-files")) {
437 if (oc.
isDefault(
"tls.left-green.time")) {
441 if (oc.
isDefault(
"rectangular-lane-cut")) {
443 oc.
setDefault(
"rectangular-lane-cut",
"true");
445 if (oc.
isDefault(
"geometry.max-grade.fix")) {
447 oc.
setDefault(
"geometry.max-grade.fix",
"false");
449 if (oc.
isDefault(
"no-turnarounds") && oc.
isDefault(
"no-turnarounds.except-deadend")) {
451 oc.
set(
"no-turnarounds.except-deadend",
"true");
457 if (oc.
getBool(
"osm.crossings") && !oc.
getBool(
"osm.sidewalks")) {
458 WRITE_WARNING(
TL(
"It is recommend to use option osm.crossings with osm.sidewalks"));
#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.