<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Thiago,<br>
    <br>
        No meu caso eu extrai qual é o pixel pela função cellFromXY() ,
    como o exemplo do Luciano, mas alem do número do pixel gostaria que
    fosse retornada as coordenadas do pixel, teria alguma sugestão,
    segue CRM,<br>
    <br>
    require(raster)<br>
    require(sp)<br>
    <br>
    ## Criando um raster<br>
    r <- raster(nc=10, nr=10)<br>
    r <- setValues(r, round(runif(ncell(r))* 255))<br>
    <br>
    ##Pontos selecionados<br>
    x<-c(44.25,33.06,63.22,71.35)<br>
    y<-c(22.00,81.90,15.18,71.03)<br>
    pontos <- SpatialPoints(cbind(x,y))#cbind-junta duas colunas em
    uma, no caso as coordenadas<br>
    cellFromXY(r,pontos)<br>
    plot(r)<br>
    points(pontos, col="red")<br>
    <br>
    <br>
    Obrigado,<br>
    <br>
    <br>
    Alexandre<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Em 16/01/2014 16:00, Luciano F. Sgarbi
      escreveu:<br>
    </div>
    <blockquote
cite="mid:CAJpKj8=XJ35CY8Rq3sbhxtUQUhzekpk_YSxejE4gZimG_gzkjg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">Muito
          obrigado Thiago.</div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">Era
          exatamente isso.</div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">Abraço</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">Em 16 de janeiro de 2014 16:52, Thiago
          V. dos Santos <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:thi_veloso@yahoo.com.br" target="_blank">thi_veloso@yahoo.com.br</a>></span>
          escreveu:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>
              <div
                style="font-size:12pt;font-family:HelveticaNeue,Helvetica
                Neue,Helvetica,Arial,Lucida Grande,sans-serif">
                <div>
                  cellFromXY deve funcionar, veja abaixo</div>
                <div
                  style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,'Helvetica
                  Neue',Helvetica,Arial,'Lucida Grande',sans-serif">
                  <br>
                </div>
                <div
                  style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,'Helvetica
                  Neue',Helvetica,Arial,'Lucida Grande',sans-serif">>
                  cellFromXY(r,xy)</div>
                <div><span></span></div>
                <div>[1] 1</div>
                <div> </div>
                <div>Saudações,<br>
                  --<br>
                  Thiago V. dos Santos<br>
                  PhD student<br>
                  Land and Atmospheric Science<br>
                  University of Minnesota<br>
                  <a moz-do-not-send="true"
href="http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm"
                    target="_blank">http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm</a><br>
                  Phone: <a moz-do-not-send="true"
                    href="tel:%28612%29%20323%209898"
                    value="+556123239898" target="_blank">(612) 323 9898</a></div>
                <div style="display:block"> <br>
                  <br>
                  <div style="font-family:HelveticaNeue,'Helvetica
                    Neue',Helvetica,Arial,'Lucida
                    Grande',sans-serif;font-size:12pt">
                    <div style="font-family:HelveticaNeue,'Helvetica
                      Neue',Helvetica,Arial,'Lucida
                      Grande',sans-serif;font-size:12pt">
                      <div>
                        <div class="h5">
                          <div dir="ltr"> <font face="Arial"> On
                              Thursday, January 16, 2014 11:11 AM,
                              Luciano F. Sgarbi <<a
                                moz-do-not-send="true"
                                href="mailto:luciano.f.sgarbi@gmail.com"
                                target="_blank">luciano.f.sgarbi@gmail.com</a>>
                              wrote:<br>
                            </font> </div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div class="h5">
                            <div>
                              <div dir="ltr">
                                <div>
                                  <div><font face="verdana, sans-serif">Boa
                                      tarde pessoal...</font></div>
                                  <div><font face="verdana, sans-serif"><br>
                                    </font></div>
                                  <div>
                                    <font face="verdana, sans-serif">Preciso
                                      saber dentro de qual célula uma
                                      determinada coordenada se
                                      encontra, tentei várias soluções
                                      'tabajara' mas nenhuma deu certo.</font></div>
                                  <div><font face="verdana, sans-serif"><br>
                                    </font></div>
                                  <div><font face="verdana, sans-serif"><br>
                                    </font></div>
                                  <div><font face="verdana, sans-serif">###
                                      Vamos então ao exemplo:</font></div>
                                  <div><font face="verdana, sans-serif">r
                                      <- raster()</font></div>
                                  <div><font face="verdana, sans-serif">values(r)
                                      <- sort(rnorm(64800))</font></div>
                                  <div><font face="verdana, sans-serif">plot(r)</font></div>
                                  <div><font face="verdana, sans-serif">###
                                      aqui eu gostaria de saber qual é a
                                      célula que uma determinada
                                      coordenada se encontra.</font></div>
                                  <div><font face="verdana, sans-serif">###
                                      mas como?</font></div>
                                  <div><font face="verdana, sans-serif">###
                                      se alguém puder me dar uma ajuda
                                      ficarei grato.</font></div>
                                  <div>
                                    <font face="verdana, sans-serif">###
                                      Por exemplo, qual seria a celula
                                      que as coordenadas 'xy' (abaixo)
                                      se encontram?</font></div>
                                  <div><font face="verdana, sans-serif">xy
                                      <- c(-179.6,89.6)</font></div>
                                  <div><font face="verdana, sans-serif"><br>
                                    </font></div>
                                  <div><font face="verdana, sans-serif">Abraços,</font></div>
                                  <div><font face="verdana, sans-serif">Luciano
                                      F. Sgarbi</font></div>
                                </div>
                                <div><br>
                                </div>
                                -- <br>
                                <div dir="ltr">
                                  <div><font color="#444444"
                                      face="courier new, monospace"><i><span
style="font-size:12.727272033691406px">Luciano F. Sgarbi</span><br>
                                      </i></font></div>
                                  <div><font color="#444444"
                                      face="courier new, monospace"><i><a
                                          moz-do-not-send="true"
                                          rel="nofollow"
                                          href="http://lattes.cnpq.br/9788198135883354"
                                          target="_blank"> Currículo
                                          Lattes</a><br
                                          style="font-size:12.727272033691406px">
                                      </i></font><i
                                      style="color:rgb(68,68,68)"><span
style="font-size:12.727272033691406px">Dep. Ecologia, </span><span
                                        style="font-size:12.727272033691406px">Instituto
                                        de Ciências Biológicas I</span></i><font
                                      color="#444444" face="courier new,
                                      monospace"><i><br>
                                      </i></font>
                                    <div style=""><i><font
                                          color="#444444"><font
                                            style="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></font></i></div>
                                  </div>
                                </div>
                              </div>
                            </div>
                            <br>
                          </div>
                        </div>
                        _______________________________________________<br>
                        R-br mailing list<br>
                        <a moz-do-not-send="true"
                          href="mailto:R-br@listas.c3sl.ufpr.br"
                          target="_blank">R-br@listas.c3sl.ufpr.br</a><br>
                        <a moz-do-not-send="true"
                          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
                          moz-do-not-send="true"
                          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>
                        <br>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            R-br mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
            <a moz-do-not-send="true"
              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 moz-do-not-send="true"
              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>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr">
          <div><font color="#444444" face="courier new, monospace"><i><span
                  style="font-size:12.727272033691406px">Luciano F.
                  Sgarbi</span><br>
              </i></font></div>
          <div><font color="#444444" face="courier new, monospace"><i><a
                  moz-do-not-send="true"
                  href="http://lattes.cnpq.br/9788198135883354"
                  target="_blank"> Currículo Lattes</a><br
                  style="font-size:12.727272033691406px;background-color:rgb(255,255,255)">
              </i></font><i
              style="color:rgb(68,68,68);font-family:'courier
              new',monospace"><span
                style="font-size:12.727272033691406px">Dep. Ecologia, </span><span
                style="font-size:12.727272033691406px">Instituto de
                Ciências Biológicas I</span></i><font color="#444444"
              face="courier new, monospace"><i><br>
              </i></font>
            <div style="background-color:rgb(255,255,255)"><i><font
                  color="#444444"><font
                    style="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></font></i></div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
R-br mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a>
<a class="moz-txt-link-freetext" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a class="moz-txt-link-freetext" href="http://www.leg.ufpr.br/r-br-guia">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
======================================================================
Alexandre dos Santos
Proteção Florestal 
IFMT - Instituto Federal de Educação, Ciência e Tecnologia de Mato Grosso
Campus Cáceres
Caixa Postal 244
Avenida dos Ramires, s/n
Bairro: Distrito Industrial 
Cáceres - MT                      CEP: 78.200-000
Fone: (+55) 65 8132-8112 (TIM)   (+55) 65 9686-6970 (VIVO)
<a class="moz-txt-link-abbreviated" href="mailto:e-mails:alexandresantosbr@yahoo.com.br">e-mails:alexandresantosbr@yahoo.com.br</a> 
        <a class="moz-txt-link-abbreviated" href="mailto:alexandre.santos@cas.ifmt.edu.br">alexandre.santos@cas.ifmt.edu.br</a> 
Lattes: <a class="moz-txt-link-freetext" href="http://lattes.cnpq.br/1360403201088680">http://lattes.cnpq.br/1360403201088680</a>                   
======================================================================
</pre>
  </body>
</html>