// // C++ Interface: %{MODULE} // // Description: // // // Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR} // // Copyright: See COPYING file that comes with this distribution // // #ifndef MERISFILEDATA_H #define MERISFILEDATA_H #include #include #include #include "filedatareader.h" #include "Hdf_sds.hpp" #include "epr_api.h" using namespace std; /** @author James MANLEY */ class MerisFileData : public FileDataReader{ public: MerisFileData(const string &name = string(""), const string &mode = string("r")); virtual ~MerisFileData(); virtual void * read_data(void* data, const char* sds_name, int * start=NULL, int * stride=NULL, int *edges=NULL, int rank=-1); vector get_dataset_dimension(const string &sds_name); void get_dataset_fill_value(const string &sds_name, void* fill_value); int get_n_dataset(); string get_dataset_name(int i); int get_dataset_data_type(string sds_name); string get_values_attr_dataset(string sds_name,string attr_name); bool has_attr_dataset(string sds_name,string attr_name); string get_values_attr(string attr_name); bool has_attr(string attr_name); string get_filename(){return this->filename;}; string get_product(){return "meris";}; /** * @brief closes the file */ void close_data_file(); /** * @brief open the file */ void open_data_file(); void get_fillValue(const string &sds_name, void *fillValue); void get_scaling_type_of_raw(const string &sds_name, float64 &scale, float64 &offset, int &type); protected: EPR_SProductId* product_id; string filename; string getMonth(const string &month); int width; int height; void getFillValues(char8 &fillvalue); void getFillValues(uchar8 &fillvalue); void getFillValues(int16 &fillvalue); void getFillValues(uint16 &fillvalue); void getFillValues(int32 &fillvalue); void getFillValues(uint32 &fillvalue); void getFillValues(float32 &fillvalue); void getFillValues(float64 &fillvalue); string epr_get_field_elem_as_str(const EPR_SField* field); void get_scaling(const string &sds_name, float64 &scale, float64 &offset); }; #endif