Replies: 1 comment
-
@BielStela see https://github.com/rasterio/rasterio/blob/main/rasterio/_io.pyx#L991-L1010 for how the mask is created from multi band dataset with internal nodata value.
are you sure, to me it seem the mask should be the combination (https://github.com/rasterio/rasterio/blob/main/rasterio/_io.pyx#L1035) of all band's mask 🤷♂️ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I found a problem with how the nodata mask is handled for multiband rasters. It happens that I have a multiband raster with no internal mask, only a global nodata value, and I expect that when asking for a tile of a specific band, the mask is the one for that band. Instead what I get is the mask for the first band only. Looking at the code I see that deep in the low level
read
function usesIs there any major reason on why multiband rasters can have only one mask representation for all bands?
I'm sure it is not as simple as to use
dataset.read_masks
with theindexes
param because it will return a mask with an extra axis and that will break lots of things down the line. But maybe is it something worth investigating.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions