<div dir="ltr">Hello everyone,<div><br></div><div>On 10 October 2013 19:58, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Le jeudi 10 octobre 2013 20:33:49, Jose Gomez-Dans a écrit :<br>
<div class="im">> Hi,<br>><br>> I was wondering if it's possible to use /vsitar/ to have a peek in .gz<br>> files, such as this one:<br>> <a href="http://www.globalbedo.org/GlobAlbedo29/tiles/2004/h17v04/GlobAlbedo.2004001" target="_blank">http://www.globalbedo.org/GlobAlbedo29/tiles/2004/h17v04/GlobAlbedo.2004001</a><br>
> .h17v04.nc.gz<br><br></div>This is a gzip file, not a .tar.gz file, so you would have to use /vsigzip , and<br>as it is a gzip file over http, you have to combine it with /vsicurl<br></blockquote></div><div><br></div>
<div>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:</div>
<div><br></div><div><div>$ gdalinfo /vsigzip/GlobAlbedo.2004001.h17v04.nc.gz</div><div>ERROR 1: netcdf error #-33 : NetCDF: Not a valid ID .</div><div>at (netcdfdataset.cpp,~netCDFDataset,1446)</div><div><br></div><div>gdalinfo failed - unable to open '/vsigzip/GlobAlbedo.2004001.h17v04.nc.gz'.</div>
<div><br></div><div>gdalinfo --version</div><div>GDAL 1.10.0, released 2013/04/24</div></div><div><br></div><div><div>$ gunzip GlobAlbedo.2004001.h17v04.nc.gz </div><div><br></div><div>$ gdalinfo GlobAlbedo.2004001.h17v04.nc.gz</div>
<div>ERROR 4: `GlobAlbedo.2004001.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 'GlobAlbedo.2004001.h17v04.nc.gz'.</div>
<div><br></div><div>$ gdalinfo <a href="http://GlobAlbedo.2004001.h17v04.nc">GlobAlbedo.2004001.h17v04.nc</a> </div><div>Driver: netCDF/Network Common Data Format</div><div>Files: <a href="http://GlobAlbedo.2004001.h17v04.nc">GlobAlbedo.2004001.h17v04.nc</a></div>
<div>Size is 512, 512</div><div>Coordinate System is `'</div><div>Metadata:</div><div>  NC_GLOBAL#Conventions=CF-1.4</div><div>Subdatasets:</div><div>  SUBDATASET_1_NAME=NETCDF:"<a href="http://GlobAlbedo.2004001.h17v04.nc">GlobAlbedo.2004001.h17v04.nc</a>":DHR_VIS</div>
<div>  SUBDATASET_1_DESC=[1200x1200] DHR_VIS (32-bit floating-point)</div></div><div>[....]</div><div><br></div><div class="gmail_extra">Thanks!</div><div class="gmail_extra">Jose<br><br></div></div>