<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dear Michael,<br>
<br>
For the moment, I found my way with a call to gzip through
shell(cmd=paste("C:/gzip -d ", filename, ".gz", sep="")) after
installing GZIP.exe at the root of C: <br>
I wasn't able to find the option allowing to keep the original .gz
which is otherwise trashed but it is a minor problem for the moment. I
will also have a look at the osgeo pages you adviced cause this might
be a powerful and useful tool.<br>
<br>
Best regards<br>
<br>
Alex<br>
<br>
<br>
Michael Sumner a écrit :
<blockquote
cite="mid:AANLkTimeX93exEmfWbW-gQ8TMvBzxrESinGduc7M_pUx@mail.gmail.com"
type="cite">
<pre wrap="">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:
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip">http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip</a>
<a class="moz-txt-link-freetext" href="http://osgeo-org.1803224.n2.nabble.com/Support-for-reading-GDAL-datasets-in-compressed-archives-gz-and-zip-td2035285.html">http://osgeo-org.1803224.n2.nabble.com/Support-for-reading-GDAL-datasets-in-compressed-archives-gz-and-zip-td2035285.html</a>
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
<a class="moz-txt-link-rfc2396E" href="mailto:alexandre.villers@cebc.cnrs.fr"><alexandre.villers@cebc.cnrs.fr></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Good afternoon,
I know this not the most appropriate place to post this message but I hope
that some of you have already been confronted to the same problem.
I have a lot of NDVI tiff files that have been compressed with gzip
(filename such as 81jul15a.n07-VIg_data.tif.gz ) and that I need to
geoprocess with R. I would like to unzip the tif from within R but was not
able to properly understand how to connect to the gz file and unzip it with
this with function gzfile.
Anybody with some lines of codes hanging that would save my afternoon (and
help me understand how the connection works) ?
Best regards and thanks for any help.
Alex
--
Alexandre Villers
PhD.
AgriPop
Centre d'Etudes Biologiques de Chizé-CNRS UPR1934
79360 Beauvoir sur Niort
Phone +33 (0)5 49 09 96 13
Fax +33 (0)5 49 09 65 26
__________ Information from ESET Mail Security, version of virus signature
database 5171 (20100604) __________
The message was checked by ESET Mail Security.
<a class="moz-txt-link-freetext" href="http://www.eset.com">http://www.eset.com</a>
_______________________________________________
R-sig-Geo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-sig-Geo@stat.math.ethz.ch">R-sig-Geo@stat.math.ethz.ch</a>
<a class="moz-txt-link-freetext" href="https://stat.ethz.ch/mailman/listinfo/r-sig-geo">https://stat.ethz.ch/mailman/listinfo/r-sig-geo</a>
</pre>
</blockquote>
<pre wrap=""><!---->
__________ Information from ESET Mail Security, version of virus signature database 5172 (20100604) __________
The message was checked by ESET Mail Security.
<a class="moz-txt-link-freetext" href="http://www.eset.com">http://www.eset.com</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Villers
PhD.
AgriPop
Centre d'Etudes Biologiques de Chizé-CNRS UPR1934
79360 Beauvoir sur Niort
Phone +33 (0)5 49 09 96 13
Fax +33 (0)5 49 09 65 26</pre>
<br>
<br>
__________ Information from ESET Mail Security, version of virus signature database 5172 (20100604) __________<br>
<br>
The message was checked by ESET Mail Security.<br>
<A HREF="http://www.eset.com">http://www.eset.com</A><br>
</body>
</html>