RS_BandIsNoData¶
Returns true if every pixel of the band holds the band’s nodata value. Returns false if any pixel holds data, or if the band has no nodata value.
Usage¶
boolean RS_BandIsNoData(rast: raster)
boolean RS_BandIsNoData(rast: raster, band: integer)
Arguments¶
- rast (raster): Input raster
- band (integer): Band index (1-based). Defaults to 1 if not specified.
Description¶
A pixel counts as nodata when it equals the band’s nodata value; a NaN pixel matches a NaN nodata value. A band without a nodata value is never all nodata, even if every pixel is 0. Only 2-D rasters are supported.
Examples¶
SELECT RS_BandIsNoData(RS_Example());
┌───────────────────────────────┐
│ rs_bandisnodata(rs_example()) │
│ boolean │
╞═══════════════════════════════╡
│ false │
└───────────────────────────────┘
SELECT RS_BandIsNoData(RS_Example(), 1);
┌────────────────────────────────────────┐
│ rs_bandisnodata(rs_example(),Int64(1)) │
│ boolean │
╞════════════════════════════════════════╡
│ false │
└────────────────────────────────────────┘