Skip to content
πŸŽ‰ SedonaDB 0.4.0 is out now! πŸ—ΊοΈ Python DataFrame API, R dplyr, Geography support & GPU-accelerated spatial joins. Read the release blog β†’

RS_SetPixelType

Introduction: Returns a modified raster with the desired pixel data type.

The dataType parameter accepts one of the following strings.

  • "D" - 64 bits Double
  • "F" - 32 bits Float
  • "I" - 32 bits signed Integer
  • "S" - 16 bits signed Short
  • "US" - 16 bits unsigned Short
  • "B" - 8 bits unsigned Byte

Note

If the specified dataType is narrower than the original data type, the function will truncate the pixel values to fit the new data type range.

Format:

RS_SetPixelType(raster: Raster, dataType: String)

Return type: Raster

Since: v1.6.0

SQL Example:

RS_SetPixelType(raster, "I")