[gdal-dev] Lost band name during merge

Lorenzo Di Giacomo loridigia at gmail.com
Wed Jul 14 06:58:13 PDT 2021


Hi Matt, thanks but actually since i have more than 1 raster to merge and
each raster contains 1 band but with many levels, the script you pass me
doesn't do the trick. But yeah, what i need is to know during gdal_merge.py
(with -separate) if there is a way to bring in the output raster also the
bands properties.
Thanks!!!

Il giorno ven 9 lug 2021 alle ore 16:57 <Matt.Wilkie at yukon.ca> ha scritto:

> 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/20210714/fb40ee71/attachment-0001.html>


More information about the gdal-dev mailing list