[gdal-dev] /vsicurl/ and gz files

Jose Gomez-Dans jgomezdans at gmail.com
Fri Oct 11 06:13:48 PDT 2013


Hello everyone,

On 10 October 2013 19:58, Even Rouault <even.rouault at mines-paris.org> wrote:

> Le jeudi 10 octobre 2013 20:33:49, Jose Gomez-Dans a écrit :
> > Hi,
> >
> > I was wondering if it's possible to use /vsitar/ to have a peek in .gz
> > files, such as this one:
> >
> http://www.globalbedo.org/GlobAlbedo29/tiles/2004/h17v04/GlobAlbedo.2004001
> > .h17v04.nc.gz
>
> This is a gzip file, not a .tar.gz file, so you would have to use /vsigzip
> , and
> as it is a gzip file over http, you have to combine it with /vsicurl
>

I hadn't seen the /vsigzip/ option, but it's quite obvious! The /vsicurl/
limitation isn't important, I just thought it'd be a nice way to brag about
GDAL ;-) However, one problem still persists. While I can prod into the
decompressed file (e.g. after I have gunzipped it), the following command
still reports a problem, e.g:

$ gdalinfo /vsigzip/GlobAlbedo.2004001.h17v04.nc.gz
ERROR 1: netcdf error #-33 : NetCDF: Not a valid ID .
at (netcdfdataset.cpp,~netCDFDataset,1446)

gdalinfo failed - unable to open '/vsigzip/GlobAlbedo.2004001.h17v04.nc.gz'.

gdalinfo --version
GDAL 1.10.0, released 2013/04/24

$ gunzip GlobAlbedo.2004001.h17v04.nc.gz

$ gdalinfo GlobAlbedo.2004001.h17v04.nc.gz
ERROR 4: `GlobAlbedo.2004001.h17v04.nc.gz' does not exist in the file
system,
and is not recognised as a supported dataset name.

gdalinfo failed - unable to open 'GlobAlbedo.2004001.h17v04.nc.gz'.

$ gdalinfo GlobAlbedo.2004001.h17v04.nc
Driver: netCDF/Network Common Data Format
Files: GlobAlbedo.2004001.h17v04.nc
Size is 512, 512
Coordinate System is `'
Metadata:
  NC_GLOBAL#Conventions=CF-1.4
Subdatasets:
  SUBDATASET_1_NAME=NETCDF:"GlobAlbedo.2004001.h17v04.nc":DHR_VIS
  SUBDATASET_1_DESC=[1200x1200] DHR_VIS (32-bit floating-point)
[....]

Thanks!
Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131011/ca4b71b3/attachment.html>


More information about the gdal-dev mailing list