[GRASS-user] scripting efficiency

Wiley Bogren wiley.bogren at gmail.com
Fri Oct 18 07:03:11 PDT 2013


Hi Moritz,

Thank you.  Just to check, there's nothing like a startup cost each time
you call grass from an external (bash or python) script?

-Wiley


On Fri, Oct 18, 2013 at 3:00 AM, Moritz Lennert <
mlennert at club.worldonline.be> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20131018/f1c58138/attachment.html>


More information about the grass-user mailing list