Eclipse SUMO - Simulation of Urban MObility
polyconvert_main.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2005-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
18 // Main for POLYCONVERT
19 /****************************************************************************/
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #ifdef HAVE_VERSION_H
28 #include <version.h>
29 #endif
30 
31 #include <iostream>
32 #include <string>
40 #include <utils/common/ToString.h>
45 #include <utils/geom/Boundary.h>
47 #include <utils/xml/XMLSubSys.h>
53 #include <polyconvert/PCTypeMap.h>
56 #include <polyconvert/pc_typemap.h>
57 
58 
59 // ===========================================================================
60 // method definitions
61 // ===========================================================================
62 void
65  oc.addCallExample("-c <CONFIGURATION>", "run with configuration options set in file");
66 
67  // insert options sub-topics
68  SystemFrame::addConfigurationOptions(oc); // fill this subtopic, too
69  oc.addOptionSubTopic("Input");
70  oc.addOptionSubTopic("Output");
72  oc.addOptionSubTopic("Pruning");
73  oc.addOptionSubTopic("Processing");
74  oc.addOptionSubTopic("Building Defaults");
75  SystemFrame::addReportOptions(oc); // fill this subtopic, too
76 
77 
78  // register options
79  // add i/o options
80  // original network
81  oc.doRegister("net-file", 'n', new Option_FileName());
82  oc.addSynonyme("net-file", "net");
83  oc.addDescription("net-file", "Input", "Loads SUMO-network FILE as reference to offset and projection");
84 
85  // dlrnavteq import
86  oc.doRegister("dlr-navteq-poly-files", new Option_FileName());
87  oc.addDescription("dlr-navteq-poly-files", "Input", "Reads polygons from FILE assuming they're coded in DLR-Navteq (Elmar)-format");
88  oc.doRegister("dlr-navteq-poi-files", new Option_FileName());
89  oc.addDescription("dlr-navteq-poi-files", "Input", "Reads pois from FILE+ assuming they're coded in DLR-Navteq (Elmar)-format");
90 
91  // visum import
92  oc.doRegister("visum-files", new Option_FileName());
93  oc.addSynonyme("visum-files", "visum");
94  oc.addDescription("visum-files", "Input", "Reads polygons from FILE assuming it's a Visum-net");
95 
96  // xml import
97  oc.doRegister("xml-files", new Option_FileName());
98  oc.addSynonyme("xml-files", "xml");
99  oc.addDescription("xml-files", "Input", "Reads pois and shapes from FILE assuming they're coded in XML");
100 
101  // osm import
102  oc.doRegister("osm-files", new Option_FileName());
103  oc.addSynonyme("osm-files", "osm");
104  oc.addDescription("osm-files", "Input", "Reads pois from FILE+ assuming they're coded in OSM");
105  oc.doRegister("osm.keep-full-type", new Option_Bool(false));
106  oc.addDescription("osm.keep-full-type", "Input", "The type will be made of the key-value - pair");
107  oc.doRegister("osm.use-name", new Option_Bool(false));
108  oc.addDescription("osm.use-name", "Input", "The id will be set from the given 'name' attribute");
109  oc.doRegister("osm.merge-relations", new Option_Float(-1));
110  oc.addDescription("osm.merge-relations", "Input", "If FLOAT >= 0, assemble one polygon from all ways of a relation if they all connect with gaps below FLOAT");
111 
112  // arcview import
113  oc.doRegister("shapefile-prefixes", new Option_FileName());
114  oc.addSynonyme("shapefile-prefixes", "shapefile-prefix");
115  oc.addSynonyme("shapefile-prefixes", "shapefile");
116  oc.addSynonyme("shapefile-prefixes", "shape-files", true);
117  oc.addDescription("shapefile-prefixes", "Input", "Reads shapes from shapefiles FILE+");
118 
119  oc.doRegister("shapefile.guess-projection", new Option_Bool(false));
120  oc.addSynonyme("shapefile.guess-projection", "arcview.guess-projection", true);
121  oc.addDescription("shapefile.guess-projection", "Input", "Guesses the shapefile's projection");
122 
123  oc.doRegister("shapefile.id-column", new Option_String());
124  oc.addSynonyme("shapefile.id-column", "shapefile.id-name", true);
125  oc.addSynonyme("shapefile.id-column", "shape-files.id-name", true);
126  oc.addDescription("shapefile.id-column", "Input", "Defines in which column the id can be found");
127 
128  oc.doRegister("shapefile.type-columns", new Option_StringVector());
129  oc.addSynonyme("shapefile.type-columns", "shapefile.type-column");
130  oc.addDescription("shapefile.type-columns", "Input", "Defines which columns form the type id (comma separated list)");
131 
132  oc.doRegister("shapefile.use-running-id", new Option_Bool(false));
133  oc.addDescription("shapefile.use-running-id", "Input", "A running number will be used as id");
134 
135  oc.doRegister("shapefile.add-param", new Option_Bool(false));
136  oc.addDescription("shapefile.add-param", "Input", "Extract all additional columns as params");
137 
138  oc.doRegister("shapefile.fill", new Option_String());
139  oc.addDescription("shapefile.fill", "Input", "[auto|true|false]. Forces the 'fill' status to the given value. Default 'auto' tries to determine it from the data type");
140 
141  // typemap reading
142  oc.doRegister("type-file", new Option_FileName());
143  oc.addSynonyme("type-file", "typemap", true);
144  oc.addDescription("type-file", "Input", "Reads types from FILE");
145 
146 
147  // output
148  oc.doRegister("output-file", 'o', new Option_FileName());
149  oc.addSynonyme("output-file", "output");
150  oc.addDescription("output-file", "Output", "Write generated polygons/pois to FILE");
151 
152  oc.doRegister("dlr-tdp-output", new Option_FileName());
153  oc.addDescription("dlr-tdp-output", "Output", "Write generated polygons/pois to a dlr-tdp file with the given prefix");
154 
155 
156  // prunning options
157  oc.doRegister("prune.in-net", new Option_Bool(false));
158  oc.addSynonyme("prune.in-net", "prune.on-net", true);
159  oc.addDescription("prune.in-net", "Pruning", "Enables pruning on net boundaries");
160 
161  oc.doRegister("prune.in-net.offsets", new Option_String("0,0,0,0"));
162  oc.addSynonyme("prune.in-net.offsets", "prune.on-net.offsets", true);
163  oc.addDescription("prune.in-net.offsets", "Pruning", "Uses STR as offset definition added to the net boundaries");
164 
165  oc.doRegister("prune.boundary", new Option_String());
166  oc.addDescription("prune.boundary", "Pruning", "Uses STR as pruning boundary");
167 
168  oc.doRegister("prune.keep-list", new Option_String());
169  oc.addSynonyme("prune.keep-list", "prune.keep");
170  oc.addSynonyme("prune.keep-list", "prune.ignore", true);
171  oc.addDescription("prune.keep-list", "Pruning", "Items in STR will be kept though out of boundary");
172 
173  oc.doRegister("prune.explicit", new Option_StringVector(StringVector({ "" })));
174  oc.addSynonyme("prune.explicit", "remove");
175  oc.addDescription("prune.explicit", "Pruning", "Items with names in STR[] will be removed");
176 
177 
178  oc.doRegister("offset.x", new Option_Float(0));
179  oc.addSynonyme("offset.x", "x-offset-to-apply", true);
180  oc.addDescription("offset.x", "Processing", "Adds FLOAT to net x-positions");
181 
182  oc.doRegister("offset.y", new Option_Float(0));
183  oc.addSynonyme("offset.y", "y-offset-to-apply", true);
184  oc.addDescription("offset.y", "Processing", "Adds FLOAT to net y-positions");
185 
186  oc.doRegister("offset.z", new Option_Float(0));
187  oc.addDescription("offset.z", "Processing", "Adds FLOAT to net z-positions");
188 
189  oc.doRegister("all-attributes", new Option_Bool(false));
190  oc.addDescription("all-attributes", "Processing", "Imports all attributes as key/value pairs");
191 
192  oc.doRegister("ignore-errors", new Option_Bool(false));
193  oc.addDescription("ignore-errors", "Processing", "Continue on broken input");
194 
195  oc.doRegister("poi-layer-offset", new Option_Float(0));
196  oc.addDescription("poi-layer-offset", "Processing", "Adds FLOAT to the layer value for each poi (i.e. to raise it above polygons)");
197 
198  // building defaults options
199  oc.doRegister("color", new Option_String("0.2,0.5,1."));
200  oc.addDescription("color", "Building Defaults", "Sets STR as default color");
201 
202  oc.doRegister("prefix", new Option_String(""));
203  oc.addDescription("prefix", "Building Defaults", "Sets STR as default prefix");
204 
205  oc.doRegister("type", new Option_String("unknown"));
206  oc.addDescription("type", "Building Defaults", "Sets STR as default type");
207 
208  oc.doRegister("fill", new Option_Bool("false"));
209  oc.addDescription("fill", "Building Defaults", "Fills polygons by default");
210 
211  oc.doRegister("layer", new Option_Float(-1));
212  oc.addDescription("layer", "Building Defaults", "Sets FLOAT as default layer");
213 
214  oc.doRegister("discard", new Option_Bool(false));
215  oc.addDescription("discard", "Building Defaults", "Sets default action to discard");
216 
217  // projection
218  oc.doRegister("proj.plain-geo", new Option_Bool(false));
219  oc.addDescription("proj.plain-geo", "Projection", "Write geo coordinates in output");
220 }
221 
222 
223 int
224 main(int argc, char** argv) {
226  oc.setApplicationDescription("Importer of polygons and POIs for the microscopic, multi-modal traffic simulation SUMO.");
227  oc.setApplicationName("polyconvert", "Eclipse SUMO polyconvert Version " VERSION_STRING);
228  int ret = 0;
229  try {
230  // initialise subsystems
231  XMLSubSys::init();
232  fillOptions();
233  OptionsIO::setArgs(argc, argv);
235  if (oc.processMetaOptions(argc < 2)) {
237  return 0;
238  }
239  XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net"));
241  // build the projection
242  double scale = 1.0;
243  if ((oc.isSet("dlr-navteq-poly-files") || oc.isSet("dlr-navteq-poi-files")) && oc.isDefault("proj.scale")) {
244  scale = 1e-5;
245  }
246  if (!oc.isSet("net")) {
247  // from the given options
248 #ifdef PROJ_API_FILE
249  unsigned numProjections = oc.getBool("simple-projection") + oc.getBool("proj.utm") + oc.getBool("proj.dhdn") + (oc.getString("proj").length() > 1);
250  if ((oc.isSet("osm-files") || oc.isSet("dlr-navteq-poly-files") || oc.isSet("dlr-navteq-poi-files")) && numProjections == 0) {
251  oc.set("proj.utm", "true");
252  }
253  if (oc.isDefault("proj.scale")) {
254  oc.set("proj.scale", toString(scale, 5));
255  }
256 #endif
257  if (!GeoConvHelper::init(oc)) {
258  throw ProcessError("Could not build projection!");
259  }
260  } else {
261  // from the supplied network
262  // @todo warn about given options being ignored
263  PCNetProjectionLoader::load(oc.getString("net"), scale);
264  }
265  Boundary pruningBoundary = GeoConvHelper::getFinal().getConvBoundary();
266  // check whether the input shall be pruned
267  bool prune = false;
268  if (oc.getBool("prune.in-net")) {
269  if (!oc.isSet("net")) {
270  throw ProcessError("In order to prune the input on the net, you have to supply a network.");
271  }
272  bool ok = true;
273  // !!! no proper error handling
274  Boundary offsets = GeomConvHelper::parseBoundaryReporting(oc.getString("prune.in-net.offsets"), "--prune.on-net.offsets", nullptr, ok);
275  pruningBoundary = Boundary(
276  pruningBoundary.xmin() + offsets.xmin(),
277  pruningBoundary.ymin() + offsets.ymin(),
278  pruningBoundary.xmax() + offsets.xmax(),
279  pruningBoundary.ymax() + offsets.ymax());
280  prune = true;
281  }
282  if (oc.isSet("prune.boundary")) {
283  bool ok = true;
284  // !!! no proper error handling
285  pruningBoundary = GeomConvHelper::parseBoundaryReporting(oc.getString("prune.boundary"), "--prune.boundary", nullptr, ok);
286  prune = true;
287  }
288  if (oc.isSet("osm-files") && oc.isDefault("poi-layer-offset")) {
289  oc.set("poi-layer-offset", "5"); // sufficient when using the default typemap
290  }
291 
292  PCPolyContainer toFill(prune, pruningBoundary, oc.getStringVector("remove"));
293 
294  // read in the type defaults
295  if (!oc.isSet("type-file")) {
296  const char* sumoPath = std::getenv("SUMO_HOME");
297  if (sumoPath == nullptr) {
298  WRITE_WARNING("Environment variable SUMO_HOME is not set, using built in type maps.");
299  } else {
300  const std::string path = sumoPath + std::string("/data/typemap/");
301  if (oc.isSet("dlr-navteq-poly-files")) {
302  oc.setDefault("type-file", path + "navteqPolyconvert.typ.xml");
303  }
304  if (oc.isSet("osm-files")) {
305  oc.setDefault("type-file", path + "osmPolyconvert.typ.xml");
306  }
307  if (oc.isSet("visum-files")) {
308  oc.setDefault("type-file", path + "visumPolyconvert.typ.xml");
309  }
310  }
311  }
312  PCTypeMap tm(oc);
313  PCTypeDefHandler handler(oc, tm);
314  if (oc.isSet("type-file")) {
315  if (!XMLSubSys::runParser(handler, oc.getString("type-file"))) {
316  // something failed
317  throw ProcessError();
318  }
319  } else {
320  handler.setFileName("built in type map");
321  SUMOSAXReader* reader = XMLSubSys::getSAXReader(handler);
322  if (oc.isSet("dlr-navteq-poly-files")) {
323  reader->parseString(navteqTypemap);
324  }
325  if (oc.isSet("osm-files")) {
326  reader->parseString(osmTypemap);
327  }
328  if (oc.isSet("visum-files")) {
329  reader->parseString(visumTypemap);
330  }
331  delete reader;
332  }
334  // read in the data
335  PCLoaderXML::loadIfSet(oc, toFill, tm); // SUMO-XML
336  PCLoaderOSM::loadIfSet(oc, toFill, tm); // OSM-XML
337  PCLoaderDlrNavteq::loadIfSet(oc, toFill, tm); // Elmar-files
338  PCLoaderVisum::loadIfSet(oc, toFill, tm); // VISUM
339  PCLoaderArcView::loadIfSet(oc, toFill, tm); // shape-files
341  // error processing
342  if (MsgHandler::getErrorInstance()->wasInformed() && !oc.getBool("ignore-errors")) {
343  throw ProcessError();
344  }
345  // output
346  if (!oc.isSet("output-file") && !oc.isSet("dlr-tdp-output")) {
347  std::string out = "polygons.xml";
348  if (oc.isSet("configuration-file")) {
349  out = FileHelpers::getConfigurationRelative(oc.getString("configuration-file"), out);
350  }
351  oc.setDefault("output-file", out);
352  }
353  if (oc.isSet("output-file")) {
354  toFill.save(oc.getString("output-file"), oc.getBool("proj.plain-geo"));
355  }
356  if (oc.isSet("dlr-tdp-output")) {
357  toFill.saveDlrTDP(oc.getString("dlr-tdp-output"));
358  }
359 
360  } catch (const ProcessError& e) {
361  if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) {
362  WRITE_ERROR(e.what());
363  }
364  MsgHandler::getErrorInstance()->inform("Quitting (on error).", false);
365  ret = 1;
366 #ifndef _DEBUG
367  } catch (const std::exception& e) {
368  if (std::string(e.what()) != std::string("")) {
369  WRITE_ERROR(e.what());
370  }
371  MsgHandler::getErrorInstance()->inform("Quitting (on error).", false);
372  ret = 1;
373  } catch (...) {
374  MsgHandler::getErrorInstance()->inform("Quitting (on unknown error).", false);
375  ret = 1;
376 #endif
377  }
379  // report about ending
380  if (ret == 0) {
381  std::cout << "Success." << std::endl;
382  }
383  return ret;
384 }
385 
386 
387 
388 /****************************************************************************/
389 
OptionsCont::isSet
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
Definition: OptionsCont.cpp:135
Boundary.h
OptionsCont::processMetaOptions
bool processMetaOptions(bool missingOptions)
Checks for help and configuration output, returns whether we should exit.
Definition: OptionsCont.cpp:557
ToString.h
XMLSubSys::runParser
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
Definition: XMLSubSys.cpp:112
SystemFrame::addConfigurationOptions
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.
Definition: SystemFrame.cpp:39
PCPolyContainer::saveDlrTDP
void saveDlrTDP(const std::string &prefix)
Saves the stored polygons and pois into the given file in dlrTDP format.
Definition: PCPolyContainer.cpp:150
LineReader.h
SystemFrame::close
static void close()
Closes all of an applications subsystems.
Definition: SystemFrame.cpp:133
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
MsgHandler::initOutputOptions
static void initOutputOptions()
init output options
Definition: MsgHandler.cpp:216
GeoConvHelper::getConvBoundary
const Boundary & getConvBoundary() const
Returns the converted boundary.
Definition: GeoConvHelper.cpp:489
visumTypemap
const std::string visumTypemap
Definition: pc_typemap.h:64
Option_Bool
Definition: Option.h:538
Boundary::ymin
double ymin() const
Returns minimum y-coordinate.
Definition: Boundary.cpp:130
GeomConvHelper.h
OptionsCont.h
OptionsCont::set
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
Definition: OptionsCont.cpp:241
PCLoaderOSM.h
MsgHandler.h
SUMOSAXReader
SAX-reader encapsulation containing binary reader.
Definition: SUMOSAXReader.h:55
FileHelpers::getConfigurationRelative
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
Definition: FileHelpers.cpp:115
OptionsCont::getString
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
Definition: OptionsCont.cpp:201
MsgHandler::inform
virtual void inform(std::string msg, bool addType=true)
adds a new error to the list
Definition: MsgHandler.cpp:118
GeoConvHelper.h
Boundary::xmax
double xmax() const
Returns maximum x-coordinate.
Definition: Boundary.cpp:124
OptionsCont::getBool
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
Definition: OptionsCont.cpp:222
PCLoaderVisum.h
PCTypeMap.h
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:57
PCLoaderDlrNavteq::loadIfSet
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored as according DLR-Navteq (Elmar)-files.
Definition: PCLoaderDlrNavteq.cpp:55
GeoConvHelper::init
static bool init(OptionsCont &oc)
Initialises the processing and the final instance using the given options.
Definition: GeoConvHelper.cpp:200
OptionsCont::getStringVector
const StringVector & getStringVector(const std::string &name) const
Returns the list of string-value of the named option (only for Option_StringVector)
Definition: OptionsCont.cpp:235
SystemFrame::addReportOptions
static void addReportOptions(OptionsCont &oc)
Adds reporting options to the given container.
Definition: SystemFrame.cpp:64
osmTypemap
const std::string osmTypemap
Definition: typemap.h:38
main
int main(int argc, char **argv)
Definition: polyconvert_main.cpp:224
PCLoaderArcView.h
OptionsCont::addDescription
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
Definition: OptionsCont.cpp:469
GeomConvHelper::parseBoundaryReporting
static Boundary parseBoundaryReporting(const std::string &def, const std::string &objecttype, const char *objectid, bool &ok, bool report=true)
Builds a boundary from its string representation, reporting occurred errors.
Definition: GeomConvHelper.cpp:80
StringVector
std::vector< std::string > StringVector
Definition of a vector of strings.
Definition: Option.h:45
Boundary::xmin
double xmin() const
Returns minimum x-coordinate.
Definition: Boundary.cpp:118
OptionsCont::setApplicationName
void setApplicationName(const std::string &appName, const std::string &fullName)
Sets the application name.
Definition: OptionsCont.cpp:481
GeoConvHelper::getFinal
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
Definition: GeoConvHelper.h:105
SystemFrame.h
XMLSubSys::setValidation
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme)
Enables or disables validation.
Definition: XMLSubSys.cpp:58
OptionsCont::addSynonyme
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
Definition: OptionsCont.cpp:95
fillOptions
void fillOptions()
Definition: polyconvert_main.cpp:63
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
GeoConvHelper::addProjectionOptions
static void addProjectionOptions(OptionsCont &oc)
Adds projection options to the given container.
Definition: GeoConvHelper.cpp:248
OutputDevice.h
OptionsCont::doRegister
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
Definition: OptionsCont.cpp:74
ProcessError
Definition: UtilExceptions.h:39
Option_String
Definition: Option.h:399
UtilExceptions.h
XMLSubSys::init
static void init()
Initialises the xml-subsystem.
Definition: XMLSubSys.cpp:47
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
PCLoaderVisum::loadIfSet
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored using VISUM-format.
Definition: PCLoaderVisum.cpp:54
navteqTypemap
const std::string navteqTypemap
Definition: pc_typemap.h:1
SUMOSAXReader::parseString
void parseString(std::string content)
Definition: SUMOSAXReader.cpp:117
OptionsCont::isDefault
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
Definition: OptionsCont.cpp:163
PCLoaderArcView::loadIfSet
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored as shape files-files.
Definition: PCLoaderArcView.cpp:53
OptionsCont::addOptionSubTopic
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
Definition: OptionsCont.cpp:519
PCTypeDefHandler.h
OptionsIO::getOptions
static void getOptions(const bool commandLineOnly=false)
Parses the command line arguments and loads the configuration.
Definition: OptionsIO.cpp:75
OptionsCont::setApplicationDescription
void setApplicationDescription(const std::string &appDesc)
Sets the application description.
Definition: OptionsCont.cpp:489
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
PCPolyContainer::save
void save(const std::string &file, bool useGeo)
Saves the stored polygons and pois into the given file.
Definition: PCPolyContainer.cpp:103
StringUtils.h
PCLoaderDlrNavteq.h
pc_typemap.h
Option_StringVector
Definition: Option.h:720
PCLoaderXML.h
PCNetProjectionLoader::load
static void load(const std::string &file, double scale)
Loads network projection if wished.
Definition: PCNetProjectionLoader.cpp:54
Option_Float
Definition: Option.h:470
OptionsCont::addCallExample
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
Definition: OptionsCont.cpp:495
OptionsIO::setArgs
static void setArgs(int argc, char **argv)
Stores the command line arguments for later parsing.
Definition: OptionsIO.cpp:54
PCPolyContainer
A storage for loaded polygons and pois.
Definition: PCPolyContainer.h:50
GeoConvHelper::computeFinal
static void computeFinal(bool lefthand=false)
compute the location attributes which will be used for output based on the loaded location data,...
Definition: GeoConvHelper.cpp:513
PCTypeDefHandler
A handler for loading polygon type maps.
Definition: PCTypeDefHandler.h:46
config.h
Option_FileName
Definition: Option.h:783
StringTokenizer.h
SystemFrame::checkOptions
static bool checkOptions()
checks shared options and sets StdDefs
Definition: SystemFrame.cpp:120
SUMOSAXReader.h
PCNetProjectionLoader.h
PCLoaderOSM::loadIfSet
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored as OSM-XML.
Definition: PCLoaderOSM.cpp:91
PCLoaderXML::loadIfSet
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored as XML.
Definition: PCLoaderXML.cpp:54
MsgHandler::getErrorInstance
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
Definition: MsgHandler.cpp:81
PCTypeMap
A storage for type mappings.
Definition: PCTypeMap.h:44
XMLSubSys::getSAXReader
static SUMOSAXReader * getSAXReader(SUMOSAXHandler &handler)
Builds a reader and assigns the handler to it.
Definition: XMLSubSys.cpp:100
VERSION_STRING
#define VERSION_STRING
Definition: config.h:210
WRITE_ERROR
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:283
OptionsIO.h
GenericSAXHandler::setFileName
void setFileName(const std::string &name)
Sets the current file name.
Definition: GenericSAXHandler.cpp:68
XMLSubSys.h
Boundary::ymax
double ymax() const
Returns maximum y-coordinate.
Definition: Boundary.cpp:136
OptionsCont::setDefault
bool setDefault(const std::string &name, const std::string &value)
Sets the given value for the named option as new default value.
Definition: OptionsCont.cpp:260