On Fri, Oct 11, 2013 at 7:13 AM, Jose Gomez-Dans <jgomezd...@gmail.com> wrote: > Hello everyone, > > On 10 October 2013 19:58, Even Rouault <even.roua...@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 > > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev
As Even mentioned, the NetCDF driver doesn't use the VSI*L mechanism, so you can't use /vsi*/ stuff with it unless you use LD_PRELOAD=vsipreload.so, see above. kss -- Kyle _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev