[GRASS-user] scripting efficiency

Moritz Lennert mlennert at club.worldonline.be
Fri Oct 18 03:00:41 PDT 2013


On 16/10/13 07:59, Wiley Bogren wrote:
> hi GRASS community!
>
> I'm amazed how well this software handles vector operations - especially
> the overlay operation seems unparalleled in open source software.  Thank
> you very much to everyone who has been involved in the development process!
>
> I would like to script a workflow where I apply the same set of
> operations on a few hundred sets of shapefiles, consisting of v.in.ogr,
> several sets of v.overlay, some database operations and v.out.ogr.  The
> shapefiles are 20-30MB apiece, containing many polygons, each with many
> vertices.
>
> Is there a difference in speed or processor efficiency between the
> different scripting approaches?  By which I mean python vs bash shell,
> and within the GRASS environment vs calling the functions from outside
> the environment (like via python grass.script).
>
> Thank you for any opinions or advice!

I see that no one ever answered this. AFAIK, speed will depend on how 
much you do in the script and how much you have GRASS modules do. The 
latter don't change their speed depending on the scripting language 
calling them, so if you only use the script to link different GRASS 
modules, I would think that time difference will be negligible between 
languages.

Moritz


More information about the grass-user mailing list