Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you encode data in GRIB and set the key "bitmapPresent" to 1, you will get a Bitmap Section in your message. If none of the values encoded match the "missingValue" key (by default 9999) then you will end up with a bitmap with all entries being 1 (data is present). This can add weight to the message (There is a single bit for each data value, therefore a data array of N points requires N/8 bytes for the bitmap array).

So it is best to remove it after encoding is completed. For example:

Code Block
languagebash
set bitmapPresent = 1; # This will add a bitmap

set missingValue  = 999999;
 
# In this case, there are no missing values
set values={1, 6, 3, 2, 5, 1, 7, 11};
 
# Now clean up
if (numberOfMissing == 0) {
    set bitmapPresent = 0;
}
write;

...

Page properties
hiddentrue


Related issues