Skip to main content
Extract a band from a raster as an array of doubles.

Signatures

RS_BandAsArray(raster: Raster, bandIndex: Integer)

Parameters

raster
Raster
required
The input raster.
bandIndex
Integer
required
The 1-indexed band to extract.

Return type

An array of double values representing the pixel values of the specified band.

Example

SELECT RS_BandAsArray(raster, 1) FROM raster_table
+--------------------+
|                band|
+--------------------+
|[0.0, 0.0, 0.0, 0...|
+--------------------+