Sets the NoData value for a specified band of a raster object. Setting a NoData value marks which pixel value represents "no data" — it does not modify existing pixel values in the raster.
Syntax
raster ST_SetNoData(raster rast, integer band_sn, double nodata_value);Parameters
| Parameter | Description |
|---|---|
| rast | The raster object. |
| band | The sequence number of the band, which starts from 0. A value of -1 indicates all bands. |
| nodata_value | The NoData value of the band. |
Examples
Set the NoData value for band 0:
update rast set rast=ST_SetNoData(rast,0, 999.999);(1 row)Set the NoData value for all bands:
update rast set rast=ST_SetNoData(rast,-1, 999.999);