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=Byte, ColorInterp=Green
  Overviews: 6000x6000, 3000x3000, 1500x1500, 750x750, 375x375, 188x188
Band 3 Block=512x128 Type=Byte, ColorInterp=Blue
  NoData Value=0
  Overviews: 6000x6000, 3000x3000, 1500x1500, 750x750, 375x375, 188x188

VRT supports bandwise nodata but I do not know any other format that does. It 
does not mean that they do not exist, I am just unaware.

-Jukka Rahkonen-

________________________________________
Lähettäjä: gdal-dev <gdal-dev-boun...@lists.osgeo.org> käyttäjän Abel Pau via 
gdal-dev <gdal-dev@lists.osgeo.org> puolesta
Lähetetty: Keskiviikko 21. toukokuuta 2025 9.46
Vastaanottaja: gdal-dev <gdal-dev@lists.osgeo.org>
Aihe: [gdal-dev] NODATA values in diferents bands in a DataSet

Hello,I am implementing a driver that allows different NODATA values for each 
band in a dataset.From what I understand in the documentation, I should use the 
NODATA_VALUES metadata item to document these values. However, I don't see a 
clear way to indicate that a specific band has no NODATA value within the 
tuple.On the other hand, the documentation also suggests that NODATA_VALUES is 
not widely honoured, which is not very encouraging.Therefore, would you 
consider it good practice to separate bands with different NODATA values into 
separate subdatasets instead?Thank you very much for the clarification.Abel Pau 
Garcia [X] MiraMon Technical Lead a....@creaf.cat [X] Let's chat on Teams! Tel. 
+34 [X] [X] [X] [X] www.creaf.cat  | Latest news CREAF. Campus UAB. Edifici C. 
08193 Bellaterra (Barcelona) Privacy policy [X] Before printing this electronic 
message, think about the environment. 
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to