[gdal-dev] accessing zip files by URL

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


Le jeudi 24 mars 2011 18:30:57, Chaitanya kumar CH a écrit :
> Joaguim,
> 
> I think /vsizip/vsicurl/http://path.to/the/file.zip works.
> 
> You have to initialize the zip file and remote file handlers using
> VSIInstallCurlFileHandler() and VSIInstallZipFileHandler()

Actually, they are automagically called when needed (i.e. when the first access 
to the VSI Virtual File API is done), so no need to explicitely call them.

> 
> Refer: http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip
> 
> On Thu, Mar 24, 2011 at 8:48 PM, Joaquim Luis <jluis at ualg.pt> wrote:
> > Hi,
> > 
> > How do we access to a compressed files by URL? We can do that, can't we?
> > 
> > As an example I try this (on Windows)
> > 
> > gdalinfo /vsizip/C:\
> > http://dds.cr.usgs.gov/srtm/version2_1/SRTM30/w020n90/w020n90.dem.zip
> > ERROR 4: `/vsizip/C:\
> > http://dds.cr.usgs.gov/srtm/version2_1/SRTM30/w020n90/w020n90.dem.zip'
> > does not exist in the file system,
> > and is not recognised as a supported dataset name.
> > 
> > and this
> > 
> > gdalinfo /vsizip//
> > http://dds.cr.usgs.gov/srtm/version2_1/SRTM30/w020n90/w020n90.dem.zip
> > 
> > but the error message is similar.
> > 
> > The idea is to fetch the data directly into GMT, but first I need to
> > understand well how it works.
> > 
> > Thanks
> > 
> > Joaquim Luis
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list