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");
144 oc.
addDescription(
"output-file",
"Output",
"Write generated polygons/pois to FILE");
149 oc.
addSynonyme(
"prune.in-net",
"prune.on-net",
true);
150 oc.
addDescription(
"prune.in-net",
"Pruning",
"Enables pruning on net boundaries");
153 oc.
addSynonyme(
"prune.in-net.offsets",
"prune.on-net.offsets",
true);
154 oc.
addDescription(
"prune.in-net.offsets",
"Pruning",
"Uses STR as offset definition added to the net boundaries");
157 oc.
addDescription(
"prune.boundary",
"Pruning",
"Uses STR as pruning boundary");
161 oc.
addSynonyme(
"prune.keep-list",
"prune.ignore",
true);
162 oc.
addDescription(
"prune.keep-list",
"Pruning",
"Items in STR will be kept though out of boundary");
166 oc.
addDescription(
"prune.explicit",
"Pruning",
"Items with names in STR will be removed");
170 oc.
addSynonyme(
"offset.x",
"x-offset-to-apply",
true);
171 oc.
addDescription(
"offset.x",
"Processing",
"Adds FLOAT to net x-positions");
174 oc.
addSynonyme(
"offset.y",
"y-offset-to-apply",
true);
175 oc.
addDescription(
"offset.y",
"Processing",
"Adds FLOAT to net y-positions");
180 oc.
addDescription(
"color",
"Building Defaults",
"Sets STR as default color");
183 oc.
addDescription(
"prefix",
"Building Defaults",
"Sets STR as default prefix");
186 oc.
addDescription(
"type",
"Building Defaults",
"Sets STR as default type");
189 oc.
addDescription(
"layer",
"Building Defaults",
"Sets INT as default layer");
192 oc.
addDescription(
"discard",
"Building Defaults",
"Sets default action to discard");
214 Boundary origNetBoundary, pruningBoundary;
220 oc.
set(
"proj", proj);
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");
234 if ((oc.
isSet(
"dlr-navteq-poly-files") || oc.
isSet(
"dlr-navteq-poi-files")) && oc.
isDefault(
"proj.scale")) {
235 oc.
set(
"proj.scale", std::string(
"5"));
244 if (oc.
getBool(
"prune.in-net")) {
245 if (!oc.
isSet(
"net")) {
246 throw ProcessError(
"In order to prune the input on the net, you have to supply a network.");
252 pruningBoundary.xmin() + offsets.
xmin(),
253 pruningBoundary.ymin() + offsets.
ymin(),
254 pruningBoundary.xmax() + offsets.
xmax(),
255 pruningBoundary.ymax() + offsets.
ymax());
258 if (oc.
isSet(
"prune.boundary")) {
269 if (oc.
isSet(
"type-file")) {
286 toFill.save(oc.
getString(
"output-file"));
291 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
306 std::cout <<
"Success." << std::endl;