<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Boa tarde, Hélio!</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Segue uma ideia inicial...</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default"><font face="monospace, monospace">### <code r></font></div><div class="gmail_default" style=""><div class="gmail_default"><font face="monospace, monospace">setwd("D:/Temp") ### alterar aqui!</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">url <- "<a href="http://spirits.jrc.ec.europa.eu/files/ecmwf/ope/south-america/tmin/ope_south-america_tmin_20151121.zip">http://spirits.jrc.ec.europa.eu/files/ecmwf/ope/south-america/tmin/ope_south-america_tmin_20151121.zip</a>"</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">### Faz download, caso ainda não tenha sido feito....</font></div><div class="gmail_default"><font face="monospace, monospace">if (!file.exists(basename(url))) download.file(url, basename(url), mode="wb")</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">unzip(basename(url), list=T) -> fnames</font></div><div class="gmail_default"><font face="monospace, monospace"># 1 ope_south-america_tmin_20151121.img 341796 2015-12-04 11:22:00</font></div><div class="gmail_default"><font face="monospace, monospace"># 2 ope_south-america_tmin_20151121.hdr 547 2015-12-04 11:22:00</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">### descompacta</font></div><div class="gmail_default"><font face="monospace, monospace">for (fn in fnames$Name) unzip(basename(url), fn)</font></div><div class="gmail_default"><font face="monospace, monospace"><a href="http://file.info">file.info</a>(fn)</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">require(rgdal)</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">### .hdr -> header (cabeçalho) em formato texto</font></div><div class="gmail_default"><font face="monospace, monospace">GDALinfo(fnames$Name[1]) ### informações a partir do arquivo .img</font></div><div class="gmail_default"><font face="monospace, monospace">cat(readLines(fnames$Name[2]), sep="\n") ### informações do .hdr (basicamente, as mesmas)</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">img <- readGDAL(fnames$Name[1]) ### armazena em um SGDF (pacote sp)</font></div><div class="gmail_default"><font face="monospace, monospace">spplot(img)</font></div><div class="gmail_default"><font face="monospace, monospace">head(coordinates(img))</font></div><div class="gmail_default"><font face="monospace, monospace">head(img@data) ### dados - nesse caso temp. mínima</font></div><div class="gmail_default"><font face="monospace, monospace">### </code></font></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font face="arial, helvetica, sans-serif" style="font-size:small"><div style="font-family:'trebuchet ms',sans-serif;display:inline"></div>================================================<br>Éder Comunello</font><div style="font-size:small"><span style="font-family:arial,helvetica,sans-serif">PhD Student in Agricultural Systems Engineering (USP/Esalq)</span><br></div><div><span style="font-size:small">Brazilian Agricultural Research Corporation (</span><font face="arial, helvetica, sans-serif" style="font-size:small">Embrapa)</font><div style="font-size:small"><font face="arial, helvetica, sans-serif">Dourados, MS, Brazil [</font>22 16.5'S, 54 49.0'W<span style="font-family:arial,helvetica,sans-serif">]</span></div><div><div><br></div><div><br></div></div><div style="font-size:small"><br></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">Em 21 de janeiro de 2016 12:12, Hélio Gallo Rocha <span dir="ltr"><<a href="mailto:heliogallorocha@gmail.com" target="_blank">heliogallorocha@gmail.com</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Boa tarde Listeiros,<div><br></div><div>Alguém poderia me dar uma mão nesta tarefa:</div><div><br></div><div>O site <span style="font-size:11pt;line-height:107%;font-family:Calibri">: <a href="http://spirits.jrc.ec.europa.eu/" target="_blank">http://spirits.jrc.ec.europa.eu/</a></span></div><div><font face="Calibri"><span style="font-size:14.6667px;line-height:15.6933px"><br clear="all"></span></font><div>dispõem arquivos climatológicos com as extenções : img e hdr</div><div><br></div><div>Quem duipõem um CRM ou indicaria um pacote que extraia os dados e suas coordenadas?</div><div><br></div><div>Grato</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div>-- <br><div>Hélio Gallo Rocha<br>IFSULDEMINAS - Câmpus Muzambinho<br></div>
</font></span></div></div>
<br>_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" rel="noreferrer" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" rel="noreferrer" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br></div>