OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
HDFEOS2Array_RealField.h
Go to the documentation of this file.
1 // This file is part of the hdf4 data handler for the OPeNDAP data server.
3 // It retrieves the real field values.
4 // Authors: MuQun Yang <myang6@hdfgroup.org> Eunsoo Seo
5 // Copyright (c) 2010-2012 The HDF Group
7 
8 #ifdef USE_HDFEOS2_LIB
9 #ifndef HDFEOS2ARRAY_REALFIELD_H
10 #define HDFEOS2ARRAY_REALFIELD_H
11 
12 #include "Array.h"
13 
14 #include "HDFCFUtil.h"
15 #include "HdfEosDef.h"
16 
17 
18 #include "HDFEOS2EnumType.h"
19 
20 using namespace libdap;
21 
22 class HDFEOS2Array_RealField:public Array
23 {
24  public:
25  HDFEOS2Array_RealField (int rank, const std::string & filename, bool isgeofile, const int sdfd, const int gridswathfd, const std::string & gridname, const std::string & swathname, const std::string & fieldname, SOType sotype, const std::string & n = "", BaseType * v = 0):
26  Array (n, v),
27  rank (rank),
28  filename (filename),
29  isgeofile(isgeofile),
30  sdfd(sdfd),
31  gsfd(gridswathfd),
32  gridname (gridname),
33  swathname (swathname),
34  fieldname (fieldname),
35  sotype(sotype) {
36  }
37  virtual ~ HDFEOS2Array_RealField ()
38  {
39  }
40 
41  // Standard way to pass the coordinates of the subsetted region from the client to the handlers
42  int format_constraint (int *cor, int *step, int *edg);
43 
44  BaseType *ptr_duplicate ()
45  {
46  return new HDFEOS2Array_RealField (*this);
47  }
48 
49  // Read the data.
50  virtual bool read ();
51 
52  private:
53 
54  // Field array rank
55  int rank;
56 
57  // HDF-EOS2 file name
58  std::string filename;
59 
60  bool isgeofile;
61 
62  int sdfd;
63  int gsfd;
64 
65  // HDF-EOS2 grid name
66  std::string gridname;
67 
68  // HDF-EOS2 swath name
69  std::string swathname;
70 
71  // HDF-EOS2 field name
72  std::string fieldname;
73 
74  // MODIS scale and offset type
75  // Some MODIS files don't use the CF linear equation y = scale * x + offset,
76  // the scaletype distinguishs products following different scale and offset rules.
77  SOType sotype;
78 
79  int write_dap_data_scale_comp( int32 gridid, int nelms, std::vector<int32> &offset32,std::vector<int32> &count32,std::vector<int32> &step32);
80  int write_dap_data_disable_scale_comp( int32 gridid, int nelms, int32 *offset32,int32*count32,int32*step32);
81  void release_mod1b_res(float*ref_scale,float*ref_offset,float*rad_scale,float*rad_offset);
82  void close_fileid(const int gsfileid, const int sdfileid);
83 
84 };
85 
86 
87 #endif
88 #endif
SOType
static class NCMLUtil overview
void close_fileid(hid_t fid)
closes HDF5 file reffered by fid.
Definition: h5get.cc:356