geosolutions-it / jai-ext

Java Advanced Imaging Open Source Replacement Wannabe
Apache License 2.0
89 stars 38 forks source link

GenericPiecewiseOpImage does not reset NODATA value #264

Open aaime opened 4 years ago

aaime commented 4 years ago

When applying GenericPiecewiseOpImage, and in particular, also its subclass RasterClassifierOpImage, the output image has the same nodata as the input, because no attempt to reset it has been made (so it gets inherited). However, the operation gets a "gap value" input that is used to fill nodata in inputs, so technically, the output image does not have a "NODATA" (or has the gap value as nodata, but this is a decision the caller should take).

This has been noticed when working on rendering with SLD raster symbolizercolormaps in GeoServer:

image