[gdal-dev] How to get a file list from a Sentinel zip?
Even Rouault
even.rouault at spatialys.com
Wed Apr 8 07:24:18 PDT 2020
Jukka,
> ogrinfo /vsizip/test.zip
> FAILURE:
> Unable to open datasource `/vsizip/test.zip' with the following drivers.
>
> Is this worth making a feature request or is there some good reason why
> ogrinfo cannot read the file list from zip while gdalinfo can?
That /vsizip/ reports the file list when opening a .zip as a file is mostly a
questionable convenience.
For what you want to do, a simple "unzip -l the.zip" will do the job just fine.
If you want to stay in GDAL world, the following will also do:
python gdal_ls.py -r /vsizip/the.zip
with gdal_ls.py at
https://raw.githubusercontent.com/OSGeo/gdal/master/gdal/swig/python/samples/gdal_ls.py
This is mostly useful for remote zips, where you would access a /vsizip//vsicurl/.... , to
avoid downloading them.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200408/708a8e1f/attachment.html>
More information about the gdal-dev
mailing list