bes  Updated for version 3.20.13
HDFEOS2ArraySwathGeoField.h
1 // Retrieves the latitude and longitude of the HDF-EOS2 Swath without using dimension maps
3 
4 // Authors: MuQun Yang <myang6@hdfgroup.org>
5 // Copyright (c) 2010-2012 The HDF Group
7 // For the swath without using dimension maps, for most cases, the retrieving of latitude and
8 // longitude is the same as retrieving other fields. Some MODIS latitude and longitude need
9 // to be arranged specially.
10 #ifdef USE_HDFEOS2_LIB
11 #ifndef HDFEOS2ARRAY_SWATHGEOFIELD_H
12 #define HDFEOS2ARRAY_SWATHGEOFIELD_H
13 
14 #include <libdap/Array.h>
15 #include "HDFCFUtil.h"
16 #include "HdfEosDef.h"
17 
18 
19 class HDFEOS2ArraySwathGeoField:public libdap::Array
20 {
21  public:
22  HDFEOS2ArraySwathGeoField (int rank, const std::string & filename, const int swathfd, const std::string & swathname, const std::string & fieldname, const string & n = "", libdap::BaseType * v = nullptr):
23  libdap::Array (n, v),
24  rank (rank),
25  filename(filename),
26  swathfd (swathfd),
27  swathname (swathname),
28  fieldname (fieldname) {
29  }
30  ~ HDFEOS2ArraySwathGeoField () override = default;
31 
32  // Standard way to pass the coordinates of the subsetted region from the client to the handlers
33  int format_constraint (int *cor, int *step, int *edg);
34 
35  libdap::BaseType *ptr_duplicate () override
36  {
37  return new HDFEOS2ArraySwathGeoField (*this);
38  }
39 
40  // Read the data
41  bool read () override;
42 
43  private:
44 
45  // Field array rank
46  int rank;
47 
48  // HDF-EOS2 file name
49  std::string filename;
50 
51  int swathfd;
52 
53  // HDF-EOS2 swath name
54  std::string swathname;
55 
56  // HDF-EOS2 field name
57  std::string fieldname;
58 };
59 
60 
61 #endif
62 #endif