Skip to content
Prev 17358 / 29559 Next

Error using SpatialPixelsDataFrame function

Dear R-Geo users,

I am trying to create a SP objects using SpatialPixelsDataFrame. Next I
can see the code:
Error in if (max(object at grid.index) > .NumberOfCells(object at grid))
stop("grid.index max value too large") :
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In points2grid(points, tolerance, round) :
  grid has empty column/rows in dimension 1
2: In points2grid(points, tolerance, round) :
  grid topology may be corrupt in dimension 1
3: In points2grid(points, tolerance, round) :
  grid has empty column/rows in dimension 2
4: In points2grid(points, tolerance, round) :
  grid topology may be corrupt in dimension 2
5: In getGridIndex(coordinates(points), grid) : NAs introduced by coercion

What's the problem?

PD: I can not attach data for this because the size exceeds the maximum
allowable.

Thanks in advance.