Misleading docs + bug for nodata declaration in extended filenames (for multi-band images)

Description

I want to remove this GDAL warning :

Warning 1: Setting nodata to 65535 on band 1, but band 2 has nodata at 0. The TIFFTAG_GDAL_NODATA only support one value per dataset. This value of 65535 will be used for all bands on re-opening

Following the docs, I added a value for each band as follow : 1:65535,2:65535,3:65535. First issue here, the example in the cookbook is contradictory :

  • "Band/Value pair" syntax: image_filename?&nodata=0:-999,1:255,2:254 -> nodata value corresponds to pixels with values [-999,255,254]
  • It is important to note that the band numbering in the nodata writer option follows the GDAL convention and starts at 1

Moreover, even when using the right syntax and passing 3 values, the warning message ramins.

Steps to reproduce

otbcli_BandMathX -il image_3bands.tif -exp 'im1' -out 'out.tif?&nodata=1:65535,2:65535,3:65535'

Configuration information

I'm using OTB 8.1.1 on Ubuntu 22.04.

Edited by Vincent Delbar