[gdal-dev] accessing zip files by URL

Even Rouault even.rouault at mines-paris.org
Thu Mar 24 19:55:13 EDT 2011


Le vendredi 25 mars 2011 00:37:38, Joaquim Luis a écrit :
> I understand all that and even though I'm a win user I always try to be
> very careful with case names (basically, I avoid upper cases). But while
> it is easy to see the case of the real file (I know that urls are case
> sensitive) it's not so easy so clear to know what's inside a compressed
> file on the internet because if you know it it means one already have it
> in the local file system.

Actually you don't need to download the file to know its content.

Just a bit of C/Python/Java/C#/Perl magic.

For example, with python :

from osgeo import gdal
print 
gdal.ReadDir('/vsizip/vsicurl/http://www.aprsworld.net/gisdata/world/world.zip')

Answer : ['world.dbf', 'world.shp', 'world.shx']

(For a .tar.gz, unfortunately getting the list of files means in practice that 
GDAL will have to download the whole .tar.gz)


More information about the gdal-dev mailing list