openModeller
Version 1.4.0
|
00001 00028 #ifndef _HEADERHH_ 00029 #define _HEADERHH_ 00030 00031 #include <openmodeller/os_specific.hh> 00032 #include <openmodeller/om_defs.hh> 00033 00034 #include <string> 00035 #include <utility> 00036 00037 /****************************************************************/ 00038 /***************************** Header ***************************/ 00039 00044 /**********/ 00045 class dllexp Header 00046 { 00047 public: 00048 00049 Header() : 00050 proj() 00051 {} 00052 00053 Header( const Header &h ); 00054 Header( int xd, int yd, Coord xm, Coord ym, 00055 Coord xM, Coord yM, Scalar nv, int nb=1, int gd=0 ); 00056 ~Header(); 00057 00058 Header &operator=( const Header &h ); 00059 00060 // Calculate (xcel, ycel) using xmin, ymin, xmax, ymax, 00061 // xdim e ydim. 00062 void calculateCell(); 00063 00064 void setProj( const std::string& projection ); 00065 int hasProj() const { return (proj.size() > 0); } 00066 00067 void printHeader( const std::string& msg="" ) const; 00068 00069 std::pair<Coord,Coord> convertXY2LonLat( int x, int y ) const; 00070 std::pair<int,int> convertLonLat2XY( Coord lon, Coord lat ) const; 00071 00072 int xdim; 00073 int ydim; 00074 Coord xmin; 00075 Coord ymin; 00076 Coord xmax; 00077 Coord ymax; 00078 Coord xcel; 00079 Coord ycel; 00080 Coord gt[6]; 00082 Scalar noval; 00083 int nband; 00086 int grid; 00087 00093 int categ; 00094 00095 // Valores mínimo e máximo. 00096 // 'minmax' != 0, indica que 'min' e 'max' são válidos. 00097 00099 int minmax; 00100 00101 Scalar vmin; 00102 Scalar vmax; 00104 std::string proj; 00105 }; 00106 00107 00108 #endif