[STATSGRASS] using R and gstat inside a C module

Hamish hamish_nospam at yahoo.com
Mon Oct 23 23:54:24 EDT 2006


G. Allegri wrote:
> I know it sounds quite strange what I'm trying to do, and maybe it
> isn't the best way to do it.
> What I meant to do is an interactive (through a GUI interface to
> develop) tool to elaborate hydrogeochemical datas about acquifer
> pollution defense. It should be used by an end-user as a Decision
> Support System tool. It will use raster and vector input data to be
> treated with mapalgebra and geostatisitcal analysis. The worst problem
> is that it should be, somehow, platform independent.
> I'm not a professional programmer, I'm a geologist, and surely it
> would be easiar to work with scripting then C coding, but it gets
> harder to develop the "wizard" interface...
> In regard using R in an interactive way: I would like to "grep" simply
> the output (as standard output or ascii file) and  then use it for my
> purposes.
> Could you suggest me a way to implement this "stange" architecture?
> Giovanni
> 
> P.S.: I'm considering the web interface way too...


just a hint about what the next multi-platform GUI for GRASS will use.

Currently grass uses tcl/tk as a multi-platform GUI frontend.

You can use the g.parser module to create a (static) GUI frontend to a
shell script. (see any of the grass 6 scripts and g.parser help page for
an example)

After some deliberation the next GRASS GUI will be based on WxPython, so
that may be an obvious choice for you. Some initial infrastructure &
examples have been added to the GRASS 6.3 source code, see
gui/wxpython/.

Also, perhaps the new SWIG interface is useful for you, that's in swig/
in the grass source code. Right now it has some perl and python
bindings, but that can be extended to Java, etc as well. Roger: could
this be a better way to code the GRASS<->R interface? (or is it fine
as-is?)

I don't know enough about either to tell you what's the best or easiest
path (or not), but fyi those are two available methods under active
development (better support) and perhaps warrant some investigation.
Note it's still early days for both SWIG and WxPython in GRASS.


> Look at this http://les-ejk.cz/?cat=pywps

another to check out is Markus's PHP earthquake map:
  http://grass.itc.it/spearfish/php_grass_earthquakes.php


good luck - it sounds like a neat project and I think all the
ingredients to the recipe are here, just need the right glue.


Hamish




More information about the grass-stats mailing list