bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HDFDMRArray_EOS2LL.h
1
2// This file is part of the hdf4 data handler for the OPeNDAP data server.
3// It retrieves HDF4 EOS2LL values for a direct DMR-mapping DAP4 response.
4// Each EOS2LL will be mapped to a DAP variable.
5
6// Authors: Kent Yang <myang6@hdfgroup.org>
7// Copyright (c) The HDF Group
9
10#ifndef HDFDMRARRAY_EOS2LL_H
11#define HDFDMRARRAY_EOS2LL_H
12
13#include "mfhdf.h"
14#include "hdf.h"
15#include "HdfEosDef.h"
16
17#include <libdap/Array.h>
18
19class HDFDMRArray_EOS2LL:public libdap::Array
20{
21 public:
22 HDFDMRArray_EOS2LL (const std::string& filename, const std::string& gridname, bool is_lat, const std::string & n = "", libdap::BaseType * v = nullptr):
23 Array (n, v),
24 filename(filename),
25 gridname(gridname),
26 is_lat(is_lat) {
27 }
28 ~ HDFDMRArray_EOS2LL () override = default;
29
30 // Standard way of DAP handlers to pass the coordinates of the subsetted region to the handlers
31 // Return the number of elements to read.
32 int format_constraint (int *cor, int *step, int *edg);
33
34 libdap::BaseType *ptr_duplicate () override
35 {
36 return new HDFDMRArray_EOS2LL (*this);
37 }
38
39 void set_rank(int32 eos2_rank) {ll_rank = eos2_rank;}
40 bool read () override;
41
42 private:
43
44 std::string filename;
45
46 std::string gridname;
47
48 int32 ll_rank = 2;
49
50 bool is_lat;
51
52 // Subsetting the latitude and longitude.
53 template <class T> void LatLon2DSubset (T* outlatlon, int xdim, T* latlon, const int * offset, const int * count, const int * step) const;
54
55};
56
57
58#endif