64 #ifdef CHECK_MEMORY_LEAKS
66 #endif // CHECK_MEMORY_LEAKS
75 oc.
addCallExample(
"-c <CONFIGURATION>",
"run with configuration options set in file");
93 oc.
addDescription(
"net-file",
"Input",
"Loads SUMO-network FILE as reference to offset and projection");
97 oc.
addDescription(
"dlr-navteq-poly-files",
"Input",
"Reads polygons from FILE assuming they're coded in DLR-Navteq (Elmar)-format");
99 oc.
addDescription(
"dlr-navteq-poi-files",
"Input",
"Reads pois from FILE+ assuming they're coded in DLR-Navteq (Elmar)-format");
104 oc.
addDescription(
"visum-files",
"Input",
"Reads polygons from FILE assuming it's a Visum-net");
109 oc.
addDescription(
"xml-files",
"Input",
"Reads pois and shapes from FILE assuming they're coded in XML");
114 oc.
addDescription(
"osm-files",
"Input",
"Reads pois from FILE+ assuming they're coded in OSM");
116 oc.
addDescription(
"osm.keep-full-type",
"Input",
"The type will be made of the key-value - pair");
118 oc.
addDescription(
"osm.use-name",
"Input",
"The id will be set from the given 'name' attribute");
122 oc.
addSynonyme(
"shapefile-prefixes",
"shapefile-prefix");
124 oc.
addSynonyme(
"shapefile-prefixes",
"shape-files",
true);
125 oc.
addDescription(
"shapefile-prefixes",
"Input",
"Reads shapes from shapefiles FILE+");
128 oc.
addSynonyme(
"shapefile.guess-projection",
"arcview.guess-projection",
true);
129 oc.
addDescription(
"shapefile.guess-projection",
"Input",
"Guesses the shapefile's projection");
132 oc.
addSynonyme(
"shapefile.id-column",
"shapefile.id-name",
true);
133 oc.
addSynonyme(
"shapefile.id-column",
"shape-files.id-name",
true);
134 oc.
addDescription(
"shapefile.id-column",
"Input",
"Defines in which column the id can be found");
137 oc.
addDescription(
"shapefile.use-running-id",
"Input",
"A running number will be used as id");
140 oc.
addDescription(
"shapefile.add-param",
"Input",
"Extract all additonal columns as params");
151 oc.
addDescription(
"output-file",
"Output",
"Write generated polygons/pois to FILE");
156 oc.
addSynonyme(
"prune.in-net",
"prune.on-net",
true);
157 oc.
addDescription(
"prune.in-net",
"Pruning",
"Enables pruning on net boundaries");
160 oc.
addSynonyme(
"prune.in-net.offsets",
"prune.on-net.offsets",
true);
161 oc.
addDescription(
"prune.in-net.offsets",
"Pruning",
"Uses STR as offset definition added to the net boundaries");
164 oc.
addDescription(
"prune.boundary",
"Pruning",
"Uses STR as pruning boundary");
168 oc.
addSynonyme(
"prune.keep-list",
"prune.ignore",
true);
169 oc.
addDescription(
"prune.keep-list",
"Pruning",
"Items in STR will be kept though out of boundary");
173 oc.
addDescription(
"prune.explicit",
"Pruning",
"Items with names in STR will be removed");
177 oc.
addSynonyme(
"offset.x",
"x-offset-to-apply",
true);
178 oc.
addDescription(
"offset.x",
"Processing",
"Adds FLOAT to net x-positions");
181 oc.
addSynonyme(
"offset.y",
"y-offset-to-apply",
true);
182 oc.
addDescription(
"offset.y",
"Processing",
"Adds FLOAT to net y-positions");
185 oc.
addDescription(
"all-attributes",
"Processing",
"Imports all attributes as key/value pairs");
188 oc.
addDescription(
"ignore-errors",
"Processing",
"Continue on broken input");
193 oc.
addDescription(
"color",
"Building Defaults",
"Sets STR as default color");
196 oc.
addDescription(
"prefix",
"Building Defaults",
"Sets STR as default prefix");
199 oc.
addDescription(
"type",
"Building Defaults",
"Sets STR as default type");
202 oc.
addDescription(
"layer",
"Building Defaults",
"Sets INT as default layer");
205 oc.
addDescription(
"discard",
"Building Defaults",
"Sets default action to discard");
228 if ((oc.
isSet(
"dlr-navteq-poly-files") || oc.
isSet(
"dlr-navteq-poi-files")) && oc.
isDefault(
"proj.scale")) {
231 if (!oc.
isSet(
"net")) {
234 unsigned numProjections = oc.
getBool(
"simple-projection") + oc.
getBool(
"proj.utm") + oc.
getBool(
"proj.dhdn") + (oc.
getString(
"proj").length() > 1);
235 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-poly-files") || oc.
isSet(
"dlr-navteq-poi-files")) && numProjections == 0) {
236 oc.
set(
"proj.utm",
"true");
251 if (oc.
getBool(
"prune.in-net")) {
252 if (!oc.
isSet(
"net")) {
253 throw ProcessError(
"In order to prune the input on the net, you have to supply a network.");
259 pruningBoundary.xmin() + offsets.
xmin(),
260 pruningBoundary.ymin() + offsets.
ymin(),
261 pruningBoundary.xmax() + offsets.
xmax(),
262 pruningBoundary.ymax() + offsets.
ymax());
265 if (oc.
isSet(
"prune.boundary")) {
276 if (oc.
isSet(
"type-file")) {
296 toFill.save(oc.
getString(
"output-file"));
301 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
307 }
catch (
const std::exception& e) {
308 if (std::string(e.what()) != std::string(
"")) {
321 std::cout <<
"Success." << std::endl;