[R-sig-Geo] Beginners question: From text-raster to grid / map

PEP Serra Diaz Josep.Serra at uab.cat
Fri Sep 17 13:16:36 CEST 2010


Dear R-SIGers,

I would like to know which function to use in order to plot a map.

I know my origin of coordinates (x=2,y=8), and my resolution (2)

And I have an ASCII/txt file as an output matrix 

3 6 7 4
2 3 4 5
4 5 5 6

I would like to plot a map for these values and/or alternatively get a table like that (in other words, assign coordinates to each value of the text.file (matrix))

X Y VALUE
2 8 4
4 8 5
6 8 5
8 8 6
2 8 2
4 8 3 
6 8 4 
8 8 5
2 8 3
4 8 6
6 8 7 
8 8 4


Thanks,

Pep



More information about the R-sig-Geo mailing list