RasterTypeConversion
The RasterTypeConversion operator allows changing the data type of raster data.
It transforms all pixels into the new data type.
-
Applying the operator could lead to a loss of precision, e.g., converting a
F32value of3.1to aU8will return a value of3. -
If the old value is not valid in the new type it will clip at the value range of the new type. E.g., converting a
F32value of300.0to aU8will return a value of255.
Parameters
| Parameter | Type | Description | Example Value |
|---|---|---|---|
outputDataType | [RasterDataType] | the output type | "U8" |
The RasterTypeConversion operator expects exactly one raster input.
| Parameter | Type |
|---|---|
source | SingleRasterSource |
Example JSON
{
"type": "RasterTypeConversion",
"params": {
"outputDataType": "U8"
},
"sources": {
"raster": {
"type": "GdalSource",
"params": {
"data": "ndvi"
}
}
}
}