netcdf-java
netcdf-java copied to clipboard
Can't bypass scaling in Grayscale Geotiff Writing
https://github.com/Unidata/netcdf-java/blob/b3a3726ca760534ffae7154377ccc80443609eb1/cdm/misc/src/main/java/ucar/nc2/geotiff/GeotiffWriter.java#L582
My data that is being served by the WCS service in TDS is already unsigned bytes for categorical data, but the geotiff I get from WCS gets scaled and loses the original categorical values. It would be nice to have a way to either flag that the data should not get scaled/offset prior to saving, or detect that the input/output grid dtypes are the same and leave things alone?
Even better would be to have an option for paletted geotiffs, which my source dataset has specified list of colors that works for the WMS service.