[R-sig-Geo] Can coordinate intervals be not constant in SpatialPixelsDataFrame object??

Agustin Lobo alobolistas at gmail.com
Mon Jan 27 14:13:13 CET 2014


Still doubts regarding the conversion to SpatialPixelsDataFrame-
I do:
load("https://dl.dropboxusercontent.com/u/3180464/delme.rda")
class(delme)
delmepx <- SpatialPixelsDataFrame(delme, data=delme at data, tolerance=0.000856898)
delmepol <- as(delmepx,"SpatialPolygonsDataFrame")
delmepx2 <- SpatialPixelsDataFrame(coordinates(delmepol), delmepol at data)
suggested tolerance minimum: 0.000635728
Error in points2grid(points, tolerance, round) :
  dimension 1 : coordinate intervals are not constant

I understand that I must set the tolerance value to create delmepx
because the coordinate intervals
in delme are not constant. But once I've made delmepx, the intervals
for the polygon centers of delmepol
should be constant because have been derived from a
SpatialPixelsDataFrame object. Yet I get the "coordinate intervals are
not constant" error.

This is not big deal in practice (can just keep delmepx), but wish to
understand.

Thanks

Agus



More information about the R-sig-Geo mailing list