53 oc.
addDescription(
"sumo-net-file",
"Input",
"Read SUMO-net from FILE");
57 oc.
addSynonyme(
"node-files",
"xml-node-files",
true);
60 oc.
addDescription(
"node-files",
"Input",
"Read XML-node defs from FILE");
63 oc.
addSynonyme(
"edge-files",
"xml-edge-files",
true);
66 oc.
addDescription(
"edge-files",
"Input",
"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",
"Read XML-connection defs from FILE");
75 oc.
addDescription(
"tllogic-files",
"Input",
"Read XML-traffic light defs from FILE");
78 oc.
addSynonyme(
"type-files",
"xml-type-files",
true);
81 oc.
addDescription(
"type-files",
"Input",
"Read XML-type defs from FILE");
86 oc.
addDescription(
"ptstop-files",
"Input",
"Reads public transport stops from FILE");
88 oc.
addDescription(
"ptline-files",
"Input",
"Reads public transport lines from FILE");
90 oc.
addDescription(
"polygon-files",
"Input",
"Reads polygons from FILE for embedding in network where applicable");
95 oc.
addSynonyme(
"shapefile-prefix",
"arcview",
true);
97 oc.
addDescription(
"shapefile-prefix",
"Input",
"Read shapefiles (ArcView, Tiger, ...) from files starting with 'FILE'");
101 oc.
addSynonyme(
"dlr-navteq-prefix",
"elmar2",
true);
102 oc.
addDescription(
"dlr-navteq-prefix",
"Input",
"Read converted Navteq GDF data (unsplitted Elmar-network) from path 'FILE'");
106 oc.
addDescription(
"osm-files",
"Input",
"Read OSM-network from path 'FILE(s)'");
110 oc.
addDescription(
"opendrive-files",
"Input",
"Read OpenDRIVE-network from FILE");
114 oc.
addDescription(
"visum-file",
"Input",
"Read VISUM-net from FILE");
118 oc.
addDescription(
"vissim-file",
"Input",
"Read VISSIM-net from FILE");
121 oc.
addSynonyme(
"robocup-dir",
"robocup-net",
true);
123 oc.
addDescription(
"robocup-dir",
"Input",
"Read RoboCup-net from DIR");
127 oc.
addDescription(
"matsim-files",
"Input",
"Read MATsim-net from FILE");
131 oc.
addDescription(
"itsumo-files",
"Input",
"Read ITSUMO-net from FILE");
134 oc.
addDescription(
"heightmap.shapefiles",
"Input",
"Read heightmap from ArcGIS shapefile");
137 oc.
addDescription(
"heightmap.geotiff",
"Input",
"Read heightmap from GeoTIFF");
144 oc.
addSynonyme(
"ignore-errors",
"dismiss-loading-errors",
true);
145 oc.
addDescription(
"ignore-errors",
"Report",
"Continue on broken input");
148 oc.
addDescription(
"ignore-errors.connections",
"Report",
"Continue on invalid connections");
151 oc.
addDescription(
"show-errors.connections-first-try",
"Report",
"Show errors in connections at parsing");
154 oc.
addDescription(
"ignore-errors.edge-type",
"Report",
"Continue on unknown edge types");
157 oc.
addDescription(
"speed-in-kmh",
"Processing",
"vmax is parsed as given in km/h");
160 oc.
addDescription(
"construction-date",
"Processing",
"Use YYYY-MM-DD date to determine the readiness of features under construction");
166 oc.
addDescription(
"discard-params",
"Formats",
"Remove the list of keys from all params");
169 oc.
addDescription(
"ignore-change-restrictions",
"Formats",
"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",
"If edge shapes do not end at the node positions, extend them");
178 oc.
addDescription(
"osm.skip-duplicates-check",
"Formats",
"Skips the check for duplicate nodes and edges");
181 oc.
addDescription(
"osm.elevation",
"Formats",
"Imports elevation data");
184 oc.
addDescription(
"osm.layer-elevation",
"Formats",
"Reconstruct (relative) elevation based on layer data. Each layer is raised by FLOAT m");
187 oc.
addDescription(
"osm.layer-elevation.max-grade",
"Formats",
"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",
"Whether one-way roads should be spread to the side instead of centered");
193 oc.
addDescription(
"osm.lane-access",
"Formats",
"Import lane-specific access restrictions");
196 oc.
addDescription(
"osm.bike-access",
"Formats",
"Check additional attributes to fix directions and permissions on bike paths");
199 oc.
addDescription(
"osm.sidewalks",
"Formats",
"Import sidewalks");
202 oc.
addDescription(
"osm.turn-lanes",
"Formats",
"Import turning arrows from OSM to help with connection building");
205 oc.
addDescription(
"osm.stop-output.length",
"Formats",
"The default length of a public transport stop in FLOAT m");
207 oc.
addDescription(
"osm.stop-output.length.bus",
"Formats",
"The default length of a bus stop in FLOAT m");
209 oc.
addDescription(
"osm.stop-output.length.tram",
"Formats",
"The default length of a tram stop in FLOAT m");
211 oc.
addDescription(
"osm.stop-output.length.train",
"Formats",
"The default length of a train stop in FLOAT m");
214 oc.
addDescription(
"osm.all-attributes",
"Formats",
"Whether additional attributes shall be imported");
217 oc.
addDescription(
"osm.extra-attributes",
"Formats",
"List of additional attributes that shall be imported from OSM via osm.all-attributes (set 'all' to import all)");
220 oc.
addDescription(
"osm.speedlimit-none",
"Formats",
"The speed limit to be set when there is no actual speed limit in reality");
224 oc.
addDescription(
"matsim.keep-length",
"Formats",
"The edge lengths given in the MATSIM-file will be kept");
227 oc.
addDescription(
"matsim.lanes-from-capacity",
"Formats",
"The lane number will be computed from the capacity");
232 oc.
addSynonyme(
"shapefile.street-id",
"arcview.street-id",
true);
233 oc.
addDescription(
"shapefile.street-id",
"Formats",
"Read edge ids from column STR");
236 oc.
addSynonyme(
"shapefile.from-id",
"arcview.from-id",
true);
237 oc.
addDescription(
"shapefile.from-id",
"Formats",
"Read from-node ids from column STR");
240 oc.
addSynonyme(
"shapefile.to-id",
"arcview.to-id",
true);
241 oc.
addDescription(
"shapefile.to-id",
"Formats",
"Read to-node ids from column STR");
244 oc.
addSynonyme(
"shapefile.type-id",
"arcview.type-id",
true);
245 oc.
addDescription(
"shapefile.type-id",
"Formats",
"Read type ids from column STR");
248 oc.
addDescription(
"shapefile.laneNumber",
"Formats",
"Read lane number from column STR");
251 oc.
addDescription(
"shapefile.speed",
"Formats",
"Read speed from column STR");
254 oc.
addDescription(
"shapefile.name",
"Formats",
"Read (non-unique) name from column STR");
257 oc.
addDescription(
"shapefile.node-join-dist",
"Formats",
"Distance threshold for determining whether distinct shapes are connected (used when from-id and to-id are not available)");
260 oc.
addDescription(
"shapefile.add-params",
"Formats",
"Add the list of field names as edge params");
263 oc.
addSynonyme(
"shapefile.use-defaults-on-failure",
"arcview.use-defaults-on-failure",
true);
264 oc.
addDescription(
"shapefile.use-defaults-on-failure",
"Formats",
"Uses edge type defaults on problems");
267 oc.
addSynonyme(
"shapefile.all-bidirectional",
"shapefile.all-bidi");
268 oc.
addSynonyme(
"shapefile.all-bidirectional",
"arcview.all-bidi",
true);
269 oc.
addDescription(
"shapefile.all-bidirectional",
"Formats",
"Insert edges in both directions");
272 oc.
addSynonyme(
"shapefile.guess-projection",
"arcview.guess-projection",
true);
273 oc.
addDescription(
"shapefile.guess-projection",
"Formats",
"Guess the proper projection");
276 oc.
addDescription(
"shapefile.traditional-axis-mapping",
"Formats",
"Use traditional axis order (lon, lat)");
281 oc.
addDescription(
"dlr-navteq.tolerant-permissions",
"Formats",
"Allow more vehicle classes by default");
284 oc.
addDescription(
"dlr-navteq.keep-length",
"Formats",
"The edge lengths given in the DLR Navteq-file will be kept");
289 oc.
addSynonyme(
"vissim.join-distance",
"vissim.offset",
true);
290 oc.
addDescription(
"vissim.join-distance",
"Formats",
"Structure join offset");
293 oc.
addDescription(
"vissim.default-speed",
"Formats",
"Use FLOAT as default speed");
296 oc.
addDescription(
"vissim.speed-norm",
"Formats",
"Factor for edge velocity");
299 oc.
addDescription(
"vissim.report-unset-speeds",
"Formats",
"Writes lanes without an explicit speed set");
304 oc.
addDescription(
"visum.language-file",
"Formats",
"Load language mappings from FILE");
307 oc.
addDescription(
"visum.use-type-priority",
"Formats",
"Uses priorities from types");
310 oc.
addDescription(
"visum.use-type-laneno",
"Formats",
"Uses lane numbers from types");
313 oc.
addDescription(
"visum.use-type-speed",
"Formats",
"Uses speeds from types");
316 oc.
addDescription(
"visum.connector-speeds",
"Formats",
"Sets connector speed");
319 oc.
addSynonyme(
"visum.connectors-lane-number",
"visum.connector-laneno",
true);
320 oc.
addDescription(
"visum.connectors-lane-number",
"Formats",
"Sets connector lane number");
323 oc.
addDescription(
"visum.no-connectors",
"Formats",
"Excludes connectors");
326 oc.
addSynonyme(
"visum.recompute-lane-number",
"visum.recompute-laneno",
true);
327 oc.
addDescription(
"visum.recompute-lane-number",
"Formats",
"Computes the number of lanes from the edges' capacities");
330 oc.
addDescription(
"visum.verbose-warnings",
"Formats",
"Prints all warnings, some of which are due to VISUM misbehaviour");
333 oc.
addSynonyme(
"visum.lanes-from-capacity.norm",
"capacity-norm",
true);
334 oc.
addSynonyme(
"visum.lanes-from-capacity.norm",
"lanes-from-capacity.norm");
335 oc.
addDescription(
"visum.lanes-from-capacity.norm",
"Formats",
"The factor for flow to no. lanes conversion");
340 oc.
addDescription(
"opendrive.import-all-lanes",
"Formats",
"Imports all lane types");
342 oc.
addDescription(
"opendrive.ignore-widths",
"Formats",
"Whether lane widths shall be ignored.");
344 oc.
addDescription(
"opendrive.curve-resolution",
"Formats",
"The geometry resolution in m when importing curved geometries as line segments.");
346 oc.
addDescription(
"opendrive.advance-stopline",
"Formats",
"Allow stop lines to be built beyond the start of the junction if the geometries allow so");
348 oc.
addDescription(
"opendrive.min-width",
"Formats",
"The minimum lane width for determining start or end of variable-width lanes");
350 oc.
addDescription(
"opendrive.internal-shapes",
"Formats",
"Import internal lane shapes");
352 oc.
addDescription(
"opendrive.position-ids",
"Formats",
"Sets edge-id based on road-id and offset in m (legacy)");
354 oc.
addDescription(
"opendrive.lane-shapes",
"Formats",
"Use custom lane shapes to compensate discarded lane types");
358 oc.
addDescription(
"tls.discard-loaded",
"TLS Building",
"Does not instatiate traffic lights loaded from other formats than plain-XML");
361 oc.
addDescription(
"tls.discard-simple",
"TLS Building",
"Does not instatiate traffic lights at geometry-like nodes loaded from other formats than plain-XML");
365 oc.
addDescription(
"railway.signals.discard",
"Railway",
"Discard all railway signal information loaded from other formats than plain-xml");
377 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-prefix") || oc.
isSet(
"shapefile-prefix")) && numProjections == 0) {
379 oc.
set(
"proj.utm",
"true");
382 if (oc.
isSet(
"dlr-navteq-prefix") && oc.
isDefault(
"proj.scale")) {
386 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-prefix") || oc.
isSet(
"shapefile-prefix")) && !oc.
getBool(
"simple-projection")) {
387 WRITE_ERROR(
TL(
"Cannot import network data without PROJ-Library. Please install package proj before building sumo"));
391 if (oc.
isSet(
"sumo-net-file")) {
394 oc.
set(
"no-turnarounds",
"true");
396 if (oc.
isWriteable(
"offset.disable-normalization")) {
398 oc.
set(
"offset.disable-normalization",
"true");
402 oc.
set(
"geometry.max-grade.fix",
"false");
404 if (oc.
isWriteable(
"geometry.min-radius.fix.railways")) {
406 oc.
set(
"geometry.min-radius.fix.railways",
"false");
409 if (!oc.
isSet(
"type-files")) {
410 const char* sumoPath = std::getenv(
"SUMO_HOME");
411 if (sumoPath ==
nullptr) {
412 WRITE_WARNING(
TL(
"Environment variable SUMO_HOME is not set, using built in type maps."));
414 const std::string path = sumoPath + std::string(
"/data/typemap/");
415 if (oc.
isSet(
"osm-files")) {
416 oc.
setDefault(
"type-files", path +
"osmNetconvert.typ.xml");
418 if (oc.
isSet(
"opendrive-files")) {
419 oc.
setDefault(
"type-files", path +
"opendriveNetconvert.typ.xml");
423 if (oc.
isSet(
"opendrive-files")) {
424 if (oc.
isDefault(
"tls.left-green.time")) {
428 if (oc.
isDefault(
"rectangular-lane-cut")) {
430 oc.
setDefault(
"rectangular-lane-cut",
"true");
432 if (oc.
isDefault(
"geometry.max-grade.fix")) {
434 oc.
setDefault(
"geometry.max-grade.fix",
"false");
#define WRITE_WARNING(msg)
std::vector< std::string > StringVector
Definition of a vector of strings.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
static void fillOptions(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.
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
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.
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 OptionsCont & getOptions()
Retrieves the options.
static void addReportOptions(OptionsCont &oc)
Adds reporting options to the given container.