[GRASS-user] automated import via r.in.gdal

Hamish hamish_nospam at yahoo.com
Thu Sep 6 06:58:13 EDT 2007


Tim Michelsen wrote:
> I have a bunch of landsat images which I would like to import all into 
> one location. The files are all in the same directory.
> 
> How do I write a script to import them all at once:
> 
> like
> 
> 
> start Grass with MyLocation
> 
> for file in path/to/files/
> r.in.gdal -e in=path/to/files/
> FILENAME.tif out=FILENAME
> 
> exit grass


have a look at the $GRASS_BATCH_JOB enviro variable in GRASS 6.3 if you
want to script have grass start up, do something, then exit.
(still missing from the grass6 man page AFAICT)


Hamish




More information about the grass-user mailing list