Skip to main content
Returns the no data value of the given band of the given raster. If no band is given, band 1 is assumed. The band parameter is 1-indexed. If there is no data value associated with the given band, RS_BandNoDataValue returns null.
If the given band does not lie in the raster, RS_BandNoDataValue throws an IllegalArgumentException

Signatures

RS_BandNoDataValue (raster: Raster, band: Integer = 1)

Parameters

raster
Raster
required
The input raster.
band
Integer
default:"1"
required
The band index.

Return type

A numeric value.

Examples

SELECT RS_BandNoDataValue(raster, 1) from rasters;
0.0
SELECT RS_BandNoDataValue(raster) from rasters_without_nodata;
null
SELECT RS_BandNoDataValue(raster, 3) from rasters;
IllegalArgumentException: Provided band index 3 is not present in the raster.