52 #ifdef CHECK_MEMORY_LEAKS
54 #endif // CHECK_MEMORY_LEAKS
65 oc.
addSynonyme(
"default.lanenumber",
"lanenumber",
true);
66 oc.
addDescription(
"default.lanenumber",
"Building Defaults",
"The default number of lanes in an edge");
70 oc.
addDescription(
"default.speed",
"Building Defaults",
"The default speed on an edge (in m/s)");
73 oc.
addSynonyme(
"default.priority",
"priority",
true);
74 oc.
addDescription(
"default.priority",
"Building Defaults",
"The default priority of an edge");
77 oc.
addDescription(
"default.sidewalk-width",
"Building Defaults",
"The default width of added sidewalks");
81 oc.
addDescription(
"no-internal-links",
"Processing",
"Omits internal links");
85 oc.
addDescription(
"dismiss-vclasses",
"Processing",
"Removes vehicle class restrictions from imported edges");
89 oc.
addDescription(
"no-turnarounds",
"Processing",
"Disables building turnarounds");
92 oc.
addSynonyme(
"no-turnarounds.tls",
"no-tls-turnarounds",
true);
93 oc.
addDescription(
"no-turnarounds.tls",
"Processing",
"Disables building turnarounds at tls-controlled junctions");
96 oc.
addDescription(
"no-left-connections",
"Processing",
"Disables building connections to left");
100 oc.
addSynonyme(
"geometry.split",
"split-geometry",
true);
101 oc.
addDescription(
"geometry.split",
"Processing",
"Splits edges across geometry nodes");
104 oc.
addSynonyme(
"geometry.remove",
"remove-geometry",
true);
105 oc.
addDescription(
"geometry.remove",
"Processing",
"Replace nodes which only define edge geometry by geometry points (joins edges)");
108 oc.
addDescription(
"geometry.max-segment-length",
"Processing",
"splits geometry to restrict segment length");
111 oc.
addDescription(
"geometry.min-dist",
"Processing",
"reduces too similar geometry points");
114 oc.
addDescription(
"geometry.max-angle",
"Processing",
"Warn about edge geometries with an angle above DEGREES in successive segments");
117 oc.
addDescription(
"geometry.min-radius",
"Processing",
"Warn about edge geometries with a turning radius less than METERS at the start or end");
120 oc.
addDescription(
"geometry.min-radius.fix",
"Processing",
"Straighten edge geometries to avoid turning radii less than geometry.min-radius");
123 oc.
addDescription(
"geometry.junction-mismatch-threshold",
"Processing",
"Warn if the junction shape is to far away from the original node position");
127 oc.
addSynonyme(
"offset.disable-normalization",
"disable-normalize-node-positions",
true);
128 oc.
addDescription(
"offset.disable-normalization",
"Processing",
"Turn off normalizing node positions");
131 oc.
addSynonyme(
"offset.x",
"x-offset-to-apply",
true);
132 oc.
addDescription(
"offset.x",
"Processing",
"Adds FLOAT to net x-positions");
135 oc.
addSynonyme(
"offset.y",
"y-offset-to-apply",
true);
136 oc.
addDescription(
"offset.y",
"Processing",
"Adds FLOAT to net y-positions");
140 oc.
addDescription(
"flip-y-axis",
"Processing",
"Flips the y-coordinate along zero");
143 oc.
addSynonyme(
"roundabouts.guess",
"guess-roundabouts",
true);
144 oc.
addDescription(
"roundabouts.guess",
"Processing",
"Enable roundabout-guessing");
147 oc.
addDescription(
"lefthand",
"Processing",
"Assumes left-hand traffic on the network");
151 "Joins junctions that are close to each other (recommended for OSM import)");
155 "Determines the maximal distance for joining junctions (defaults to 10)");
159 oc.
addDescription(
"junctions.join-exclude",
"Processing",
"Interprets STR as list of junctions to exclude from joining");
162 oc.
addDescription(
"speed.offset",
"Processing",
"Modifies all edge speeds by adding FLOAT");
165 oc.
addDescription(
"speed.factor",
"Processing",
"Modifies all edge speeds by multiplying FLOAT");
171 "Allow driving onto a multi-lane road if there are foes on other lanes (at roundabouts)");
175 "Allow driving onto a multi-lane road if there are foes on other lanes (everywhere)");
179 "Guess pedestrian sidewalks based on edge speed");
183 "Add sidewalks for edges with a speed equal or below the given limit");
187 "Add sidewalks for edges with a speed above the given limit");
191 "Guess pedestrian crossings based on the presence of sidewalks");
197 oc.
addDescription(
"tls.set",
"TLS Building",
"Interprets STR as list of junctions to be controlled by TLS");
200 oc.
addSynonyme(
"tls.unset",
"explicite-no-tls",
true);
201 oc.
addDescription(
"tls.unset",
"TLS Building",
"Interprets STR as list of junctions to be not controlled by TLS");
206 oc.
addDescription(
"tls.guess",
"TLS Building",
"Turns on TLS guessing");
210 oc.
addSynonyme(
"tls.taz-nodes",
"tls-guess.district-nodes",
true);
211 oc.
addDescription(
"tls.taz-nodes",
"TLS Building",
"Sets district nodes as tls-controlled");
215 oc.
addDescription(
"tls-guess.joining",
"TLS Building",
"Includes node clusters into guess");
219 oc.
addDescription(
"tls.join",
"TLS Building",
"Tries to cluster tls-controlled nodes");
223 "Determines the maximal distance for joining traffic lights (defaults to 20)");
227 oc.
addDescription(
"tls.guess-signals",
"Processing",
"Interprets tls nodes surrounding an intersection as signal positions for a larger TLS. This is typical pattern for OSM-derived networks");
230 oc.
addDescription(
"tls.guess-signals.dist",
"Processing",
"Distance for interpreting nodes as signal locations");
236 oc.
addSynonyme(
"tls.green.time",
"traffic-light-green",
true);
237 oc.
addDescription(
"tls.green.time",
"TLS Building",
"Use INT as green phase duration");
240 oc.
addSynonyme(
"tls.yellow.min-decel",
"min-decel",
true);
241 oc.
addDescription(
"tls.yellow.min-decel",
"TLS Building",
"Defines smallest vehicle deceleration");
244 oc.
addSynonyme(
"tls.yellow.patch-small",
"patch-small-tyellow",
true);
245 oc.
addDescription(
"tls.yellow.patch-small",
"TLS Building",
"Given yellow times are patched even if being too short");
248 oc.
addSynonyme(
"tls.yellow.time",
"traffic-light-yellow",
true);
249 oc.
addDescription(
"tls.yellow.time",
"TLS Building",
"Set INT as fixed time for yellow phase durations");
253 oc.
addSynonyme(
"tls.half-offset",
"tl-logics.half-offset",
true);
254 oc.
addDescription(
"tls.half-offset",
"TLS Building",
"TLSs in STR will be shifted by half-phase");
257 oc.
addSynonyme(
"tls.quarter-offset",
"tl-logics.quarter-offset",
true);
258 oc.
addDescription(
"tls.quarter-offset",
"TLS Building",
"TLSs in STR will be shifted by quarter-phase");
262 oc.
addDescription(
"tls.default-type",
"TLS Building",
"TLSs with unspecified type will use STR as their algorithm");
267 oc.
addSynonyme(
"keep-edges.min-speed",
"edges-min-speed",
true);
268 oc.
addDescription(
"keep-edges.min-speed",
"Edge Removal",
"Only keep edges with speed in meters/second > FLOAT");
271 oc.
addSynonyme(
"remove-edges.explicit",
"remove-edges");
272 oc.
addDescription(
"remove-edges.explicit",
"Edge Removal",
"Remove edges in STR");
275 oc.
addSynonyme(
"keep-edges.explicit",
"keep-edges");
276 oc.
addDescription(
"keep-edges.explicit",
"Edge Removal",
"Only keep edges in STR");
279 oc.
addDescription(
"keep-edges.input-file",
"Edge Removal",
"Only keep edges in FILE");
283 oc.
addDescription(
"keep-edges.postload",
"Edge Removal",
"Remove edges after joining");
287 oc.
addDescription(
"keep-edges.in-boundary",
"Edge Removal",
"Only keep edges which are located within the given boundary (given either as CARTESIAN corner coordinates <xmin,ymin,xmax,ymax> or as polygon <x0,y0,x1,y1,...>)");
290 oc.
addDescription(
"keep-edges.in-geo-boundary",
"Edge Removal",
"Only keep edges which are located within the given boundary (given either as GEODETIC corner coordinates <lon-min,lat-min,lon-max,lat-max> or as polygon <lon0,lat0,lon1,lat1,...>)");
294 oc.
addDescription(
"keep-edges.by-vclass",
"Edge Removal",
"Only keep edges which allow one of the vclasss in STR");
297 oc.
addDescription(
"remove-edges.by-vclass",
"Edge Removal",
"Remove edges which allow only vclasses from STR");
300 oc.
addDescription(
"keep-edges.by-type",
"Edge Removal",
"Only keep edges where type is in STR");
303 oc.
addDescription(
"remove-edges.by-type",
"Edge Removal",
"Remove edges where type is in STR");
306 oc.
addSynonyme(
"remove-edges.isolated",
"remove-isolated",
true);
307 oc.
addDescription(
"remove-edges.isolated",
"Edge Removal",
"Removes isolated edges");
313 oc.
addSynonyme(
"keep-nodes-unregulated",
"keep-unregulated");
314 oc.
addDescription(
"keep-nodes-unregulated",
"Unregulated Nodes",
"All nodes will be unregulated");
317 oc.
addSynonyme(
"keep-nodes-unregulated.explicit",
"keep-unregulated.explicit");
318 oc.
addSynonyme(
"keep-nodes-unregulated.explicit",
"keep-unregulated.nodes",
true);
319 oc.
addDescription(
"keep-nodes-unregulated.explicit",
"Unregulated Nodes",
"Do not regulate nodes in STR");
322 oc.
addSynonyme(
"keep-nodes-unregulated.district-nodes",
"keep-unregulated.district-nodes");
323 oc.
addDescription(
"keep-nodes-unregulated.district-nodes",
"Unregulated Nodes",
"Do not regulate district nodes");
329 oc.
addSynonyme(
"ramps.guess",
"guess-ramps",
true);
330 oc.
addDescription(
"ramps.guess",
"Ramp Guessing",
"Enable ramp-guessing");
333 oc.
addSynonyme(
"ramps.max-ramp-speed",
"ramp-guess.max-ramp-speed",
true);
334 oc.
addDescription(
"ramps.max-ramp-speed",
"Ramp Guessing",
"Treat edges with speed > FLOAT as no ramps");
337 oc.
addSynonyme(
"ramps.min-highway-speed",
"ramp-guess.min-highway-speed",
true);
338 oc.
addDescription(
"ramps.min-highway-speed",
"Ramp Guessing",
"Treat edges with speed < FLOAT as no highways");
341 oc.
addSynonyme(
"ramps.ramp-length",
"ramp-guess.ramp-length",
true);
342 oc.
addDescription(
"ramps.ramp-length",
"Ramp Guessing",
"Use FLOAT as ramp-length");
345 oc.
addSynonyme(
"ramps.set",
"ramp-guess.explicite",
true);
346 oc.
addDescription(
"ramps.set",
"Ramp Guessing",
"Tries to handle the given edges as ramps");
349 oc.
addSynonyme(
"ramps.no-split",
"ramp-guess.no-split",
true);
350 oc.
addDescription(
"ramps.no-split",
"Ramp Guessing",
"Avoids edge splitting");
360 if (!oc.
isDefault(
"tls-guess.joining")) {
361 WRITE_WARNING(
"'--tls-guess.joining' was joined with '--tls.join'.\n Please use '--tls.join' in future only.");
362 if (!oc.
isSet(
"tls.join")) {
363 oc.
set(
"tls.join",
"true");
367 WRITE_ERROR(
"unsupported value '" + oc.
getString(
"tls.default-type") +
"' for option '--tls.default-type'");
370 if (oc.
isSet(
"keep-edges.in-boundary") && oc.
isSet(
"keep-edges.in-geo-boundary")) {
371 WRITE_ERROR(
"only one of the options 'keep-edges.in-boundary' or 'keep-edges.in-geo-boundary' may be given");
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
#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)
static StringBijection< TrafficLightType > TrafficLightTypes
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
A storage for options typed value containers)
static void fillOptions(bool forNetgen)
Inserts options used by the network converter.
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.