Hi,

GRASS modules are independent process running in the system. you can use
stdout,stderr redirect using boost process or any other std stream redirect
library. This way you can read from grass modules and parse the output.

Hope that helps


On Mon, Feb 18, 2013 at 7:01 PM, matteo poletti <pollo1...@yahoo.it> wrote:

> Hi,
>
> I've already posted this question in the User mailing list but maybe, as
> suggested by somebody, it should be posted here...
>
> The problem is how to call a Grass module from my code written in C++.
>
> I have already received some answers:
>
> 1 - Do a sys-call
>
> I would avoid this approach if possible. It is not very reliable and it
> requires to parse the output of the modules as strings.
>
> 2 - Use the keyword extern to call the GRASS library functionalities (
> http://grasswiki.osgeo.org/wiki/GRASS_and_C++)
>
> I have not understood if this approach is suitable also to call GRASS
> modules. If it is, can you please suggest me an example of this?
>
> Thank you for your help! And sorry for having posted this twice.
> Matteo
>
> _______________________________________________
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>



-- 
Regards,
   Rashad
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to