[GRASSLIST:3431] Re: batching the export process
SWlab
swlab at cornell.edu
Mon May 17 13:02:49 EDT 2004
[Monday 17 May 2004 11:44] From Kirk R. Wythers
Hi Kirk,
Speaking of experience, you don't want to run a long script in a current GRASS
session, unless you have plenty of time before you and no need of GRASS
meanwhile. The easiest is to run an alternate session. From various info
gathered on the mailing list, I came with this small script (a complete
ripoff from Glynn Clements <glynn.clements at virgin.net>): you have to define
the location and mapset (existing ones) in the first lines, add your export
commands in the third section, and just run the script. That's OK as long as
your export commands remain in the same mapset and that you don't intend to
display anything (else you may run into some troubles).
I guess that the easiest would be to use r.out.tiff for your DOQQs. Just
browse through your rasters, you can access the list in
$GISDBASE/$LOCATION_NAME/$MAPSET/cell
Consider the size of the files if you have a lot of them...
Regards
P.
#######################################################################
# Define temp file
TEMPFILE=.grasstemp$$
cat > $TEMPFILE << ENDOFGISRC
GISDBASE: /home2/grassdata/
LOCATION_NAME: NY109.UTM83
MAPSET: DOQQs
ENDOFGISRC
######################################################################
GISBASE=/usr/local/grass53
GISRC=${TEMPFILE}
GIS_LOCK=$$
TCLTKGRASSBASE=$GISBASE/tcltkgrass
GRASS_GNUPLOT=gnuplot
GRASS_PAGER=less
GRASS_PERL=perl
GRASS_TCLSH=tclsh
GRASS_WISH=wish
PATH=$GISBASE/bin:$GISBASE/scripts:$PATH
MANPATH=$GISBASE/man:$MANPATH
LD_LIBRARY_PATH=$GISBASE/lib:$LD_LIBRARY_PATH
PAGER=less
export GISBASE GISRC TCLTKGRASSBASE
export GIS_LOCK
export GRASS_GNUPLOT GRASS_PAGER GRASS_PERL GRASS_TCLSH GRASS_WISH
export PATH MANPATH LD_LIBRARY_PATH
export PAGER
######################################################################
# PUT YOUR EXPORT COMMANDS THERE
--
Soil & Water Laboratory
Dept. of Biological & Environmental Engineering
Cornell University
ITHACA, NY 14853
Tel: (607)255.2463
More information about the grass-user
mailing list