cogeotiff/rio-tiler

nodata value being ignored

Closed this issue · 3 comments

Here's an example dataset that seems to have the nodata value ignored (I'm also seeing the same result for tile())

from rio_tiler.io import Reader

class Im(bytes):
    def _repr_png_(self):
        return self

reader = Reader('https://github.com/giswqs/data/raw/main/raster/landsat7.tif')

Im(reader.preview(nodata=-1, max_size=256).render())

download

cc @giswqs and originally reported in banesullivan/localtileserver#58

🙏 thanks for the report @banesullivan

This is coming from the latest minor version of rio-tiler where we are not using WarpedVRT from nodata override but only

data.mask |= data == nodata

This will merge the old mask and the new mask from the provided nodata value.... while we only want one from the nodata.

Will fix this today!

Thanks for addressing this so quickly!!

I see 6.3.1 was issued 34de1a2 but perhaps the tag wasn't pushed?