satpy icon indicating copy to clipboard operation
satpy copied to clipboard

Allow generic_image reader to set fill value on reading

Open strandgren opened this issue 4 months ago • 1 comments

While looking into https://github.com/pytroll/satpy/pull/2923 I went through the generic_image reader code. All the images with A channel are converted to floats and NaNs are placed to the no data pixels. If there's no A but the image has a nodatavals metadata item present and nodata_handling is set to "fill_value" the image is kept as integer data. I'm not sure PNG supports the no data value (or fill value).

Maybe the generic_image reader should have a feature to force a fill_value that would replace the A band whether there is a fill value in the original image or not.

Originally posted by @pnuu in https://github.com/pytroll/satpy/issues/2897#issuecomment-2406692422

strandgren avatar Oct 11 '24 12:10 strandgren