<div dir="ltr">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.<br>Thanks!!!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 9 lug 2021 alle ore 16:57 <<a href="mailto:Matt.Wilkie@yukon.ca">Matt.Wilkie@yukon.ca</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-CA">
<div class="gmail-m_-6434934985095387777WordSection1">
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Hi Lorenzo,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">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<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(253,246,227)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(42,161,152)">gdal-copy-band-info [in_file] [band #] [out_file] [band #]</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(51,51,51)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">cheers,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">-Matt</span><i><span style="font-size:8pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></i></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"> gdal-dev <<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>Lorenzo Di Giacomo<br>
<b>Sent:</b> July 9, 2021 7:30 AM<br>
<b>To:</b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<b>Subject:</b> [gdal-dev] Lost band name during merge<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td style="background:white;padding:0.75pt">
<pre><strong><span style="font-family:"Courier New";color:black">*** External email: Do not click on links or attachments except from trusted senders. ***<u></u><u></u></span></strong></pre>
<pre><strong><span style="font-family:"Courier New";color:black">******************************************************************************************</span></strong><span style="color:black"><u></u><u></u></span></pre>
<pre><span style="color:black"><br><br><u></u><u></u></span></pre>
</td>
</tr>
</tbody>
</table>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri,sans-serif">Hi, i have N netcdf OR N tiff.<br>
I want merge them all in 1 tiff.<br>
I do that using:<br>
Either </span><span style="font-size:9pt;font-family:"Helvetica Neue",serif">gdal_merge.py -separate -o<span class="gmail-m_-6434934985095387777gmail-apple-converted-space"> ....</span><br>
<span class="gmail-m_-6434934985095387777gmail-apple-converted-space">OR </span>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.
<br>
Thanks!!</span><span style="font-size:10pt;font-family:Calibri,sans-serif"><u></u><u></u></span></p>
</div>
</div>
</div>
</blockquote></div>