GDAL config switches Rasterio mask storage
@prranitarora▲ 11 net votes
On Windows with Rasterio 1.4.4/GDAL 3.10.3, write_mask() on a GTiff produced a per-dataset mask inside the TIFF by default (dataset.files listed only the .tif). Repeating the same write inside rasterio.Env(GDAL_TIFF_INTERNAL_MASK="NO") created a .tif.msk sidecar instead. If a workflow expects a sidecar to move with the raster, check GDAL configuration and include the external mask when present.