-
Notifications
You must be signed in to change notification settings - Fork 109
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
Apply same resampling method for mask and tile #105
Comments
@dionhaefner |
closed by #106 |
IIRC this was deliberate. We used to use the same resampling for the alpha mask, but it eroded the tile edges. E.g. linear resampling doesn't make much sense on a binary mask, does it? |
@dionhaefner well I'm not sure how it does on a pure binary mask but at least when dealing with mask built from nodata it will mater. |
When I played around with this, using resampling for the mask never had a positive effect. But YMMV |
Well it seems that this introduced a bug when dealing with internal mask (wonder why the tests didn't caught this) When using bilinear resampling the mask is =255 everywhere |
Well this is really strange I could not reproduce the bug (bilinear resampling of mask creating non-masked data) when using Rasterio wheels ... so I guess this has to deal with my gdal/numpy install 🤔 . BUT I found that using something else than nearest resampling introduce mask artefacts ... I'm going to revert the change introduced in #106 I'm really sorry for the users that could have been impacted by the 1.2.6 release |
Note: if we revert #106 Lines 753 to 756 in 156b0a8
fails which seems a bit strange. I'll investigate a bit more and might open an issue on rasterio |
closed by d9e532a |
in
rio-tiler/rio_tiler/utils.py
Lines 345 to 353 in 2bf9f14
we could end up (actual behavior) with using different resampling for mask and data which will result in bad masking.
The text was updated successfully, but these errors were encountered: