<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Known issue: <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/issues/3627">https://github.com/OSGeo/gdal/issues/3627</a><br>
    </p>
    <div class="moz-cite-prefix">Le 28/03/2022 à 16:08, volkan yazici a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:AS8P191MB16889DBA6552936FCF6A020AB31D9@AS8P191MB1688.EURP191.PROD.OUTLOOK.COM">
      <div>
        Hi,</div>
      <div>
        <br>
      </div>
      <div>
        I use this code for raster stacking:</div>
      <div>
        <br>
      </div>
      <div>
        <span>outvrt = ('result/raster_stack_vrt.tif')</span><br>
      </div>
      <div>
        <div>outtif = ('result/raster_stack.tif')</div>
        <div>tifs = glob.glob('data/*.tif')</div>
        <div>outds = gdal.BuildVRT(outvrt, tifs, separate = True)</div>
        outds = gdal.Translate(outtif, outds)<br>
      </div>
      <div>
        <br>
      </div>
      <div>
        <span>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?</span><br>
      </div>
      <div>
        <span><br>
        </span></div>
      <div>
        <div>
          ----</div>
        <div id="Signature">
          <div>
            <div>
            </div>
            <div>
              <div>
                Volkan.</div>
              <br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>