00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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