[GRASS-user] Calling GRASS scripts from GRASS C modules
Markus Neteler
neteler at osgeo.org
Mon Mar 21 18:27:45 EDT 2011
On Mon, Mar 21, 2011 at 5:03 PM, Monica Buescu
<monicabuescu1985 at gmail.com> wrote:
> Greetings
> I'm building a segmentation and statistical image analysis module (in C) and
> I want to call a grass script. Is it possible inside a GRASS C module? If
> so, How can I do that? (or can anyone give me an online example=
You can use the popen() function. See for example:
http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/raster/r.statistics/o_median.c#L22
Markus
More information about the grass-user
mailing list