<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 01/09/2026 à 15:33, Robin Wilson via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:etPan.6a96d414.5807ef01.db5b@rtwilson.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <style>@scope { body{font-family:Helvetica,Arial;font-size:13px} }</style>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">Hi,</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">I have a
        lot of COGs hosted online in HTTP RANGE compatible storage. I
        want to create a catalog/index of them so that GDAL and tools
        that use GDAL (like QGIS) can extract the relevant data from the
        COGs for specific areas. For example, I’d like to use `gdal
        raster clip` to clip this big ‘virtual raster’ to a specific
        bbox or polygon. Ideally I’d also like to be able to view the
        big raster on-the-fly in QGIS, but I’m aware that may be more
        difficult. My tiles are ’true tiles’ in that they tessellate
        properly and each location is in a single file.</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">I’ve
        been looking at the GDAL Tile Index format, but have been
        getting a bit confused, and some things haven’t been working
        quite how I expect. A few questions below:</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">1. Is
        there an easy way to generate a GDAL Tile Index file from a file
        containing a list of remote URLs? I couldn’t find the right way
        to specify a file containing URLs on the command line, so I
        ended up writing a short Python script that loads the list of
        URLs from a file and then passes them to gdal.TileIndex. Is that
        the best way to do this? One disadvantage of this method is that
        I can’t seem to get a progress bar to display.</div>
    </blockquote>
    <p>see
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/master/autotest/utilities/test_gdalalg_driver_gti_create.py">https://github.com/OSGeo/gdal/blob/master/autotest/utilities/test_gdalalg_driver_gti_create.py</a>
      . The input argument can be a list of paths, local or remote
      (/vsis3/ etc)</p>
    <p>you can use gdal.alg.vsi.list to get a list of remove /vsis3/
      files</p>
    <blockquote type="cite"
      cite="mid:etPan.6a96d414.5807ef01.db5b@rtwilson.com">
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">2. My
        current way of doing that requires GDAL loading the bbox of each
        file by requesting it over the network, which is fairly slow,
        and I have thousands of files to do this for. Is there a way to
        get the GTI creation to use local files on my hard disk for
        getting the extent of each file, but save the location as a
        /vsicurl/ URL to the remote file?</div>
    </blockquote>
    Not directly, but if you save in a .gpkg your GTI index, you can
    easily patch the 'location' field from local paths to remote URLs
    <blockquote type="cite"
      cite="mid:etPan.6a96d414.5807ef01.db5b@rtwilson.com">
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">3. Once
        I’ve created the file, I can do `gdal raster clip` operations on
        the command-line quite quickly, but if I load the GTI raster
        into QGIS then QGIS just hangs. I hoped it would just request
        the relevant COGs for the area I was looking at. I’ve tried
        loading it in by dragging and dropping the .gti.gpkg file and
        then selecting the raster in the layers popup, and also adding
        it via Add Layer->Raster and putting ‘GTI:<path>’. I
        have a web map working which loads these COG files on the fly
        depending on where you’re looking (using a minimal STAC catalog
        in a JSON file) and was hoping to have the same thing working in
        QGIS, without the effort of setting up something like titiler or
        titiler-pgstac, as I’m currently managing to get away without
        running any servers  (as opposed to static data stores) for this
        data.</div>
    </blockquote>
    <p>QGIS will try to gather statistics, hence this can be slow. One
      way to speed up is to have overviews defined in the GTI.</p>
    <br>
    <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.
LLMs contribute to global warming and brain rot.
Let's guillotine them! "Ah ! ça ira, ça ira, ça ira !"</pre>
  </body>
</html>