-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COGReader.tile doesn't take into account mask band in some circumstances #401
Comments
Make tile with gdal_translate (with mask):
Make tile with gdal_translate (without mask):
|
@drnextgis thanks for the issue. can you tell which version of rasterio and GDAL you are using (and also which OS). I'll investigate, but I've seen this kind of behaviour with some rasterio/gdal combination. Note: rio-tiler doesn't do much, it might go down to rasterio/gdal |
Here is my first look: I don't see anything wrong 🤷♂️ @drnextgis could you produce a bigger file? |
|
Thank you @vincentsarago for your prompt reply. Maybe I'm missing something but shouldn't these masks be the same? https://gist.github.com/drnextgis/5a25cf2e87b380e034a72c4a150358c6 |
Oh I see now |
Ah, good catch! In this case can we follow the same order of precedence as it is done in rasterio? |
@drnextgis I think it's a bit more complexe because we are creating a WarpedVRT 🤷♂️ I think the least we could do is print a warning when nodata and mask or alpha is present! |
It did the trick! |
There is following set of files:
PER_DATASET
internal mask)Let's try to render a tile out of it:
Expected result (screenshot from QGIS):
Actual result:
Everything is fine.
Now let's try to render tile on a lower zoom level, in this case GDAL will use existing overviews.
Expected result:
Actual result:
As you can see the mask has not been taken into account.
Files that are being used: example.zip
The text was updated successfully, but these errors were encountered: