Skip to content
Prev 9658 / 29559 Next

trouble coercing SpatialPixelsDataFrame into SpatialGridDataFrame?

On Wed, 20 Oct 2010, ElenaC wrote:

            
Thanks for posting the data. The problem is that your TRUE values are 
duplicate observations, so that TRUE is assigned to the grid cell first, 
because they come "before" FALSE (observations 1:241):

length(slot(data_pixels, "grid.index"))
length(unique(slot(data_pixels, "grid.index")))
zerodist(data_pixels)

How was the data_pixels object constructed? Did you intend to have 
duplicate pixels?

Maybe the SpatialPixels constructor should warn if points are duplicated?

Hope this helps,

Roger