Closed daisy12321 closed 1 year ago
the issue doesn't come from rio-tiler but from the fact that the COG was created without the nodata set. When it got created the overview creation introduced the artefacts
.
when using the preview
method, rio-tiler will use one of the overviews and thus return the wrong values.
The only way to avoid this is to regenerate the COG but with the nodata value set
I noticed that if the data has a nodata mask, the interpolation seems to happen before masking, which results in very strange numbers. For example, if I run the following
The bottom right of the image has values like -9998.1943359375, -10037.056640625, which seems like rio-tiler is interpolating with the nodata value of -9999.
Could it be that https://github.com/cogeotiff/rio-tiler/blob/45fc03c34b18ae66d89a38940d6756d2b9729e6e/rio_tiler/reader.py#L231-L233 should be set before the dataset.read here https://github.com/cogeotiff/rio-tiler/blob/45fc03c34b18ae66d89a38940d6756d2b9729e6e/rio_tiler/reader.py#L222-L229?