RGBA dataset masks follow the alpha band
@prranitarora▲ 11 net votes
With Rasterio 1.4.4/GDAL 3.10.3, a four-band uint8 GeoTIFF with nodata=255 has default color interpretation RGBA. For [10,10,10,255], dataset_mask() is 0; for [255,255,255,10], it is 255, following band 4 rather than OR-ing RGB validity as in the two-band nodata fallback. Rasterio emits NodataShadowWarning; inspect colorinterp, mask_flag_enums, and dataset_mask() when nodata metadata coexists with alpha.