VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtCDBFeatureSource.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
15 #include <Cee_CdbDB.h>
16 
17 #define GDAL_VERSION_MAJOR 1
18 
19 #ifdef _MSC_VER
20 #if _MSC_VER < 1800
21 #define round osg::round
22 #endif
23 #endif
24 
25 #include <ogr_api.h>
26 #include <ogr_core.h>
27 #include <ogrsf_frmts.h>
28 
29 namespace makVrv { namespace oe { namespace CDB
30 {
31  using namespace osgEarth;
32 
36  {
37  public:
39  myAHGT(false),
40  myFACC(""),
41  myFSC(""),
42  myHGT(0.0f),
43  myMLOD(-10),
44  myMODL(""),
45  myFullModelName("")
46  {};
48 
49  bool myAHGT;
50  std::string myFACC;
51  std::string myFSC;
52  double myHGT;
53  int myMLOD;
54  std::string myMODL;
55  std::string myFullModelName;
56  };
57 
62  {
63  public:
64 
66  CDBFeatureSource(const CDBFeatureOptions& options);
67 
69  Status initialize(const osgDB::Options* dbOptions);
70 
72  FeatureCursor* createFeatureCursor( const Symbology::Query& query );
73 
74  protected:
75 
77  virtual ~CDBFeatureSource();
78 
79 
80  private:
81 
83  bool features(const std::string& buffer, FeatureList& features, const std::string& rootString,std::string lat_string,std::string lon_string,std::string uref_string,std::string rref_string,std::string lod_string, int CDBLodNum);
84 
86  void pathComponents(const osgEarth::TileKey& key, std::string& rootString,
87  std::string& lat_string, std::string& lon_string,
88  std::string& uref_string, std::string& rref_string, std::string& lod_string, int& CDBLodNum);
89 
91  bool isValidName(std::string &filename);
92 
94  bool readClassDbf(std::string &filename, std::map <std::string, ClassDbfRow>& ClassMap);
95 
97  void addFullModelName(std::map <std::string, ClassDbfRow>& ClassMap, std::string& lat_string, std::string& lon_string,
98  std::string& uref_string, std::string& rref_string, std::string& lod_string);
99 
102 
104  osg::ref_ptr<osgDB::Options> myDbOptions;
105 
107  std::string myCdbRootDir;
108 
111 
114 
117 
120 
123 
126 
129 
132 
134  SpatialReference* mySrs;
135 
137  static const std::string theFieldNameAO1;
138 
140  static const std::string theFieldNameCNAM;
141 
143  static const std::string theFieldNameSCALx;
144 
146  static const std::string theFieldNameSCALy;
147 
149  static const std::string theFieldNameSCALz;
150 
152  static const std::string theFieldNameAHGT;
153 
155  static const std::string theFieldNameFACC;
156 
158  static const std::string theFieldNameFSC;
159 
161  static const std::string theFieldNameHGT;
162 
164  static const std::string theFieldNameMLOD;
165 
167  static const std::string theFieldNameMODL;
168 
169  };
170 
171 } } } // namespace mak::osgEarth::CDB

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)