Go to the documentation of this file.00001
00002 #ifndef vil_geotiff_header_h_
00003 #define vil_geotiff_header_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <vcl_vector.h>
00024 #include <tiffio.h>
00025 #include <geotiffio.h>
00026
00027 class vil_geotiff_header
00028 {
00029 public:
00030
00031 typedef enum {UNDEF=-1, NORTH=0, SOUTH=1} GTIF_HEMISPH;
00032 vil_geotiff_header(TIFF* tif);
00033
00034
00035 virtual ~vil_geotiff_header() { GTIFFree(gtif_); }
00036
00037 int gtif_number_of_keys() const { return number_of_geokeys_; }
00038
00039 bool gtif_tiepoints(vcl_vector<vcl_vector<double> > &tiepoints);
00040
00041 bool gtif_pixelscale(double &scale_x, double &scale_y, double &scale_z);
00042
00043
00044 bool gtif_trans_matrix (double* &trans_matrix);
00045
00046
00047 bool PCS_WGS84_UTM_zone(int &zone, GTIF_HEMISPH &hemisph);
00048
00049
00050 bool PCS_NAD83_UTM_zone(int &zone, GTIF_HEMISPH &hemisph);
00051
00052
00053 bool GCS_WGS84_MET_DEG();
00054
00055
00056
00057
00058
00059
00060 bool get_key_value(geokey_t key, void** value,
00061 int& size, int& length, tagtype_t& type);
00062
00063 void print_gtif(){ if (gtif_) GTIFPrint(gtif_, 0, 0); }
00064
00065 private:
00066
00067 TIFF* tif_;
00068 GTIF* gtif_;
00069
00070
00071 unsigned short key_directory_version_;
00072
00073
00074 unsigned short key_revision_;
00075 unsigned short minor_revision_;
00076
00077
00078 int number_of_geokeys_;
00079
00080 modeltype_t model_type_;
00081 rastertype_t raster_type_;
00082 geographic_t geographic_type_;
00083 geounits_t geounits_;
00084
00085 bool gtif_modeltype (modeltype_t& type);
00086 bool gtif_rastertype (rastertype_t&);
00087 bool geounits (geounits_t&);
00088 bool geographic_type(geographic_t&);
00089 };
00090
00091 #endif //vil_geotiff_header_h_