[GRASS-dev] Direct link from GRASS to R via C
Rainer M Krug
Rainer at krugs.de
Mon Jul 15 08:30:03 PDT 2013
Hi
I posted on my blog an outline of an idea of how spatial data could be
easily loaded from GRASS into R and written back.
(see http://rmkrug.wordpress.com/2013/07/15/grassrlink-1/)
In a nutshell, the idea would be to use the C functions in GRASS to
write a function which returns a single column, column range or whole
raster. This function could then be called from R (via Rcpp) to get the
data into R without having to worry about intermittent exports and
imports via the hdd.
I would ike to have some input from the GRASS developer community what
they think about such a function. This function should be usable as
"stand alone", and not requiring the opening and buffer allocations et
al as in the r.example, but rather simply take the mapset, raster name,
column(s) to read, if MASK should be respected, ... arguments.
I was thinking that it would be useful to have such a function in GRASS,
as the compilation together with GRASS, in the same line as a module,
would be quite easy.
Initially, I was thinking about read and write support for rasters,
which then could be extended to vectors and 3d-rasters and possibly even
the temporal data.
Could you give feedback on what y9ou think about the idea, and how you
think it could be realized (simplicity to install would be important).
Cheers and thanks,
Rainer
--
Rainer M. Krug
email: RMKrug<at>gmail<dot>com
More information about the grass-dev
mailing list