Hi
I’m trying to render a tiff onto map, the tiff presents NDVI anomalies value, which is in (-2, 2) and with -2 as the no-data pixels. I’m rendering the NDVI result layer from red to green for pixels values from -2 to 2(not include -2 and 2), and transparent for -2.
And the tiff file is under Albers projection, but the map or what we want to see of the tiff is Web Mercator, so I re-projected the NDVI result layer.
The problem is when re-projecting from Albers to Web Mercator, GeoServer attends to fill zero in those pixels in blank area which appears because the bound of tiff is no longer a rectangle(which is reasonable) and GeoServer makes the whole thing rectangle.
So what is presented in NDVI result layer is the original tiff and a yellow edge around the original area, thus make up a whole rectangle. The yellow edge is those zero-pixels created by GeoServer automatically, and is wrong because zero is one of the valid value for NDVI anomalies which means the growth is the same as last couple years, the edge around the original tiff should just be no-data.
I’m wondering if there’s any way to fix this. I understand the shape of tiff is going to change when retroject from Albers to Web Mercator, and when tiled the image will be fill-up to a rectangle, but can I just set the area not belong to the original tiff transparent or -2? and that will be correct presentation of the result.
Thank you so much for considering and any suggestions.
(btw, i’m sorry if i double posted, because I’m not sure if the previous one is successfully sent)