Resampling bug?
Closed this issue · 2 comments
vlach1989 commented
Hi,
I came accross the following bug. I have a COG where the pixel values are: 0 - no data, 1 - irrigation, 2 - no irrigation. PixelValuesToColorFn is used for styling, where for value 0 no color is applied, the raster is transparent in those places, value 1 is represented by blue color and value 2 is represented by grey color. As you can see in the attached image, strange "edges" are created between the regions.
Expected behavior
In this image where the same data is visualized in QGIS you can see the correct behavior.
DanielJDufour commented
Hi. I think this might be an issue with bilinear resampling. You can try nearest resampling like so:
new GeoRasterLayer({ georaster, resampleMethod: "nearest" })
Let me know if that fixes it for you!
vlach1989 commented