[gdal-dev] [EXTERNAL] /vsicurl/ and gz files
Smith, Michael ERDC-RDE-CRREL-NH
Michael.Smith at erdc.dren.mil
Thu Oct 10 11:56:52 PDT 2013
Jose,
You can use /vsigzip/ with /vsicurl
Try
gdalinfo /vsigzip/vsicurl/http://www.globalbedo.org/GlobAlbedo29/tiles/2004/h17v04/GlobAlbedo.2004001.h17v04.nc.gz
Mike
--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers
From: Jose Gomez-Dans <jgomezdans at gmail.com<mailto:jgomezdans at gmail.com>>
Date: Thursday, October 10, 2013 2:33 PM
To: gdal-dev <gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>>
Subject: [EXTERNAL] [gdal-dev] /vsicurl/ and gz files
Resent-From: Michael Smith <michael.smith at usace.army.mil<mailto:michael.smith at usace.army.mil>>
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
The file is a NetCDF, with 20 different layers. I was hoping to be able to read the file in using /vsitar/ (actually, combining /vsicurl/ and /vsitar/), but using e.g. /vsitar/GlobAlbedo.2004001.h17v04.nc.gz I get:
$ gdalinfo /vsitar/GlobAlbedo.2004129.h17v04.nc.gz
ERROR 4: `/vsitar/GlobAlbedo.2004129.h17v04.nc.gz' does not exist in the file system,
and is not recognised as a supported dataset name.
gdalinfo failed - unable to open '/vsitar/GlobAlbedo.2004129.h17v04.nc.gz'.
GDAL: In GDALDestroy - unloading GDAL shared library.
I also get failures when I try to open remote sample netcdf files using /vsicurl/:
$ gdalinfo /vsicurl/http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc
VSICURL: GetFileSize(http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc)=2949152 response_code=200
VSICURL: GetFileList(/vsicurl/http://www.unidata.ucar.edu/software/netcdf/examples)
VSICURL: Downloading 0-16383 (http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc)...
VSICURL: Got reponse_code=206
GDAL_netCDF:
=====
calling nc_open( /vsicurl/http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc )
ERROR 1: netcdf error #-33 : NetCDF: Not a valid ID .
at (netcdfdataset.cpp,~netCDFDataset,1446)
GDAL: GDALClose(/vsicurl/http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc, this=0x1e2ca40)
gdalinfo failed - unable to open '/vsicurl/http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc'.
GDAL: In GDALDestroy - unloading GDAL shared library.
Questions:
1.- Do gzipped files work with /vsitar/?
2.- Are remote/compressed netcdf files useable with GDAL?
3.- How do you select a particular layer if the answer to (2) is yes?
Thanks for your time!
Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131010/e7676fc7/attachment.html>
More information about the gdal-dev
mailing list