fmeobjects.FMERasterTools.convertPaletteInterpretation
- FMERasterTools.convertPaletteInterpretation(keyInterpretation, valueInterpretation, palette, nodataKey, parms)
Converts data type of a palette.
Note that this method is similar to
convertInterpretationwith a mode ofFME_REINTERPRET_MODE_PALETTE, except that this operates directly on a single palette, rather than on all the selected bands of a raster.- Parameters:
keyInterpretation (int) –
Specifies the desired interpretation of the palette after processing. Choose one of:
FME_INTERPRETATION_UINT8FME_INTERPRETATION_UINT16FME_INTERPRETATION_UINT32valueInterpretation (int) –
Specifies the desired interpretation of the palette after processing. Choose one of:
FME_INTERPRETATION_NULLFME_INTERPRETATION_RGB24FME_INTERPRETATION_RGBA32FME_INTERPRETATION_RGB48FME_INTERPRETATION_RGBA64FME_INTERPRETATION_STRINGpalette (FMEPalette) – The palette to apply conversion to.
nodataKey (FMETile) – (Optional) Specifies the nodata value of the palette. It must have the same interpretation as the existing palette.
parms (dict[str, str]) – (Optional) Name-value pair that contains information on how to do specific conversions. Same parameters as in
convertInterpretation().
- Return type:
- Returns:
The palette after converting the interpretation.
- Raises:
FMEException – An exception is raised if an error occurred.