bes  Updated for version 3.20.6
HDFEOS2Array_RealField.h
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 
21 class HDFEOS2Array_RealField:public libdap::Array
22 {
23  public:
24  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 = "", libdap::BaseType * v = 0):
25  libdap::Array (n, v),
26  rank (rank),
27  filename (filename),
28  isgeofile(isgeofile),
29  sdfd(sdfd),
30  gsfd(gridswathfd),
31  gridname (gridname),
32  swathname (swathname),
33  fieldname (fieldname),
34  sotype(sotype) {
35  }
36  virtual ~ HDFEOS2Array_RealField ()
37  {
38  }
39 
40  // Standard way to pass the coordinates of the subsetted region from the client to the handlers
41  int format_constraint (int *cor, int *step, int *edg);
42 
43  libdap::BaseType *ptr_duplicate ()
44  {
45  return new HDFEOS2Array_RealField (*this);
46  }
47 
48  // Read the data.
49  virtual bool read ();
50 
51  private:
52 
53  // Field array rank
54  int rank;
55 
56  // HDF-EOS2 file name
57  std::string filename;
58 
59  bool isgeofile;
60 
61  int sdfd;
62  int gsfd;
63 
64  // HDF-EOS2 grid name
65  std::string gridname;
66 
67  // HDF-EOS2 swath name
68  std::string swathname;
69 
70  // HDF-EOS2 field name
71  std::string fieldname;
72 
73  // MODIS scale and offset type
74  // Some MODIS files don't use the CF linear equation y = scale * x + offset,
75  // the scaletype distinguishs products following different scale and offset rules.
76  SOType sotype;
77 
78  int write_dap_data_scale_comp( int32 gridid, int nelms, std::vector<int32> &offset32,std::vector<int32> &count32,std::vector<int32> &step32);
79  int write_dap_data_disable_scale_comp( int32 gridid, int nelms, int32 *offset32,int32*count32,int32*step32);
80  void release_mod1b_res(float*ref_scale,float*ref_offset,float*rad_scale,float*rad_offset);
81  void close_fileid(const int gsfileid, const int sdfileid);
82 
83 };
84 
85 
86 #endif
87 #endif
close_fileid
void close_fileid(hid_t fid)
Definition: h5get.cc:414
libdap
Definition: BESDapFunctionResponseCache.h:35