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

2025-05-21 Thread Abel Pau via gdal-dev
translate all subdatasets. Thanks for your opinions. De: Even Rouault Enviat el: dimecres, 21 de maig de 2025 21:04 Per a: Abel Pau ; gdal-dev Tema: Re: [gdal-dev] NODATA values in diferents bands in a DataSet Le 21/05/2025 à 20:53, Abel Pau a écrit : Okay,

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

2025-05-21 Thread Even Rouault via gdal-dev
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 beh

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

2025-05-21 Thread Abel Pau via gdal-dev
x27;m looking forward to hearing your thoughts on what the best approach would be in a case like this. Abel. De: Even Rouault Enviat el: dimecres, 21 de maig de 2025 16:55 Per a: Abel Pau ; gdal-dev Tema: Re: [gdal-dev] NODATA values in diferents bands in a Da

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

2025-05-21 Thread Even Rouault via gdal-dev
Abel, there is a subtelty: a) If bands may have invalid pixels at different locations on different bands, and that those bands have a different nodata value, then using GDALRasterBand::SetNoDataValue() is the way to go. b) If a given pixel is invalid only if its value on all bands matches

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

2025-05-21 Thread Rahkonen Jukka via gdal-dev
Hi, On writing side nodata=none seems to work. gdalwarp -of VRT -dstnodata "0 none 0" p4433h.tif nodata.vrt gdalinfo nodata.vrt ... Band 1 Block=512x128 Type=Byte, ColorInterp=Red NoData Value=0 Overviews: 6000x6000, 3000x3000, 1500x1500, 750x750, 375x375, 188x188 Band 2 Block=512x128 Type=B