GlobeEngine
ReferenceSystem.h
Go to the documentation of this file.
1 
9 #ifndef GlobeEngine_ReferenceSystem_h
10 #define GlobeEngine_ReferenceSystem_h
11 
12 #include <vector>
13 #include "OpenGL_Includes.h"
14 #include "PolyLine.h"
15 #include "LineFeatureObject.h"
16 //#include "SceneBluePrint.h"
17 
18 namespace geGIS {
24 
29 
35 
40  std::string profile;
41 
47  double refSystemBounds[4];
48 
53  double rescaleTo[3];
54 
55  /*
56  * Full extent
57  * Long / Lat
58  */
59  vmml::Vector2d fullExtent;
60  };
61 
63  {
64 
65  public:
68 
69  void clear();
70 
71  void createWithFile(ReferenceSystemInfo _info, std::string _url);
72  void loadData(std::string filename, double _rescaleTo);
73  void setScaleToLocaleLongCoordinates(double _input);
74  double getScaleToLocaleLongCoordinates() const;
75  void setScaleToLocaleLatCoordinates(double _input);
76  double getScaleToLocaleLatCoordinates() const;
77  const double* getRefSystemBounds() const;
78  vmml::Vector4d getSystemBounds() const;
79  std::string getProfileName() const;
80  void setFullExtent();
81  const vmml::Vector2d& getFullExtent() const;
82 
83  short getOptimalTileStructure() const;
84 
85  vmml::Vector2d getLocalFromWGS84(double _long, double _lat) const;
86  vmml::Vector2d getLocalFromWGS84(const vmml::Vector2d& _point) const;
87  double* convertWGS84toLocalCoordinates(const double* _data, int _pointCount);
88  double* convertLocalToWGS84Coordinates(const double* _data, int _pointCount);
89 
90  void setReferenceSystemInfoInShader(std::shared_ptr<ge::Shader> _shader);
91 
92  private:
93  void create(ReferenceSystemInfo _info);
94 
96 
97  short generateOptimalTileTreeCountFromProfile(std::string _in) const;
98  void clearInitial();
99 
100  ReferenceSystemInfo info;
101 
102 
103  };
104 }
105 #endif
void setReferenceSystemInfoInShader(std::shared_ptr< ge::Shader > _shader)
Definition: ReferenceSystem.cpp:153
void clear()
Definition: ReferenceSystem.cpp:16
std::string getProfileName() const
Definition: ReferenceSystem.cpp:193
short optimalTileTreeCount
Definition: ReferenceSystem.h:34
vmml::Vector4d getSystemBounds() const
Definition: ReferenceSystem.cpp:203
Definition: ClusterGrid.h:17
short getOptimalTileStructure() const
Definition: ReferenceSystem.cpp:219
double scaleToLocalLongCoordinates
Definition: ReferenceSystem.h:23
double * convertLocalToWGS84Coordinates(const double *_data, int _pointCount)
Definition: ReferenceSystem.cpp:133
std::string profile
Definition: ReferenceSystem.h:40
virtual void create()=0
ReferenceSystem()
Definition: ReferenceSystem.cpp:6
double * convertWGS84toLocalCoordinates(const double *_data, int _pointCount)
Definition: ReferenceSystem.cpp:117
double getScaleToLocaleLongCoordinates() const
Definition: ReferenceSystem.cpp:178
double getScaleToLocaleLatCoordinates() const
Definition: ReferenceSystem.cpp:188
double scaleToLocalLatCoordinates
Definition: ReferenceSystem.h:28
void setFullExtent()
Definition: ReferenceSystem.cpp:163
Definition: ReferenceSystem.h:62
Definition: ReferenceSystem.h:19
void loadData(std::string filename, double _rescaleTo)
Definition: ReferenceSystem.cpp:51
void setScaleToLocaleLatCoordinates(double _input)
Definition: ReferenceSystem.cpp:183
~ReferenceSystem()
Definition: ReferenceSystem.cpp:11
vmml::Vector2d getLocalFromWGS84(double _long, double _lat) const
Definition: ReferenceSystem.cpp:109
Definition: LineFeatureObject.h:21
double rescaleTo[3]
Definition: ReferenceSystem.h:53
void createWithFile(ReferenceSystemInfo _info, std::string _url)
Definition: ReferenceSystem.cpp:44
void setScaleToLocaleLongCoordinates(double _input)
Definition: ReferenceSystem.cpp:173
double refSystemBounds[4]
Definition: ReferenceSystem.h:47
const vmml::Vector2d & getFullExtent() const
Definition: ReferenceSystem.cpp:168
vmml::Vector2d fullExtent
Definition: ReferenceSystem.h:59
const double * getRefSystemBounds() const
Definition: ReferenceSystem.cpp:198