fmeobjects.FMERasterTools.generatePalette

FMERasterTools.generatePalette(interpretation, numPaletteEntries, raster, parms)

Replaces the selected band(s) on the raster by a new band with a new palette.

The palette will have at most ‘numPaletteEntries’ number of entries and the interpretation.

The interpretation must be large enough for the numPaletteEntries. For example, when the interpretation is FME_INTERPRETATION_UINT8, then the ‘numPaletteEntries’ must not be larger than 256. If the interpretations of the selected bands do not make up a valid palette value interpretation, exception will be raised.

Parameters:
Return type:

FMERaster

Returns:

The raster after generating palette.

Raises:

FMEException – An exception is raised if an error occurred.