11 #ifdef USE_HDFEOS2_LIB
19 #include <InternalErr.h>
25 bool HDFEOS2ArrayMissGeoField::read()
38 nelms = format_constraint(&offset[0], &step[0], &count[0]);
46 if (nelms == tnumelm) {
47 for (
int i = 0; i < nelms; i++)
49 set_value((dods_int32 *) &val[0], nelms);
53 throw InternalErr(__FILE__, __LINE__,
"Currently the rank of the missing field should be 1");
55 for (
int i = 0; i < count[0]; i++)
56 val[i] = offset[0] + step[0] * i;
57 set_value((dods_int32 *) &val[0], nelms);
66 HDFEOS2ArrayMissGeoField::format_constraint (
int *offset,
int *step,
int *count)
71 Dim_iter p = dim_begin ();
73 while (p != dim_end ()) {
75 int start = dimension_start (p,
true);
76 int stride = dimension_stride (p,
true);
77 int stop = dimension_stop (p,
true);
81 if (stride < 0 || start < 0 || stop < 0 || start > stop) {
84 oss <<
"Array/Grid hyperslab indices are bad: [" << start <<
85 ":" << stride <<
":" << stop <<
"]";
86 throw Error (malformed_expr, oss.str ());
90 if (start == 0 && stop == 0 && stride == 0) {
91 start = dimension_start (p,
false);
92 stride = dimension_stride (p,
false);
93 stop = dimension_stop (p,
false);
98 count[id] = ((stop - start) / stride) + 1;
102 "=format_constraint():"
103 <<
"id=" <<
id <<
" offset=" << offset[
id]
104 <<
" step=" << step[
id]
105 <<
" count=" << count[
id]
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream