[R-sig-Geo] Problem with SpatialPolygons.SpatialPixels object

ASANTOS alexandresantosbr at yahoo.com.br
Sun Mar 17 12:54:01 CET 2013


Dear list members,

     I'm trying to create a as.SpatialPolygons.SpatialPixels object with 
sp package, normally this function works, but I try to use without 
success, above a example in this list posted by Dr. Justiniano:

##
require(sp)
set.seed(12)
xy <- cbind(runif(n=500,min=0, max=20),
              runif(n=500,min=0, max=20))
## points
pontos <- SpatialPoints(xy)
## grid of "quadrats"
## i. as SpatialGrid
grid <- SpatialGrid(grid = GridTopology(c(0.5,0.5), c(1,1), c(20,20)))
## ii. as SpatialPixels
gridPix <- grid
fullgrid(gridPix) <- FALSE
## iii. as SpatialPolygons
gridPol <- as.SpatialPolygons.SpatialPixels(gridPix)
#
     And my question is whats is happening with the 
as.SpatialPolygons.SpatialPixels() function?

Thanks

-- 
======================================================================
Alexandre dos Santos
Proteção Florestal
Coordenador do curso Técnico em Florestas
Vice Coordenador do curso de Engenharia 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)

         alexandre.santos at cas.ifmt.edu.br



More information about the R-sig-Geo mailing list