• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/home/pascal/depot/filedata/src/omifiledata.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Nicolas PASCAL                                  *
00003  *   nicolas.pascal@icare.univ-lille1.fr                                   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef OMIFILEDATA_H
00021 #define OMIFILEDATA_H
00022 
00023 #include "hdf5filedata.h"
00024 #include "satellitefiledata.h"
00025 ;
00026 #include <string>
00027 
00028 using namespace std;
00029 
00030 class OMIFileData : public SatelliteFileData, public HDF5FileData {
00031 protected:
00032     static const string latitude_sds_name;
00033     static const string longitude_sds_name;
00034     static const string time_sds_name;
00036     static const float colocation_tolerance;
00037 
00038     void init();
00039     void check_filename( const string& short_filename ) const;
00040     void parse_filename( const string& short_filename );
00041 
00042     int track_size;
00043     vector<int> lat_lon_index_max;
00044 public:
00050     OMIFileData(const string &_name, const string &mode="r");
00051 
00055     ~OMIFileData();
00056 
00067     const bool get_index(const float &lat, const float& lon, const double &time, int * near_point_idx, const float coloc_tolerance=OMIFileData::colocation_tolerance);
00075      const int get_nearest_point_index( const float &lat, const float &lon,const double &time);
00083     const bool contains_data_at(const float &lat,const float &lon, const double &time) const{
00084         UnimplementedMethod e(__FILE__,__LINE__,__PRETTY_FUNCTION__);
00085         throw e;
00086     };
00090     void load_geolocation_data();
00091 
00092 
00102     const bool get_index(const float &lat, const float& lon, int &nearest_pix_idx, const float colocation_tolerance=OMIFileData::colocation_tolerance);
00103 
00112     const float get_nearest_point_distance(const float &lat,const float &lon,const float coloc_tolerance=OMIFileData::colocation_tolerance);
00121     const bool contain_location(const float &lat,const float &lon, const double &tolerance=OMIFileData::colocation_tolerance);
00132     const bool contain_data(const float &lat, const float &lon, const double &time, const double &colocation_tolerance=OMIFileData::colocation_tolerance);
00140     virtual void get_pixel_coord ( const vector < int > & ipix, float &lat, float &lon, double &time ) {
00141         UnimplementedMethod e(__FILE__,__LINE__,__PRETTY_FUNCTION__);
00142         throw e;
00143     };
00144 
00153      virtual void get_vindex(vector < vector < int > > &v_index, const float &lat, const float& lon,
00154                                             const float colocation_tolerance ) {
00155         UnimplementedMethod e(__FILE__,__LINE__,__PRETTY_FUNCTION__);
00156         throw e;
00157      };
00158 
00159      void load_v_pixel();
00160 
00164     virtual void close_data_file(){HDF5FileData::close_data_file();};
00165 
00169     virtual void open_data_file(){HDF5FileData::open_data_file();};
00174     const int get_sz_x () const {
00175         return lat_lon_index_max [1];
00176     };
00181     const int get_sz_y () const {
00182         return lat_lon_index_max [0];
00183     };
00184 
00185 };
00186 #endif

Generated on Thu Feb 14 2013 17:59:03 for filedata.kdevelop by  doxygen 1.7.1