Versions Compared

Key

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

If you encode data in a GRIB message and none of the values are actually missing, you can still end up with a Bitmap Section.

Step-by-step guide

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;



Content by Label
showLabelsfalse
max5
spacesUDOC
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("grib","bitmap") and label = "bitmap" and label = "missing-values" and type = "page" and space = "UDOC"
labelsgrib bitmap


Page properties
hiddentrue


Related issues