[GRASS-user] Run a GRASS module from a custom module (C language)

Vaclav Petras wenzeslaus at gmail.com
Mon Feb 25 08:28:58 PST 2013


On 22 February 2013 14:40, José María Michia Roberts
<jose.maria.michia at gmail.com> wrote:
> I want to write a module to automatically do a large number of
> "import/process/export" tasks , but I cannot figure out how to run
> "v.in.ogr" from C program (I do not understand how to process and
> export, but maybe I can understand it after getting import).
>
> I've this functionality working on a "Python script", but I hope to
> get better performance writing this application in C language (source
> is very large).
>
Hi, maybe you already did, but note that you can profile you Python
script to find the time consuming places (before rewriting all in C).

How to use Python profiler for GRASS Python script and visualize the
result is described here:

http://grasswiki.osgeo.org/wiki/Tools_for_Python_programming#cProfile

Feel free to edit or ask if the page is not complete.

Vaclav


More information about the grass-user mailing list