SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NIImporter_ArcView.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Importer for networks stored in ArcView-shape format
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef NIImporter_ArcView_h
22 #define NIImporter_ArcView_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class OptionsCont;
41 class OGRFeature;
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
57 public:
69  static void loadNetwork(const OptionsCont& oc, NBNetBuilder& nb);
70 
71 
72 protected:
83  NBNodeCont& nc, NBEdgeCont& ec, NBTypeCont& tc,
84  const std::string& dbf_name, const std::string& shp_name,
85  bool speedInKMH);
86 
89 
90 
93  void load();
94 
95 
96 private:
97 #ifdef HAVE_GDAL
98 
102  SUMOReal getSpeed(OGRFeature& f, const std::string& edgeid);
103 
104 
110  unsigned int getLaneNo(OGRFeature& f,
111  const std::string& edgeid, SUMOReal speed);
112 
117  int getPriority(OGRFeature& f, const std::string& edgeid);
118 
119 
127  void checkSpread(NBEdge* e);
128 
129 
143  bool getStringEntry(OGRFeature* poFeature, const std::string& optionName, const char* defaultName, bool prune, std::string& into);
144 #endif
145 
146 private:
149 
151  std::string mySHPName;
152 
155 
158 
161 
164 
167 
170 
171 
172 private:
175 
178 
179 };
180 
181 
182 #endif
183 
184 /****************************************************************************/
185