[GRASS-user] Using GRASS modules outside GRASS

Glynn Clements glynn at gclements.plus.com
Wed Aug 10 11:28:37 EDT 2011


Jana Krajcovicova wrote:

> When I use a grass module inside a script, Init.sh is not executed so all
> necessary env. variables need to be set either inside the script itself, or
> in system .bashrc file.
> I've set the GIS_LOCK back to $$ (i.e., PID number). What happens is this:
> when I run a script containing GRASS modules, no Init.sh process is
> initiated so $GISBASE/etc/lock is not executed. Does it mean that I need to
> execute the $GISBASE/etc/lock explicitly inside my script?

Yes, if you want to lock the mapset for the duration of the script.

This is only really necessary if concurrent access may occur
automatically (without human intervention). Otherwise, you just need
to remember not run multiple concurrent commands in a single mapset.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list