<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Paolo,<br>
      the te option set the output raster size, not the subraster. You
      have to use gdal_translate to get subraster and then use gdalwarp.
      <br>
      Also <b style="color: rgb(0, 0, 0); font-family: 'Lucida Grande',
        Verdana, Geneva, Arial, sans-serif; font-size: 12px; font-style:
        normal; font-variant: normal; letter-spacing: normal;
        line-height: normal; orphans: auto; text-align: start;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255);">multi option is
        preferable to multi threaded execution. <br>
      </b>
      <pre class="moz-signature" cols="72">Best regards,
    Dmitry</pre>
      24.12.2013 21:48, Paolo Corti пишет:<br>
    </div>
    <blockquote
cite="mid:CAHXrU-+6DgriN-Aki13DkLYu+DN3aOxMGbbyrtvT+DagUkbg2Q@mail.gmail.com"
      type="cite">
      <p dir="ltr">Hi all</p>
      <p dir="ltr">I am experiencing problems using a VRT dataset built
        from a large directory of .tif files.</p>
      <p dir="ltr">While if a build the VRT from just one of these
        datasets, gdalwarp will work very fast with it, if I use the VRT
        will all of these images, it becomes undefinite times slower.</p>
      <p dir="ltr">Debugging the gdalwarp command, it seems that
        gdalwarp accesses every single raster composing the vrt
        datasource, even if that single raster is not within the extent
        defined by the -te gdalwarp option.</p>
      <p dir="ltr">Here is the output for a vrt composed by just one
        single .tif file:</p>
      <p dir="ltr">$ time gdalwarp -te -88.88 20.28 -87.88 21.28
        single.vrt single.tiff<br>
        ...<br>
        Src=1344,4463,1201x1201 Dst=0,0,1200x1200<br>
        0...10...20...30...40...50...60...70...80...90...100 - done.<br>
        GDAL: GDALClose(single.vrt, this=0x8ca6ef8)<br>
        GDAL: GDALClose(/home/capooti/training/vrt/srtm_19_08.tif,
        this=0x8ca9aa8)<br>
        GDAL: GDALClose(/home/capooti/training/vrt/srtm_19_08.tif,
        this=0x8ca7208)<br>
        GDAL: GDALClose(single.tiff, this=0x8ca7e98)<br>
        GDAL: In GDALDestroy - unloading GDAL shared library.</p>
      <p dir="ltr">real 0m0.137s<br>
        user 0m0.076s<br>
        sys 0m0.052s</p>
      <p dir="ltr">and here is the output for a vrt composed of all of
        the .tif files:</p>
      <p dir="ltr">capooti@ubuntu:~/training/vrt$ time gdalwarp -te
        -88.88 20.28 -87.88 21.28 all.vrt all.tiff<br>
        ...<br>
        Src=7344,16464,1201x1201 Dst=0,0,1200x1200<br>
        0...10...20...30...40...50...60...70...80...90...100 - done.<br>
        GDAL: GDALClose(all.vrt, this=0x9d332b0)<br>
        GDAL: GDALClose(/home/capooti/training/vrt/srtm_18_09.tif,
        this=0x9d46618)<br>
        GDAL: GDALClose(/home/capooti/training/vrt/srtm_19_08.tif,
        this=0x9d467c8)<br>
        ...<br>
        GDAL: GDALClose(/home/capooti/training/vrt/srtm_35_09.tif,
        this=0x9d4c1b8)<br>
        GDAL: GDALClose(/home/capooti/training/vrt/srtm_35_10.tif,
        this=0x9d4c3a8)<br>
        GDAL: GDALClose(/home/capooti/training/vrt/srtm_19_08.tif,
        this=0x9d30800)<br>
        GDAL: GDALClose(/home/capooti/training/vrt/srtm_35_11.tif,
        this=0x9d4c630)<br>
        GDAL: GDALClose(all.tiff, this=0x9d33990)<br>
        GDAL: In GDALDestroy - unloading GDAL shared library.</p>
      <p dir="ltr">real 61m12.130s<br>
        user 0m6.076s<br>
        sys 0m18.052s</p>
      <p dir="ltr">Any hint here to prevent gdalwarp to access the
        unneeded source raster files - the defined extent in -te should
        just hit a couple of ones?<br>
        thanks in advance<br>
        p</p>
      <p dir="ltr">-- <br>
        Paolo Corti<br>
        Geospatial software developer<br>
        web: <a moz-do-not-send="true" href="http://www.paolocorti.net">http://www.paolocorti.net</a><br>
        twitter: @capooti<br>
        skype: capooti</p>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>