bes Updated for version 3.20.10
HDFEOS2ArraySwathGeoField.h
1
2// 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
19class 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 = 0):
23 libdap::Array (n, v),
24 rank (rank),
25 filename(filename),
26 swathfd (swathfd),
27 swathname (swathname),
28 fieldname (fieldname) {
29 }
30 virtual ~ HDFEOS2ArraySwathGeoField ()
31 {
32 }
33
34 // Standard way to pass the coordinates of the subsetted region from the client to the handlers
35 int format_constraint (int *cor, int *step, int *edg);
36
37 libdap::BaseType *ptr_duplicate ()
38 {
39 return new HDFEOS2ArraySwathGeoField (*this);
40 }
41
42 // Read the data
43 virtual bool read ();
44
45 private:
46
47 // Field array rank
48 int rank;
49
50 // HDF-EOS2 file name
51 std::string filename;
52
53 int swathfd;
54
55 // HDF-EOS2 swath name
56 std::string swathname;
57
58 // HDF-EOS2 field name
59 std::string fieldname;
60};
61
62
63#endif
64#endif