<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Sir,<br><pre><i>My project is based on batch processing in GRASS GIS.Operating system is LINUX.<br>I am using GRASS63<br></i>><i> The following steps have been performed.<br></i>><i> 1)v.in..db<br></i>><i> 2)v.to.rast<br></i>><i> 3)r.surf.idw<br></i>><i><br></i>><i> The next step is to do batch processing on the above mapset and the above<br></i>><i> output should be displayed within a particular interval time given by the<br></i>><i> user.scripting is done here.I'm not familiar with scripting language.<br></i>><i><br></i>><i> #!/bin/sh<br></i>><i> TMPDIR=/tmp<br></i>><i><br></i>><i> MAINDIR=/Computer/disk/ProgramFiles/QuantumGIS<br></i>><i> MYUSER=$HOME/gbase<br></i>><i> export GISBASE=$MAINDIR/grass<br></i>><i> # the file contains the GRASS variables which define the LOCATION etc.<br></i>><i> echo "GISDBASE:
$HOME/gbase<br></i>><i> LOCATION_NAME: Kerala<br></i>><i> MAPSET: PERMANENT<br></i>><i> " > $TMPDIR/.my_grassjob<br></i>><i> export GISRC=$TMPDIR/.my_grassjob<br></i>><i><br></i>><i> export PATH=$GISBASE/bin:$GISBASE/scripts:$PATH<br></i>><i> export LD_LIBRARY_PATH=$MAINDIR/lib:$GISBASE/lib:$LD_LIBRARY_PATH<br></i>><i><br></i>><i> # settings for graphical output<br></i>><i> PNGOUTPUTDIR=$TMPDIR<br></i>><i> # current date<br></i>><i> DATE=`LC_ALL=C date -R | tr -s ' ' ' ' | cut -d' ' -f2,3,4 | tr -s ' ' '_'`<br></i>><i> export GRASS_PNGFILE=$PNGOUTPUTDIR/gbase_${DATE}.png<br></i>><i> export GRASS_TRUECOLOR=TRUE<br></i>><i> export GRASS_WIDTH=900<br></i>><i> export GRASS_PNG_COMPRESSION=1<br></i>><i><br></i>><i> # use process ID (PID) as lock file number:<br></i>><i> export GIS_LOCK=$$<br></i>><i><br></i>><i><br></i>><i> ##### the algorithms goes here<br></i>><i><br></i>><i>
error_routine () {<br></i>><i> echo "ERROR: $1"<br></i>><i> exit 1<br></i>><i> }<br></i>><i><br></i>><i><br></i>><i> # set region to default settings (here: world)<br></i>><i> g.region -d || error_routine "g.region"<br></i>><i><br></i>><i> #open PNG output<br></i>><i> d.mon start=PNG || error_routine "d.mon start=PNG"<br></i>><i><br></i>><i><br></i>><i><br></i>><i> # import the maps:<br></i>><i> v.in.db driver=mysql database=Kerala table=rain x=LON y=LAT output=Location<br></i>><i> key=ID || error_routine "v.in.db"<br></i>><i> v.to.rast input=Location output=Loca use=attr column=ELEV_FT ||<br></i>><i> error_routine "v.to.rast"<br></i>><i> r.surf.idw input=Loca output=surfloca || error_routine "r.surf.idw"<br></i>><i><br></i>><i><br></i>><i><br></i>><i> # display<br></i>><i> d.vect Location || error_routine "d.vect"<br></i>><i><br></i>><i> d.rast
Loca column=class type=point \<br></i>><i> themetype=graduated_points maxsize=20 nint=6 || error_routine "d.rast"<br></i>><i> d.rast surfloca || error_routine "d.rast"<br></i>><i><br></i>><i> # close PNG output<br></i>><i> d.mon stop=PNG || error_routine "d.mon stop"<br></i>><i><br></i>><i> # remove imported map, no longer needed:<br></i>><i> g.remove vect=Location || error_routine "g.remove"<br></i>><i> rm -f $TMPDIR/ $TMPDIR/<br></i>><i><br></i>><i> # remove internal tmp stuff:<br></i>><i> $GISBASE/etc/clean_temp || error_routine "clean_temp"<br></i>><i> rm -rf $TMPDIR/grass6-$USER-$GIS_LOCK<br></i>><i><br></i>><i> # done.<br></i>><i> echo "Generated $GRASS_PNGFILE"<br></i>><i><br></i>><i> Then the above script is performed by these steps:<br></i>><i><br></i>><i> chmod u+x $HOME/my_grassjob.sh<br></i>><i> export
GRASS_BATCH_JOB=$HOME/my_grassjob.sh<br></i>><i> grass63 ~/grassdata/spearfish60/neteler/<br></i>><i><br></i>><i> Problem is concurrent users cannot access it.Display window never opens,<br></i>><i> what is wrong with the above script codings.Please correct it and reply as soon as possible .Also guide me<br></i>><i> how to set the time intervals in batch processing.<br></i>><i><br></i>><i> Thank You in advance.<br></i>><i><br></i>><i> Regards<br></i></pre><br><br></td></tr></table><br>