[R-sig-Geo] Extract values in spsample()

ASANTOS alexandresantosbr at yahoo.com.br
Sat Nov 19 16:03:05 CET 2011


Dear colleges,

     I need to create a object wit the coordinates of a grid and the values in the point sampled, using the meuse.grid example:

## regular sampling over a grid
library(sp)
data(meuse.grid)
gridded(meuse.grid) = ~x+y
image(meuse.grid["dist"])
points(spsample(meuse.grid,n=1000,type="regular"), pch=3, cex=.4)

but here I don't how I can find the value in the image associated with the grid, there are any suggestion?
Thanks,


-- 
Alexandre DOS SANTOS
Engenheiro Florestal, Msc.
Laboratório de Entomologia Florestal
Departamento de Entomologia
Universidade Federal de Lavras
Caixa Postal 3037
37200-000 - Lavras - Minas Gerais - Brasil
Tel: +55 35 92230304



More information about the R-sig-Geo mailing list