Problem with SpatialPolygons.SpatialPixels object
the function is no longer exported as function, but rather as coerce method: gridPol <- as(gridPix, "SpatialPolygons") will call this function. Calling the old function can be done with gridPol <- sp:::as.SpatialPolygons.SpatialPixels(gridPix) but is not recommended - names of unexported functions may change without warning.
On 03/17/2013 12:54 PM, ASANTOS wrote:
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
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de