<div dir="ltr">Obrigado a todos!<br></div><div class="gmail_extra"><br clear="all"><div>Tito Conte<br><br></div>
<br><br><div class="gmail_quote">2013/6/4 Luciano F. Sgarbi <span dir="ltr"><<a href="mailto:luciano.f.sgarbi@gmail.com" target="_blank">luciano.f.sgarbi@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Veja se isso funciona:</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default">
<div class="gmail_default"><font face="verdana, sans-serif">UTM.to.Lat_Long<-function(coord){</font></div><div class="gmail_default"><font face="verdana, sans-serif"><br></font></div><div class="gmail_default"><font face="verdana, sans-serif"> b=6356752.3142</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> a=6378137</font></div><div class="gmail_default"><font face="verdana, sans-serif"> e=0.0818191909</font></div><div class="gmail_default"><font face="verdana, sans-serif"> eisq=0.0067394968</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> k0=0.9996</font></div><div class="gmail_default"><font face="verdana, sans-serif"> ei=(1-(1-e*e)^(1/2))/(1+(1-e*e)^(1/2))</font></div><div class="gmail_default">
<font face="verdana, sans-serif"> C1=3*ei/2-27*ei^3/32</font></div><div class="gmail_default"><font face="verdana, sans-serif"> C2=21*ei^2/16-55*ei^4/32</font></div><div class="gmail_default"><font face="verdana, sans-serif"> C3=151*ei^3/96</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> C4=1097*ei^4/512<span style="white-space:pre-wrap"> </span></font></div><div class="gmail_default"><font face="verdana, sans-serif"> polo=coord[,1]</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> zone=coord[,2]</font></div><div class="gmail_default"><font face="verdana, sans-serif"> lon=coord[,3]</font></div><div class="gmail_default"><font face="verdana, sans-serif"> lat=coord[,4]</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> Corrected.Northing=ifelse(polo=="N",lat,10000000-lat)</font></div><div class="gmail_default"><font face="verdana, sans-serif"> East.Prime=500000-lon</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> Arc.Length=lat/k0</font></div><div class="gmail_default"><font face="verdana, sans-serif"> mu=Arc.Length/(a*(1-e^2/4-3*e^4/64-5*e^6/256))</font></div><div class="gmail_default">
<font face="verdana, sans-serif"> phl=mu+C1*sin(2*mu)+C2*sin(4*mu)+C3*sin(6*mu)+C4*sin(8*mu)</font></div><div class="gmail_default"><font face="verdana, sans-serif"> C=eisq*cos(phl)^2</font></div><div class="gmail_default">
<font face="verdana, sans-serif"> T=tan(phl)^2</font></div><div class="gmail_default"><font face="verdana, sans-serif"> N=a/(1-(e*sin(phl))^2)^(1/2)</font></div><div class="gmail_default"><font face="verdana, sans-serif"> R=a*(1-e*e)/(1-(e*sin(phl))^2)^(3/2)</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> D=East.Prime/(N*k0)</font></div><div class="gmail_default"><font face="verdana, sans-serif"> F1=N*tan(phl)/R</font></div><div class="gmail_default"><font face="verdana, sans-serif"> F2=D*D/2</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> F3=(5+3*T+10*C-4*C*C-9*eisq)*D^4/24</font></div><div class="gmail_default"><font face="verdana, sans-serif"> F4=(61+90*T+298*C+45*T*T-252*eisq-3*C*C)*D^6/720</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> LF1=D</font></div><div class="gmail_default"><font face="verdana, sans-serif"> LF2=(1+2*T+C)*D^3/6</font></div><div class="gmail_default"><font face="verdana, sans-serif"> LF3=(5-2*C+28*T-3*C^2+8*eisq+24*T^2)*D^5/120</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> delta.lon=(LF1-LF2+LF3)/cos(phl)</font></div><div class="gmail_default"><font face="verdana, sans-serif"> <a href="http://zone.cm" target="_blank">zone.cm</a>=6*zone-183</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> raw.lat=180*(phl-F1*(F2+F3+F4))/pi</font></div><div class="gmail_default"><font face="verdana, sans-serif"> LAT=ifelse(polo=="N",raw.lat,-1*raw.lat)</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> LON=zone.cm-delta.lon*180/pi</font></div><div class="gmail_default"><font face="verdana, sans-serif"> lon.deg=as.integer(LON)</font></div><div class="gmail_default">
<font face="verdana, sans-serif"> lon.min=abs(as.integer(60*(LON-lon.deg)))</font></div><div class="gmail_default"><font face="verdana, sans-serif"> lon.sec=3600*(abs(LON)-abs(lon.deg)-lon.min/60)</font></div><div class="gmail_default">
<font face="verdana, sans-serif"> lat.deg=as.integer(LAT)</font></div><div class="gmail_default"><font face="verdana, sans-serif"> lat.min=abs(as.integer(60*(LAT-lat.deg)))</font></div><div class="gmail_default"><font face="verdana, sans-serif"> lat.sec=3600*(abs(LAT)-abs(lat.deg)-lat.min/60)</font></div>
<div class="gmail_default"><font face="verdana, sans-serif"> df=data.frame(coord,LON,LAT,lon.deg,lon.min,lon.sec,lat.deg,lat.min,lat.sec)</font></div><div class="gmail_default"><font face="verdana, sans-serif"> return(df)</font></div>
<div class="gmail_default"><font face="verdana, sans-serif">}</font></div><div class="gmail_default"><font face="verdana, sans-serif"><br></font></div><div class="gmail_default"><font face="verdana, sans-serif">coord=</font><span style="font-family:verdana,sans-serif">data.frame(polo=sample(c("N","S"),100,r=T),zone=sample(0:23,100,r=T),lon=sample(0:90000,100,r=T),lat=sample (0:90000,100,r=T))</span></div>
<div class="gmail_default"><font face="verdana, sans-serif"> </font></div><div class="gmail_default"><font face="verdana, sans-serif">UTM.to.Lat_Long(coord</font><span style="font-family:verdana,sans-serif">) </span></div>
</div><div class="gmail_default"><div style="font-family:verdana,sans-serif;font-size:small"><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">Em 4 de junho de 2013 09:21, Elias Teixeira Krainski <span dir="ltr"><<a href="mailto:eliaskrainski@yahoo.com.br" target="_blank">eliaskrainski@yahoo.com.br</a>></span> escreveu:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Vc precisa informar a projeção no formato Proj4 na função project()<br>
<br>
On 03/06/13 19:08, Tito Conte wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Alguém poderia me explicar como faço a converção de utm para lat lon,<br>
<br>
estou tentando pelo rgdal, mas não consegui entender direito como funciona as funções de conversão<br>
<br>
<br>
Tito Conte<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/<u></u>cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-<u></u>guia</a>) e forneça código mínimo reproduzível.<br>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><div><i><font face="courier new, monospace"><span style="font-size:12.727272033691406px">Luciano F. Sgarbi</span></font></i><br>
</div><div><i><font face="courier new, monospace"><br style="color:rgb(34,34,34);font-size:12.727272033691406px"><span style="color:rgb(34,34,34);font-size:12.727272033691406px">Mestre em Ecologia e Evolução</span><br style="color:rgb(34,34,34);font-size:12.727272033691406px">
</font><span style="font-family:'courier new',monospace;font-size:12.727272033691406px">Dep. Ecologia, </span><span style="font-family:'courier new',monospace;font-size:12.727272033691406px">Instituto de Ciências Biológicas I</span></i><div style>
<i><font style="color:rgb(34,34,34);font-size:12.727272033691406px" face="courier new, monospace">Universidade Federal de Goiás, campus II, Goiânia-GO, </font><font face="courier new, monospace">Brasil</font></i></div></div>
</div>
</font></span></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" 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" 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>