Skip to content
Prev 172969 / 398503 Next

image2GRID

Hi all, 

i have a SpatialPixelsDataFrame object, which is a result of kriging in R.
What i would like to do is to convert this object to image (geoTiff) so that
i could use it in Gis application. I have tried using this image2Grid
function but it doesen't work. Here is the code :

im<-image(pCir)    #pCir is the SpatialPixelsDataFrame object which is the
result of kriging, with var1.pred          
                           the attribute that i would like to convert to
image. This part work, i get an image 
                          drawn...

out <- image2Grid(im)  # here I get this message : Error in image2Grid(im) :
image must have components x, 
                               y, and z

writeGDAL(out, "out.tif")