63 #ifdef CHECK_MEMORY_LEAKS
65 #endif // CHECK_MEMORY_LEAKS
74 oc.
addCallExample(
"-c <CONFIGURATION>",
"run with configuration options set in file");
92 oc.
addDescription(
"net-file",
"Input",
"Loads SUMO-network FILE as reference to offset and projection");
96 oc.
addDescription(
"dlr-navteq-poly-files",
"Input",
"Reads polygons from FILE assuming they're coded in DLR-Navteq (Elmar)-format");
98 oc.
addDescription(
"dlr-navteq-poi-files",
"Input",
"Reads pois from FILE+ assuming they're coded in DLR-Navteq (Elmar)-format");
103 oc.
addDescription(
"visum-files",
"Input",
"Reads polygons from FILE assuming it's a Visum-net");
108 oc.
addDescription(
"xml-files",
"Input",
"Reads pois and shapes from FILE assuming they're coded in XML");
113 oc.
addDescription(
"osm-files",
"Input",
"Reads pois from FILE+ assuming they're coded in OSM");
115 oc.
addDescription(
"osm.keep-full-type",
"Input",
"The type will be made of the key-value - pair.");
117 oc.
addDescription(
"osm.use-name",
"Input",
"The id will be set from the given 'name' attribute.");
121 oc.
addSynonyme(
"shapefile-prefixes",
"shapefile-prefix");
123 oc.
addSynonyme(
"shapefile-prefixes",
"shape-files",
true);
124 oc.
addDescription(
"shapefile-prefixes",
"Input",
"Reads shapes from shapefiles FILE+");
127 oc.
addSynonyme(
"shapefile.guess-projection",
"arcview.guess-projection",
true);
128 oc.
addDescription(
"shapefile.guess-projection",
"Input",
"Guesses the shapefile's projection");
131 oc.
addSynonyme(
"shapefile.id-column",
"shapefile.id-name",
true);
132 oc.
addSynonyme(
"shapefile.id-column",
"shape-files.id-name",
true);
133 oc.
addDescription(
"shapefile.id-column",
"Input",
"Defines in which column the id can be found");
136 oc.
addDescription(
"shapefile.use-running-id",
"Input",
"A running number will be used as id.");
147 oc.
addDescription(
"output-file",
"Output",
"Write generated polygons/pois to FILE");
152 oc.
addSynonyme(
"prune.in-net",
"prune.on-net",
true);
153 oc.
addDescription(
"prune.in-net",
"Pruning",
"Enables pruning on net boundaries");
156 oc.
addSynonyme(
"prune.in-net.offsets",
"prune.on-net.offsets",
true);
157 oc.
addDescription(
"prune.in-net.offsets",
"Pruning",
"Uses STR as offset definition added to the net boundaries");
160 oc.
addDescription(
"prune.boundary",
"Pruning",
"Uses STR as pruning boundary");
164 oc.
addSynonyme(
"prune.keep-list",
"prune.ignore",
true);
165 oc.
addDescription(
"prune.keep-list",
"Pruning",
"Items in STR will be kept though out of boundary");
169 oc.
addDescription(
"prune.explicit",
"Pruning",
"Items with names in STR will be removed");
173 oc.
addSynonyme(
"offset.x",
"x-offset-to-apply",
true);
174 oc.
addDescription(
"offset.x",
"Processing",
"Adds FLOAT to net x-positions");
177 oc.
addSynonyme(
"offset.y",
"y-offset-to-apply",
true);
178 oc.
addDescription(
"offset.y",
"Processing",
"Adds FLOAT to net y-positions");
181 oc.
addDescription(
"all-attributes",
"Processing",
"Imports all attributes as key/value pairs");
184 oc.
addDescription(
"ignore-errors",
"Processing",
"Continue on broken input");
189 oc.
addDescription(
"color",
"Building Defaults",
"Sets STR as default color");
192 oc.
addDescription(
"prefix",
"Building Defaults",
"Sets STR as default prefix");
195 oc.
addDescription(
"type",
"Building Defaults",
"Sets STR as default type");
198 oc.
addDescription(
"layer",
"Building Defaults",
"Sets INT as default layer");
201 oc.
addDescription(
"discard",
"Building Defaults",
"Sets default action to discard");
224 if ((oc.
isSet(
"dlr-navteq-poly-files") || oc.
isSet(
"dlr-navteq-poi-files")) && oc.
isDefault(
"proj.scale")) {
227 if (!oc.
isSet(
"net")) {
230 unsigned numProjections = oc.
getBool(
"simple-projection") + oc.
getBool(
"proj.utm") + oc.
getBool(
"proj.dhdn") + (oc.
getString(
"proj").length() > 1);
231 if ((oc.
isSet(
"osm-files") || oc.
isSet(
"dlr-navteq-poly-files") || oc.
isSet(
"dlr-navteq-poi-files")) && numProjections == 0) {
232 oc.
set(
"proj.utm",
"true");
247 if (oc.
getBool(
"prune.in-net")) {
248 if (!oc.
isSet(
"net")) {
249 throw ProcessError(
"In order to prune the input on the net, you have to supply a network.");
255 pruningBoundary.xmin() + offsets.
xmin(),
256 pruningBoundary.ymin() + offsets.
ymin(),
257 pruningBoundary.xmax() + offsets.
xmax(),
258 pruningBoundary.ymax() + offsets.
ymax());
261 if (oc.
isSet(
"prune.boundary")) {
272 if (oc.
isSet(
"type-file")) {
292 toFill.save(oc.
getString(
"output-file"));
297 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
303 }
catch (
const std::exception& e) {
304 if (std::string(e.what()) != std::string(
"")) {
317 std::cout <<
"Success." << std::endl;