openModeller  Version 1.5.0
Header.hh
Go to the documentation of this file.
1 
28 #ifndef _HEADERHH_
29 #define _HEADERHH_
30 
32 #include <openmodeller/om_defs.hh>
33 
34 #include <string>
35 #include <utility>
36 
37 /****************************************************************/
38 /***************************** Header ***************************/
39 
44 /**********/
45 class dllexp Header
46 {
47 public:
48 
49  Header() :
50  proj()
51  {}
52 
53  Header( const Header &h );
54  Header( int xd, int yd, Coord xm, Coord ym,
55  Coord xM, Coord yM, Scalar nv, int nb=1, int gd=0 );
56  ~Header();
57 
58  Header &operator=( const Header &h );
59 
60  // Calculate (xcel, ycel) using xmin, ymin, xmax, ymax,
61  // xdim e ydim.
62  void calculateCell();
63 
64  void setProj( const std::string& projection );
65  int hasProj() const { return (proj.size() > 0); }
66 
67  void printHeader( const std::string& msg="" ) const;
68 
69  std::pair<Coord,Coord> convertXY2LonLat( int x, int y ) const;
70  std::pair<int,int> convertLonLat2XY( Coord lon, Coord lat ) const;
71 
72  int xdim;
73  int ydim;
80  Coord gt[6];
83  int nband;
86  int grid;
87 
93  int categ;
94 
95  // Valores mínimo e máximo.
96  // 'minmax' != 0, indica que 'min' e 'max' são válidos.
97 
99  int minmax;
100 
104  std::string proj;
105 };
106 
107 
108 #endif
Coord xcel
Definition: Header.hh:78
int categ
Definition: Header.hh:93
Coord ycel
Definition: Header.hh:79
Scalar vmin
Definition: Header.hh:101
int xdim
Definition: Header.hh:72
Scalar vmax
Definition: Header.hh:102
double Scalar
Type of map values.
Definition: om_defs.hh:39
int ydim
Definition: Header.hh:73
int nband
Definition: Header.hh:83
Coord xmin
Definition: Header.hh:74
Coord xmax
Definition: Header.hh:76
int hasProj() const
Definition: Header.hh:65
Scalar noval
Definition: Header.hh:82
Header()
Definition: Header.hh:49
Definition: Header.hh:45
std::string proj
Definition: Header.hh:104
Coord ymin
Definition: Header.hh:75
int grid
Definition: Header.hh:86
Coord ymax
Definition: Header.hh:77
int minmax
Definition: Header.hh:99
double Coord
Type of map coordinates.
Definition: om_defs.hh:38