[GRASS-stats] Extracting x,y-coordinates from a SGDF

Johannes Signer j.m.signer at gmail.com
Tue Jul 14 02:25:18 EDT 2009


Dear List-Members,

 I encountered a problem with with importing data from GRASS to R. I found a
work around to my problem, but maybe someone is aware of a more elegant
solution.

 I imported a raster from GRASS to R with the readRAST6() method. My
ultimate goal is to get a a new data.frame which looks like this:

 x-coordinate | y-coordinate | z-value



 I managed to extract the z-value from the data slot of the SGDF, but I did
not manage to extract the x and y values.

 My current work around is to write a function recalculating the grid points
from the information provided within the SGDF. However if anyone is aware of
a easier method of how to extract x and y values from a SGDF I would be very
interested.

 Many thanks in advance

 Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-stats/attachments/20090714/4ad1bf63/attachment.html


More information about the grass-stats mailing list