bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HDFEOS2ArraySwathGeoDimMapExtraField.h
1
2// Retrieves the latitude and longitude of the HDF-EOS2 Swath with dimension map
3// Authors: Kent Yang <myang6@hdfgroup.org>
4// Copyright (c) The HDF Group
6// SOME MODIS products provide the latitude and longitude files for
7// swaths using dimension map. The files are still HDF-EOS2 files.
8// The file name is determined at hdfdesc.cc.
9#ifdef USE_HDFEOS2_LIB
10#ifndef HDFEOS2ARRAY_SWATHGEODIMMAPEXTRAFIELD_H
11#define HDFEOS2ARRAY_SWATHGEODIMMAPEXTRAFIELD_H
12
13#include <libdap/Array.h>
14#include "mfhdf.h"
15#include "hdf.h"
16#include "HdfEosDef.h"
17
18
19// swathname is not provided because the additional geo-location file uses
20// a different swath name.
21class HDFEOS2ArraySwathGeoDimMapExtraField:public libdap::Array
22{
23 public:
24 HDFEOS2ArraySwathGeoDimMapExtraField (int rank, const std::string & filename, const std::string & fieldname, const string & n = "", libdap::BaseType * v = nullptr):
25 libdap::Array (n, v), rank (rank), filename (filename), fieldname (fieldname) {
26 }
27 ~ HDFEOS2ArraySwathGeoDimMapExtraField () override = default;
28
29 // Standard way to pass the coordinates of the subsetted region from the client to the handlers
30 int format_constraint (int *cor, int *step, int *edg);
31
32 libdap::BaseType *ptr_duplicate () override
33 {
34 return new HDFEOS2ArraySwathGeoDimMapExtraField (*this);
35 }
36
37 // Read the data
38 bool read () override;
39
40 private:
41
42 // Field array rank
43 int rank;
44
45 // HDF-EOS2 file name
46 std::string filename;
47
48 // HDF-EOS2 field name
49 std::string fieldname;
50};
51
52
53#endif
54#endif