LAUNCHING GRASS FROM A SCRIPT?
mike at ce.umanitoba.ca
Mon Jan 22 07:00:00 EST 1996
> Hello Grass users
> I was wondering if GRASS (version 4.1) could be launched by means of a scrip
> where variables such as mapset and location could be included in that script.
> asically I want to avoid the initial "interactive" interface and pass to comm
> d line (or again
> launch commands) from the script.
> Thanks for any reply.
I've been absent from the list for a couple of weeks, and I'm sure everybody is
getting sick of this topic, but I'll get my 2 bits in anyway.
Angela, you've gotten some good advice from other (more knowledgeable) people.
I am a relative novice, so my approach is very simple. If you are also a novi
ce, you might appreciate this uncomplicated form of running GRASS.
I have a file with GRASS environment variables which I source. That's basicall
y all you need. There are a few exceptions, however. You need to set an addit
ional variable at the time you execute commands such as v.digit.
Here are the commands I use to start GRASS non-interactively:
setenv GIS /home/ce/u3/GRASS/GRASS4.1
setenv GISBASE $GIS
setenv GISDBASE /home/ce/u3/GRASS/GRASSdata
setenv GISRC $HOME/.grassrc
set path = ( $path $GISBASE/bin $GISBASE/scripts $GISBASE/garden/bin )
set path = ( $path /home/ce/u3/mike/CPSS )
setenv XDRIVER_HEIGHT 500
setenv XDRIVER_WIDTH 1140
setenv XDRIVER_LEFT 1
setenv XDRIVER_TOP 369
setenv DIGITIZER none
setenv LOCATION $GISDBASE/wuskwatim
setenv MAPSET $LOCATION/mike
To start v.digit, I have a small script:
Department of Civil & Geological Engineering
University of Manitoba
More information about the grass-user