problems in interface
Phil.Watson at newcastle.ac.uk
Phil.Watson at newcastle.ac.uk
Tue Aug 23 08:11:41 EDT 1994
> I am a new user in GRASS. I have a problem in GRASS.
>Does anyone knows how to excute GRASS command or scripts
>in external? In the other word, I excute d.3d or d.rast
>and so on not in "GRASS4.1>" prompt. I would write a
>interface between GRASS & another exppert system.
I wrote the following script a couple of years ago to see how this
could be done (we didn't need to in the end). I'm sure that it could
be a lot prettier but at least it's a starting point ! To find out what
the variables need to be set to on your system, it's easiest to start
grass and type "printenv |more" (assuming you use csh).
The files:
----------<< grassrc_test >>----------
GISDBASE: /data/grass
LOCATION_NAME: tyne
MAPSET: phil
----------<< exec_grass >>----------
#!/usr/bin/csh
set path= (/user/grass/sun4/bin /user/grass/sun4/scripts /user/grass/sun4/garden/bin /user/grass/sun4/alpha/bin /usr/local/bin /usr/bin /usr/ucb /etc /usr/etc /usr/lib)
setenv GISBASE /user/grass/sun4
setenv GISDBASE /data/grass
setenv GISRC grassrc_test
setenv LOCATION /data/grass/tyne/phil
setenv LOCATION_NAME tyne
setenv MAPSET phil
g.list rast
Phil Watson (an ozzie in exile) | _--_|\ | CLUWRR |
phil.watson at newcastle.ac.uk | / \ | Agric & Environmental Science|
| \_.--._/ | Uni of Newcastle-Upon-Tyne |
Phone: (091) 222 7503 | v | England, NE1 |
More information about the grass-user
mailing list