[GRASS-user] GRASS GIS 6.4 batch

Rasmus Borgstrøm Rb at gras.ku.dk
Wed Aug 18 09:47:46 EDT 2010


Hi there

I am fairly new to GRASS GIS and need some help on how to use GRASS GIS for batch jobs. 
I have a series of 1000 MODIS sat-images that I want to batch-process in GRASS GIS in the following simple way:

r.in.gdal -e input=F:\Projects\LSTdaily\2000_065_LST_Day_1km.tif output=g2000_065_LST_Day_1km
r.mapcalc "LST65_Celcius=float(2000_065_LST_Day_1km * 0.02)-273.15"
r.mapcalc "LST65_Celcius0 = if(LST65_Celcius>-200, LST65_Celcius, null())"
r.out.gdal -c input=LST65_Celcius0 nodata=-9999 output=F:\Projects\BBMB\GRASSGIS\LST65_c.tif type=Float32

I know I can do this manually with the GRASS command line, but I would like to create a batch file where this can be executed from. 
Thus the batch file should be able to open GRASS GIS and execute the few lines above without any interaction needed. 

Does anyone have a similar batch-file I can look into, or can anyone assist me? I am not experienced within shell-programming and other things that I have found related to this topic. 

I am working on a Win XP/7 with GRASS GIS 6.4. 

Best regard
Rasmus







More information about the grass-user mailing list