bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HDF5MissLLArray.h
1
2// This file is part of the hdf5 data handler for the OPeNDAP data server.
3// Currently, it provides the missing latitude,longitude fields for the HDF-EOS5 files for the default option.
5
6#ifndef _HDF5MISSLLARRAY_H
7#define _HDF5MISSLLARRAY_H
8
9// STL includes
10#include <string>
11#include <vector>
12
13#include <libdap/Array.h>
14#include "h5dmr.h"
15
16
17class HDF5MissLLArray:public libdap::Array {
18 public:
19 HDF5MissLLArray(bool var_is_lat,int h5_rank,const eos5_grid_info_t & eg_info, const std::string & n="", libdap::BaseType * v = nullptr):
20 libdap::Array(n,v),
21 is_lat(var_is_lat),
22 rank(h5_rank),
23 g_info(eg_info)
24 {
25 }
26
27 ~ HDF5MissLLArray() override = default;
28 libdap::BaseType *ptr_duplicate() override;
29 bool read() override;
30
31 private:
32 bool is_lat;
33 int rank;
34 eos5_grid_info_t g_info;
35
36 bool read_data_geo();
37 void read_data_geo_lat(int64_t nelms, const std::vector<int64_t> &offset,
38 const std::vector<int64_t> &step, std::vector<float> &val) const ;
39 void read_data_geo_lon(int64_t nelms, const std::vector<int64_t> &offset,
40 const std::vector<int64_t> &step, std::vector<float> &val) const;
41 bool read_data_non_geo();
42 int64_t format_constraint (int64_t *offset, int64_t *step, int64_t *count);
43 size_t INDEX_nD_TO_1D(const std::vector<size_t> &dims, const std::vector<size_t> &pos) const;
44 template<typename T> int subset(void* input,
45 int rank,
46 const std::vector<size_t> & dim,
47 int64_t start[],
48 int64_t stride[],
49 int64_t edge[],
50 std::vector<T> *poutput,
51 std::vector<size_t>& pos,
52 int index);
53
54};
55
56#endif // _HDF5MISSLLARRAY_H
57
Data structure and retrieval processing header for the default option.