[R-sig-Geo] Export Matrix to ESRI Grid or tif file

Jean-Paul Kibambe Lubamba jean-paul.kibambe at uclouvain.be
Mon Sep 1 18:59:56 CEST 2008


Hi,

I am a new R User and I am trying to write an Ascii grid file or tiff file
from a matrix created in R.

This is what I am doing :

1. write a matrix of x-coordinates (in degrees):
x<-matrix(rep(seq(11,13,0.5), by row=T, nrow=5)

2. write a matrix of y-coordinates (in degrees):
y<-matrix(rep(seq(3,5,0.5), by row=T, nrow=5)

3. I have a function which combine my coordinates (x and y) in the
following way:
z = 0.0052 + 0.001x - 0.00023y + 0.0011xy

z is my variable of interest and I want to put it in a GIS software,
ArcGIS for example, for an analysis with other geographical dataset.

So, I want to have my matrix z as a esri grid file (or tif file or any
kind of image format file), with a cell size equal to the interval (0.5) I
gave in the 'seq' function I have previously used for x and y coordinates.
How can I proceed ?

Thanks a lot for your help.


Jean-Paul Kibambe




More information about the R-sig-Geo mailing list