The #672 do not work with numpy NaN.
numpy.float32('nan') == numpy.float32('nan') and numpy.float64('nan') == numpy.float64('nan') are evaluated False.
Proposal (Line 240 in rio-tiler/rio_tiler/reader.py):
# if data has Nodata then we simply make sure the mask == the nodata
if nodata is not None:
if numpy.isnan(nodata):
data.mask = numpy.isnan(data.data)
else:
data.mask = data.data == nodata
The tile form my float32 dataset with NaN as nodata before:
The #672 do not work with numpy NaN. numpy.float32('nan') == numpy.float32('nan') and numpy.float64('nan') == numpy.float64('nan') are evaluated False.
Proposal (Line 240 in rio-tiler/rio_tiler/reader.py):
The tile form my float32 dataset with NaN as nodata before:
And after:
Thanks!