Keep Band Names in output

When data is downloaded from the server site there are named with band numbers is there a way how to keep band names in images.
This was used for for naming a band: cube = cube.ndvi(target_band = "NDVI") but at the end we are getting just band number in raster.

Dear @sulova.andrea, could you please provide us the code you’re using or the JSON process graph? It would be much easier for us to find the issue.

Generating a simple image collection with the calculation of NDWI band:

collection      = 'SENTINEL2_L2A_SENTINELHUB'
start_date      = '2021-09-01'
end_date        = '2021-09-30'
bands           = ['B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B8A', 'B09',  'B11', 'B12', 'SCL', 'CLP' , 'sunAzimuthAngles', 'sunZenithAngles'] 
spatial_extent  = {'west': -74.10587310791017, 'east': -73.86829376220705, 'south': 4.638707740701256, 'north': 4.775573621185315}

cube = connection.load_collection(collection, spatial_extent = spatial_extent, temporal_extent = [start_date, end_date], bands = bands)

cube = cube.ndvi(target_band = "NDVI")

my_job  = cube.send_job()
results = my_job.start_and_wait().get_results()

The final raster, which was downloaded, does not show the band name such as ‘NDVI’ (Band 17) or ‘sunZenithAngles’ (Band16). How can we keep the real names of bands in raster file?

image

Hi Andrea,
this is probably file format related. Geotiff does not have a very good standard for maintaining band names. Could you perhaps post the output of running something like `gdalinfo yourResult.tif’?

The netCDF format is better when it comes to encoding the datacube metadata correctly, and we also store the band names in the STAC metadata of the result.

thanks,
Jeroen

Thanks Jeroen, It works with gdalinfo so band real names are visible in a metadata part:

Band 18 Block=256x256 Type=Float32, ColorInterp=Undefined
  NoData Value=nan
  Metadata:
    DESCRIPTION=NDVI

Ah yes, so I’m afraid I’m not able to get band names for tiff to show up in QGis. I believe I’ve digged into that before.
(Of course, if anyone has a suggestion, I might try again!)

regards,
Jeroen