Skip to content
Prev 8425 / 29559 Next

help unzipping tiff files compressed with gzip

gzfile gives a connection, which readGDAL does not support - you need
an actual dataset name that GDAL can understand (not necessarily just
a file path btw).

I think you will have to extract the tif with shell/system calls to
gzip or similar - what OS are you using? Rtools provides a handy gzip
that could be used if your system doesn't already have it (e.g.
Windows).

There are virtual drivers in GDAL for reading from compressed files
(similar to the R gzfile connection mechanism), but it will depend on
the installation of GDAL that you have with rgdal:

http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip

http://osgeo-org.1803224.n2.nabble.com/Support-for-reading-GDAL-datasets-in-compressed-archives-gz-and-zip-td2035285.html

It's not available on my system as far as I know ( or I'm not using it
correctly) - if it were avaible in the GDAL used to build rgdal it
should allow readGDAL to read from the "/vsigzip/path....gz" string.

Cheers, Mike.



On Fri, Jun 4, 2010 at 10:40 PM, Alexandre VILLERS
<alexandre.villers at cebc.cnrs.fr> wrote: