Hi, not sure if sp already has something like this, but it's fairly
simple anyway. I have this function in the package "trip". "x" is a
standard R XYZ list object, as expected by image():


image2Grid <- 
function (x, p4 = NA) 
{
    if (!all(names(x) %in% c("x", "y", "z"))) 
        stop("image must have components x, y, and z")
    cells.dim <- dim(x$z)
    xx <- x$x
    yy <- x$y
    lx <- length(xx)
    ly <- length(yy)
    if (all(c(lx, ly) == (cells.dim + 1))) {
        print("corners")
        xx <- xx[-1] - diff(xx[1:2])/2
        yy <- yy[-1] - diff(yy[1:2])/2
    }
    SpatialGridDataFrame(GridTopology(c(xx[1], yy[1]), c(diff(xx[1:2]), 
        diff(yy[1:2])), cells.dim), data.frame(z = as.vector(x$z[, 
        ncol(x$z):1])), proj4string = CRS(p4))
}


==============Original message text===============
On Wed, 24 Oct 2007 12:34:17 +1100 paallen@attglobal.net wrote:

Hi all,

I have gridded some data using akima's
interp.new() function.  I now want to export to
something that ArcGIS can read directly.  I was
thinking about something like a geotiff, or a
simple bil.

How do I export this akima list object using gdal?
 In know that I have to convert the list to a
spatialgrid but I just cannot manage it.

thanks,

Phillip J. Allen
Geochemist.

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

===========End of original message text===========



If it wasn't backed-up, then it wasn't important. ~ Anon sysadmin

Mike Sumner (Phd. Candidate)
http://www.antcrc.utas.edu.au/~mdsumner/ http://www.zoo.utas.edu.au/awru/  IASOS/AWRU
University of Tasmania
Private Bag 80
Hobart Tasmania 7001
AUSTRALIA
Email: mdsumner@utas.edu.au 
Phone: 03 6226 1752 (W)
       0408599921   (M)
Fax:   03 6226 2745


