fmeobjects.FMERasterTools.convertPaletteInterpretation
- FMERasterTools.convertPaletteInterpretation(keyInterpretation, valueInterpretation, palette, nodataKey, parms)
Converts data type of a palette.
Note that this method is similar to
convertInterpretation
with 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_UINT8
FME_INTERPRETATION_UINT16
FME_INTERPRETATION_UINT32
valueInterpretation (int) –
Specifies the desired interpretation of the palette after processing. Choose one of:
FME_INTERPRETATION_NULL
FME_INTERPRETATION_RGB24
FME_INTERPRETATION_RGBA32
FME_INTERPRETATION_RGB48
FME_INTERPRETATION_RGBA64
FME_INTERPRETATION_STRING
palette (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.