[R-sig-Geo] coercing SpatialGrid to SpatialPoints
David Holstius
david.holstius at berkeley.edu
Fri Jul 8 20:18:34 CEST 2011
Hi all,
I'm trying to figure out why coercing a SpatialGrid directly to a SpatialPoints doesn't result in the same thing as coercing it via an intermediate SpatialPixels. Here's a minimal example:
require(sp)
grd <- SpatialGrid(GridTopology(c(0,0), c(10,10), c(4,4)))
as(as(grd, "SpatialPixels"), "SpatialPoints") # result == what I expect
as(grd, "SpatialPoints") # result != expected
Is this behavior as expected? Maybe I am doing it wrong?
Many thanks,
David
--
David Holstius
PhD Student in Environmental Health Sciences
UC Berkeley School of Public Health
More information about the R-sig-Geo
mailing list