[gdal-dev] nodata value and alpha in Float32

Javier Jimenez Shaw j1 at jimenezshaw.com
Mon May 31 07:55:27 PDT 2021


I have a GeoTIFF with this characteristics:
- 6 bands
- last band is "Alpha" (with values 0 or 255, nothing else)
- Float32
- NoData value = -10000

The 5 first bands may have "nodata" pixels, not necessarily on all bands
simultaneously. (nodata pixels are usually broken or saturated pixels from
the sensor, and each band comes from a different sensor). The valid pixels
have values between 0 and 1

When I try to generate embedded overviews (with average interpolation) with
C++ or CreateCopy as COG (with default values), looks like it is using the
-10000 values as valid values, and producing results in the overviews like
-9990.6... that obviously are not anymore considered "nodata".

The first noticeable effect opening the file in QGIS, is that the min and
max value for each band are not anymore 0 and 1, but nonsense negative

Can both Alpha and NoData live together properly?


PS I have the impression that with external ovr file it does not happen. I
am testing more.
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210531/49b7ab04/attachment.html>

More information about the gdal-dev mailing list