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