[gdal-dev] Lost band name during merge

Matt.Wilkie at yukon.ca Matt.Wilkie at yukon.ca
Fri Jul 9 07:57:09 PDT 2021


Hi Lorenzo,

Attached is a short python script to copy band info from one file to another. It’s not a solution but might be helpful. Usage is

gdal-copy-band-info [in_file] [band #] [out_file] [band #]


cheers,

-Matt

From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> On Behalf Of Lorenzo Di Giacomo
Sent: July 9, 2021 7:30 AM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] Lost band name during merge


*** External email: Do not click on links or attachments except from trusted senders. ***

******************************************************************************************



Hi, i have N netcdf OR N tiff.
I want merge them all in 1 tiff.
I do that using:
Either gdal_merge.py -separate -o ....
OR gdalbuildvrt AND gdal_translate ... Both approaches works but each band has a name like "band_1", "band_2" ecc. the original band name is lost.... Is there a way to at least keep the band name like "original_file_name_1"... Because the informations abouts the bands are lost and are impossibile to know which bands coming from which file.
Thanks!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210709/8c93bbec/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gdal-copy-band-info.py.txt
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210709/8c93bbec/attachment-0001.txt>


More information about the gdal-dev mailing list