Palette Properties

Rasters contain a set of metadata that defines the properties for each palette. These properties include:

  • palette name, key, and value interpretation
  • palette key and value bitdepth
  • nodata key and value

Interpretation on palettes works in much the same way as it does on bands. The interpretation of a palette key must match the interpretation of the related band. Valid palette key interpretations are UInt8, UInt16, and UInt32. The palette value interpretation may be a color model such as RGB or RGBA or string data. Valid palette value interpretations are RGB24, RGBA32, RGB48, RGBA64, Gray8, Gray16, and String.

A palette does not directly store nodata values; however, since the palette keys are intended to match the band values (which can store nodata), a single palette key can be interpreted as nodata if it matched the band nodata value. This nodata key also looks up to a palette value which is then considered the nodata value. A NoData value may not exist without a nodata key.