Hello,

After kriging with the use of the krige.conv function, I would like to export my result under the grid format. In order to view it into a GIS.

It was suggested to me to use the writeGDAL function into the rgdal package. However It looks like I have a problem of supported formats (dataset object of SpatialGridDataFrame-class or SpatialPixelsDataFrame-class ) that is not the same as the one resulting from my krige.conv function (kriging -class apparently)

I tried several function to achieve this conversion (getRasterData, SpatialGridDataFrame, SpatialPixelsDataFrame, create2GDAL, points2grid...). But without any success.

#my actual kriging script:
pred.grid = expand.grid(seq(170000, 130000, l = 50), seq(190000, 160000, l = 50)) myPred = krige.conv(myGData, loc = pred.grid, krige = krige.control(obj.m = myOLSMod))
image(myPred, loc = pred.grid, col = gray(seq(1, 0.1, l = 30)))

#my conversion attempts
tf <- tempfile()
writeGDAL(myPred, tf, drivername="GTiff", type="Byte", options=NULL)
[Erreur dans function (classes, fdef, mtable) : unable to find an inherited method for function "gridded", for signature "kriging"]

Thanks a lot,

Nicolas

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to