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.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to