[gdal-dev] NODATA values in diferents bands in a DataSet

Even Rouault even.rouault at spatialys.com
Wed May 21 12:04:52 PDT 2025


Le 21/05/2025 à 20:53, Abel Pau a écrit :
> Okay, thanks!
> So the interpretation we are aiming for is option *a)*:
> Each band is treated independently, and each one has its own NODATA 
> value. The NODATA value of one band is unrelated to that of the others.
> That said, the question is whether this behavior is consistently 
> supported across all formats, or if it only works this way in our 
> custom implementation.

GDAL core (and most algorithms) should work fine, but if you want to 
convert to GeoTIFF or COG, they only support the same nodata value for 
all bands  (although we could potentially extend the GDAL_NODATA tag to 
support one value per band, but that would be debate for another 
thread), and the same band type for all bands.


> If not, perhaps the more robust approach would be to separate bands 
> with different NODATA values into different subdatasets.

That's a possibility indeed. I'm not sure any implemented format has 
done such effort, but there is nothing inherently wrong if you want to 
do that.


-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250521/5fc6fe43/attachment.htm>


More information about the gdal-dev mailing list