mirror of https://github.com/ecmwf/eccodes.git
Testing: GRIB bitmap as string
This commit is contained in:
parent
f3f13ba36d
commit
9a7842d549
|
@ -274,7 +274,7 @@ static void update_size(grib_accessor* a, size_t s)
|
|||
|
||||
static int unpack_string(grib_accessor* a, char* val, size_t* len)
|
||||
{
|
||||
int i = 0;
|
||||
long i = 0;
|
||||
grib_handle* hand = grib_handle_of_accessor(a);
|
||||
|
||||
if (len[0] < (a->length)) {
|
||||
|
@ -284,8 +284,9 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len)
|
|||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
|
||||
for (i = 0; i < a->length; i++)
|
||||
for (i = 0; i < a->length; i++) {
|
||||
val[i] = hand->buffer->data[a->offset + i];
|
||||
}
|
||||
|
||||
len[0] = a->length;
|
||||
|
||||
|
|
|
@ -156,5 +156,13 @@ set -e
|
|||
grep -q "missing bitmap" $tempOut
|
||||
|
||||
|
||||
# bitmap as string
|
||||
cat > $tempRules<<EOF
|
||||
print "[bitmap:s]";
|
||||
EOF
|
||||
${tools_dir}/grib_filter $tempRules $data_dir/boustrophedonic.grib1
|
||||
${tools_dir}/grib_filter $tempRules $data_dir/missing_field.grib1
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -f $tempData1 $tempData2 $temp1 $temp2 $tempRules $tempOut
|
||||
|
|
Loading…
Reference in New Issue