It seems that the batch job is easy,however I still have some questions:<br>1) during my process the location and mapset maybe changed, can it be set in the script file?<br>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?<br>
<br><div class="gmail_quote">2010/3/2 Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Tue, Mar 2, 2010 at 12:05 PM, maven apache <<a href="mailto:apachemaven0@gmail.com">apachemaven0@gmail.com</a>> wrote:<br>
> Hi:<br>
> I have post this problem before, I want to run grass in command line model<br>
> so I can call them in java at that time,however it often cause some<br>
> unexpeced errors.<br>
> So today I change to Ubuntu, and I install grass use sudo apt-get install<br>
> grass.<br>
><br>
> Now I also want to call grass in my java code but in the Ubuntu platform, I<br>
> want to know which environment variables are needed, so I did some tests.<br>
> First I run grass in text model in the ternimal by " grass -text",<br>
> and I chose the location and mapset,it works, then I use command "set ><br>
> /home/kk/var" to get all the environment variablse using by grass ,then I<br>
> open a new ternimal to get the normal env vars by " set > /home/kk/varn" .<br>
> Then I compare the two files and tried to find the differences. I found<br>
> that there are more variables in the varn rather than var (shown below):<br>
> -----------<br>
> GISBASE=/usr/lib/grass64<br>
> GISRC=/tmp/grass6-kk-9581/gisrc<br>
> GIS_LOCK=9581<br>
> GRASS_GNUPLOT='gnuplot -persist'<br>
> GRASS_HTML_BROWSER=x-www-browser<br>
> GRASS_LD_LIBRARY_PATH=/usr/lib/grass64/lib<br>
> GRASS_PAGER=pager<br>
> GRASS_PERL=/usr/bin/perl<br>
> GRASS_PROJSHARE=/usr/share/proj<br>
> GRASS_PYTHON=python<br>
> GRASS_SH=/bin/sh<br>
> GRASS_TCLSH=tclsh<br>
> GRASS_VERSION=6.4.0RC5<br>
> GRASS_WISH=wish<br>
> -----------<br>
> So I want to know if these vars are enough?<br>
<br>
</div></div>I have no idea. But it is way easier to use GRASS in batch mode:<br>
<br>
<a href="http://grass.osgeo.org/wiki/GRASS_and_Shell#GRASS_Batch_jobs" target="_blank">http://grass.osgeo.org/wiki/GRASS_and_Shell#GRASS_Batch_jobs</a><br>
<font color="#888888"><br>
Markus<br>
</font></blockquote></div><br>