It seems that the batch job is easy,however I still have some questions: 1) during my process the location and mapset maybe changed, can it be set in the script file? 2) My application is to support multiple users, so each user should have a gisrc file, can it be set before run the batch job?
2010/3/2 Markus Neteler <nete...@osgeo.org> > On Tue, Mar 2, 2010 at 12:05 PM, maven apache <apachemav...@gmail.com> > wrote: > > Hi: > > I have post this problem before, I want to run grass in command line > model > > so I can call them in java at that time,however it often cause some > > unexpeced errors. > > So today I change to Ubuntu, and I install grass use sudo apt-get install > > grass. > > > > Now I also want to call grass in my java code but in the Ubuntu platform, > I > > want to know which environment variables are needed, so I did some > tests. > > First I run grass in text model in the ternimal by " grass -text", > > and I chose the location and mapset,it works, then I use command "set > > > /home/kk/var" to get all the environment variablse using by grass ,then I > > open a new ternimal to get the normal env vars by " set > /home/kk/varn" > . > > Then I compare the two files and tried to find the differences. I found > > that there are more variables in the varn rather than var (shown below): > > ----------- > > GISBASE=/usr/lib/grass64 > > GISRC=/tmp/grass6-kk-9581/gisrc > > GIS_LOCK=9581 > > GRASS_GNUPLOT='gnuplot -persist' > > GRASS_HTML_BROWSER=x-www-browser > > GRASS_LD_LIBRARY_PATH=/usr/lib/grass64/lib > > GRASS_PAGER=pager > > GRASS_PERL=/usr/bin/perl > > GRASS_PROJSHARE=/usr/share/proj > > GRASS_PYTHON=python > > GRASS_SH=/bin/sh > > GRASS_TCLSH=tclsh > > GRASS_VERSION=6.4.0RC5 > > GRASS_WISH=wish > > ----------- > > So I want to know if these vars are enough? > > I have no idea. But it is way easier to use GRASS in batch mode: > > http://grass.osgeo.org/wiki/GRASS_and_Shell#GRASS_Batch_jobs > > Markus >
_______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user