OpenMining  0.01
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Points3DGrid.h
Go to the documentation of this file.
1 #ifndef Points3DGrid_h
2 #define Points3DGrid_h
3 
4 //std includes
5 #include <string>
6 
7 // boost #includes
8 #include <boost/archive/text_oarchive.hpp>
9 #include <boost/archive/text_iarchive.hpp>
10 #include <boost/serialization/map.hpp>
11 
12 //Qt includes
13 #include <QString>
14 #include <QStringList>
15 
16 //my includes
17 #include "mytypes.h"
18 #include "Points3D.h"
19 #include "Points3DSqlQuery.h"
20 #include "utils/Rectangle.h"
21 
22 class Points3DGrid : public Points3D
23 {
24 public:
25  Points3DGrid(const QStringList& args);
26  void saveIfUpdated();
27  bool getZ(const utils::Rectangle_t& rectangle, z_t& elevation) ;
28  Points3DSqlQuery m_sqlQueryPoints; // big data structure, only restored if m_gridData cannot be restored from local cache file. Gets built once from remote db and then cached on local disk.
29  longitudes_t m_gridData; // interpolated subset of m_sqlQueryPoints. Much smaller. Gets built once and then cached.
30 
31  // When the class Archive corresponds to an output archive, the
32  // & operator is defined similar to <<. Likewise, when the class Archive
33  // is a type of input archive the & operator is defined similar to >>.
34  template<class Archive>
35  void serialize(Archive& ar, const unsigned int version)
36  {
37  ar & m_gridData;
38  Q_UNUSED(version);
39  }
40 };
41 
42 #endif
void saveIfUpdated()
Definition: Points3DGrid.cpp:33
Definition: Points3DGrid.h:22
longitudes_t m_gridData
Definition: Points3DGrid.h:29
void serialize(Archive &ar, const unsigned int version)
Definition: Points3DGrid.h:35
std::map< longitude_t, latitudes_t > longitudes_t
Definition: mytypes.h:22
Definition: Points3DSqlQuery.h:26
Points3DSqlQuery m_sqlQueryPoints
Definition: Points3DGrid.h:28
Definition: Rectangle.h:36
int32_t z_t
Definition: mytypes.h:15
bool getZ(const utils::Rectangle_t &rectangle, z_t &elevation)
Definition: Points3DGrid.cpp:40
Points3DGrid(const QStringList &args)
Definition: Points3DGrid.cpp:15
Definition: Points3D.h:7