GlobeEngine
TMSXml.hpp
Go to the documentation of this file.
1 //
2 // TMSXml.hpp
3 // GlobeEngine
4 //
5 // Created by Alireza Amiraghdam on 15/05/16.
6 //
7 //
8 
9 #ifndef TMSXml_h
10 #define TMSXml_h
11 
12 #include <stdio.h>
13 #include <String>
14 #include <Vector>
15 #include <vmmlib/vmmlib.hpp>
16 #include "tinyxml2.h"
17 #include "tinyxml2utils.h"
18 
19 namespace geTerrainPreprocess{
20 
21  struct TileFormat{
22  std::string extension;
23  std::string mime;
24  int height, width;
27  int sampleFormat;//1=UINT,2=INT,3=FLOAT
28  std::string endFileName;
29  };
30 
31  struct NormalFormat{
32  std::string extension = "";
33  std::string normalEndOfFileName = "";
34  };
35 
36  struct BoundingBox{
37  double maxx, maxy, minx, miny;
38  };
39 
40  struct TMSXmlInfo{
41  std::string title;
42  std::string srs;
46  double originx, originy;
47  std::vector<vmml::Vector2d> pixelScalings;
48  std::string profile;
49  };
50 
51  class TMSXml{
52  private:
53  public:
55  void init(TMSXmlInfo _info);
56  void xmlInit(tinyxml2::XMLDocument* _xmlDoc, const TMSXmlInfo &_info);
57  void xmlPixelScaling(tinyxml2::XMLDocument *_xmlDoc, TMSXmlInfo _info);
58  void writeXml(std::string _fileName);
59  void readXml(std::string _fileName);
60  };
61 }
62 #endif /* TmsXml_hpp */
Definition: TMSXml.hpp:31
NormalFormat normalFormat
Definition: TMSXml.hpp:45
BoundingBox boundingBox
Definition: TMSXml.hpp:43
int height
Definition: TMSXml.hpp:24
int width
Definition: TMSXml.hpp:24
std::string extension
Definition: TMSXml.hpp:32
void writeXml(std::string _fileName)
Definition: TMSXml.cpp:17
Definition: TMSXml.hpp:40
TMSXmlInfo info
Definition: TMSXml.hpp:54
std::string normalEndOfFileName
Definition: TMSXml.hpp:33
int samplePerPixel
Definition: TMSXml.hpp:26
int bitPerSample
Definition: TMSXml.hpp:25
Definition: TMSXml.hpp:36
std::string mime
Definition: TMSXml.hpp:23
Definition: TMSXml.hpp:21
std::vector< vmml::Vector2d > pixelScalings
Definition: TMSXml.hpp:47
Definition: NormalCommand.h:14
void xmlPixelScaling(tinyxml2::XMLDocument *_xmlDoc, TMSXmlInfo _info)
Definition: TMSXml.cpp:140
std::string srs
Definition: TMSXml.hpp:42
double originx
Definition: TMSXml.hpp:46
std::string extension
Definition: TMSXml.hpp:22
double maxy
Definition: TMSXml.hpp:37
std::string profile
Definition: TMSXml.hpp:48
void xmlInit(tinyxml2::XMLDocument *_xmlDoc, const TMSXmlInfo &_info)
Definition: TMSXml.cpp:24
TileFormat tileFormat
Definition: TMSXml.hpp:44
std::string title
Definition: TMSXml.hpp:41
int sampleFormat
Definition: TMSXml.hpp:27
Definition: TMSXml.hpp:51
double minx
Definition: TMSXml.hpp:37
std::string endFileName
Definition: TMSXml.hpp:28
double maxx
Definition: TMSXml.hpp:37
void init(TMSXmlInfo _info)
Definition: TMSXml.cpp:13
double originy
Definition: TMSXml.hpp:46
void readXml(std::string _fileName)
Definition: TMSXml.cpp:105
double miny
Definition: TMSXml.hpp:37