<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Jose,</div>
<div><br>
</div>
<div>You can use /vsigzip/ with /vsicurl</div>
<div><br>
</div>
<div>Try </div>
<div><br>
</div>
<div>gdalinfo /vsigzip/vsicurl/<a href="http://www.globalbedo.org/GlobAlbedo29/tiles/2004/h17v04/GlobAlbedo.2004001.h17v04.nc.gz">http://www.globalbedo.org/GlobAlbedo29/tiles/2004/h17v04/GlobAlbedo.2004001.h17v04.nc.gz</a></div>
<div><br>
</div>
<div>Mike</div>
<div><br>
</div>
<div>
<div>
<div>
<div>-- </div>
<div>Michael Smith</div>
</div>
<div>Remote Sensing/GIS Center</div>
<div>US Army Corps of Engineers</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Jose Gomez-Dans <<a href="mailto:jgomezdans@gmail.com">jgomezdans@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, October 10, 2013 2:33 PM<br>
<span style="font-weight:bold">To: </span>gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>><br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] [gdal-dev] /vsicurl/ and gz files<br>
<span style="font-weight:bold">Resent-From: </span>Michael Smith <<a href="mailto:michael.smith@usace.army.mil">michael.smith@usace.army.mil</a>><br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>I was wondering if it's possible to use /vsitar/ to have a peek in .gz files, such as this one: <a href="http://www.globalbedo.org/GlobAlbedo29/tiles/2004/h17v04/GlobAlbedo.2004001.h17v04.nc.gz">http://www.globalbedo.org/GlobAlbedo29/tiles/2004/h17v04/GlobAlbedo.2004001.h17v04.nc.gz</a></div>
<div><br>
</div>
<div>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:</div>
<div>
<div><br>
</div>
<div>$ gdalinfo /vsitar/GlobAlbedo.2004129.h17v04.nc.gz </div>
<div>ERROR 4: `/vsitar/GlobAlbedo.2004129.h17v04.nc.gz' does not exist in the file system,</div>
<div>and is not recognised as a supported dataset name.</div>
<div><br>
</div>
<div>gdalinfo failed - unable to open '/vsitar/GlobAlbedo.2004129.h17v04.nc.gz'.</div>
<div>GDAL: In GDALDestroy - unloading GDAL shared library.</div>
</div>
<div><br>
</div>
<div>I also get failures when I try to open remote sample netcdf files using /vsicurl/:</div>
<div><br>
</div>
<div>
<div>$ gdalinfo /vsicurl/<a href="http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc">http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc</a></div>
<div>VSICURL: GetFileSize(<a href="http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc)=2949152">http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc)=2949152</a>  response_code=200</div>
<div>VSICURL: GetFileList(/vsicurl/<a href="http://www.unidata.ucar.edu/software/netcdf/examples">http://www.unidata.ucar.edu/software/netcdf/examples</a>)</div>
<div>VSICURL: Downloading 0-16383 (<a href="http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc).">http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc).</a>..</div>
<div>VSICURL: Got reponse_code=206</div>
<div>GDAL_netCDF: </div>
<div>=====</div>
<div>calling nc_open( /vsicurl/<a href="http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc">http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc</a> )</div>
<div>ERROR 1: netcdf error #-33 : NetCDF: Not a valid ID .</div>
<div>at (netcdfdataset.cpp,~netCDFDataset,1446)</div>
<div><br>
</div>
<div>GDAL: GDALClose(/vsicurl/<a href="http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc">http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc</a>, this=0x1e2ca40)</div>
<div>gdalinfo failed - unable to open '/vsicurl/<a href="http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc">http://www.unidata.ucar.edu/software/netcdf/examples/tos_O1_2001-2002.nc</a>'.</div>
<div>GDAL: In GDALDestroy - unloading GDAL shared library.</div>
</div>
<div><br>
</div>
<div>Questions:</div>
<div>1.- Do gzipped files work with /vsitar/?</div>
<div>2.- Are remote/compressed netcdf files useable with GDAL?</div>
<div>3.- How do you select a particular layer if the answer to (2) is yes?</div>
<div><br>
</div>
<div>Thanks for your time!</div>
<div>Jose</div>
<div><br>
</div>
</div>
</div>
</div>
</span>
</body>
</html>