Known issue: https://github.com/OSGeo/gdal/issues/3627

Le 28/03/2022 à 16:08, volkan yazici a écrit :
Hi,

I use this code for raster stacking:

outvrt = ('result/raster_stack_vrt.tif')
outtif = ('result/raster_stack.tif')
tifs = glob.glob('data/*.tif')
outds = gdal.BuildVRT(outvrt, tifs, separate = True)
outds = gdal.Translate(outtif, outds)

Band names are automatically generated as band_1, band_2.... I want the band names to be the same as the tif names. I found the bandList argument in gdal.BuildVRTOptions but that didn't produce the result I wanted either. How can I make band names automatically generated from the names of tif files?

----
Volkan.


_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to