[R-sig-Geo] Export Kriging

Jaime R. Garcia M. jaime.garcia at uni-bonn.de
Tue Sep 1 21:59:58 CEST 2009


JAIME BURBANO GIRON wrote:
> Hi, I ran a Kriging interpolation using the function *krige (gstat)*, and i
> would like to export the results on a .txt file, for read them after in
> ArcGIS like and ASCII raster. How can i do this? I hope an answer, thanks.
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>   
Well Jaime, a little more of detail could help giving a you a more 
precise answer. I recently run the /krige /function from *gstat *and my 
result was an object (let's say env) of class "SpatialPixelsDataFrame".
So I had to convert it to a "SpatialGridDataFrame" using the /gridded/ 
and  coercion (/as)/ functions.

 > gridded(env) = TRUE
 > env = as(env, "SpatialGridDataFrame")

And then I used the function write.asciigrid
Check ?write.asciigrid
But you could also use the function readGDAL  and there are others...

Buena Suerte,

Jaime Garcia M.



More information about the R-sig-Geo mailing list