[gdal-dev] gdaltindex with wildcard (*.tif) in a /vsizip/myzip.zip
Even Rouault
even.rouault at mines-paris.org
Fri Jun 13 10:28:01 PDT 2014
Le vendredi 13 juin 2014 18:15:51, Helmut Kudrnovsky a écrit :
> Hi,
>
> in the gdaltindex-manual there is an example using wildcard:
>
> gdaltindex doq_index.shp doq/*.tif
Wildcard is evaluated by the operating system
>
> my issue:
>
> given a ~1 GB zip-file on a DVD with a lot of geotiffs, windows 7 box.
>
>
> gdaltindex C:\data\m31_1.shp /vsizip/myzip.zip/m31_1/3523-5301_201308.tif
>
> works fine, but
>
> gdaltindex C:\data\m31_1.shp /vsizip/myzip.zip/m31_1/*.tif
But the operating system doesn't (logically) recognize the GDAL special
/vsizip/ file system, so the wildcard is not evaluated.
A modest complementary development would have to be done to evaluate the
wildcart inside gdaltindex.
An alternative might be to use the gdal_ls.py sample utility
(http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/gdal_ls.py),
redirect its output to a file and specify this file with --optfile to the
gdaltindex command line.
python gdal_ls.py /vsizip/the_zip/the_subdir > filelist.txt
(you may need to filter non tif files. with the Windows equivalent of grep, or
potentially the port of the unix grep :
http://gnuwin32.sourceforge.net/packages/grep.htm)
gdaltindex the_index.shp --optfile filelist.txt
Even
--
Geospatial professional services
http://even.rouault.free.fr/services.html
More information about the gdal-dev
mailing list