[gdal-dev] accessing zip files by URL

2011-03-24 Thread Joaquim Luis
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:

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Chaitanya kumar CH
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() Refer: http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip On Thu, Mar 24, 2011 at 8:48 PM, Joaquim

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Even Rouault
Joaquim, The correct syntax would be : gdalinfo /vsizip/vsicurl/http://dds.cr.usgs.gov/srtm/version2_1/SRTM30/w020n90/w020n90.dem.zip/W020N90.DEM or just : gdalinfo /vsizip/vsicurl/http://dds.cr.usgs.gov/srtm/version2_1/SRTM30/w020n90/w020n90.dem.zip because the zip file only contains one

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Even Rouault
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

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Joaquim Luis
Even, Chaitanya Thanks for hint. I did read the http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip but it hasn't any mention to the need of using vsicurl I was about to do the tests you did, so thank you also for that. The point here is not to read that file in particular. I just wanted to

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Even Rouault
Le jeudi 24 mars 2011 19:03:57, Joaquim Luis a écrit : Even, Chaitanya Thanks for hint. I did read the http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip but it hasn't any mention to the need of using vsicurl Yes I am aware that it is lightly documented. I've added recently a few

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Smith, Michael D ERDC-CRREL-NH
Joaquim, For .tar.gz, you can use /vsitar Mike -- Michael Smith Remote Sensing/GIS Center US Army Corps of Engineers Hanover, NH On 3/24/11 2:03 PM, Joaquim Luis jl...@ualg.pt wrote: Even, Chaitanya Thanks for hint. I did read the http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Joaquim Luis
Great, thanks Joaquim Le jeudi 24 mars 2011 19:03:57, Joaquim Luis a écrit : Even, Chaitanya Thanks for hint. I did read the http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip but it hasn't any mention to the need of using vsicurl Yes I am aware that it is lightly documented. I've added

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Joaquim Luis
Ah... well actually reading in a .tar or a .tar.gz is now supported ( http://gdal.org/cpl__vsi_8h.html#d6dd983338849e7da4eaa88f6458ab64 ). Seems that I have changed my mind since. But seeking will still be very slow of course (especially if you combine with /vsicurl !). Ok, I'm going to rectify

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Even Rouault
Even, Still one further point on this matter. This works fine with the promised slowness (fair enough) gdalinfo /vsitar/vsicurl/http://edcftp.cr.usgs.gov/pub/data/gtopo30/global/w020n90.t ar.gz/W020N90.DEM but the file name is case dependent. I mean, this doesn't work gdalinfo

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Joaquim Luis
GDAL can not fix the fact that: http://edcftp.cr.usgs.gov/pub/data/gtopo30/global/w020n90.tar.gz/w020n90.dem is a 404. -- Chris Sure, the browsers are not yet GDAL compliant and cannot see directly inside compressed files. ___ gdal-dev

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Joaquim Luis
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

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread Even Rouault
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

Re: [gdal-dev] accessing zip files by URL

2011-03-24 Thread christopher.schmidt
On Mar 24, 2011, at 6:47 PM, ext Joaquim Luis wrote: Ah... well actually reading in a .tar or a .tar.gz is now supported ( http://gdal.org/cpl__vsi_8h.html#d6dd983338849e7da4eaa88f6458ab64 ). Seems that I have changed my mind since. But seeking will still be very slow of course (especially