GRASS and addons - tips and tricks

Getting started with Landsat processing - a beginners experience with GRASS for Landsat
based on http://grass.osgeo.org/wiki/LANDSAT

1. Install GRASS 7 SVN - http://wingrass.fsv.cvut.cz/grass70/
2. Run GRASS GUI

3. Set your GISDB (file container) and map location(for outputs). Output is written to the mapset folder


4. Select, order, download and unzip a sample USGS GLOVIS Landsat product to the GISDB

At the GRASS GUI Command Prompt:
5. Type - set BASE=L5091084_08420110826
6. Run this on Command Prompt to import your GeoTIFF one file at a time - r.in.gdal -e -o input=C:\data\landsat\LS5\L5091084_08420110826_B20.TIF output=L5091084_08420110826.2
7. Downstream processes require the BASE name to stay the same and the output extension to be the band number

Calculate top of atmosphere reflectance:
8. i.landsat.toar -t --overwrite input_prefix=L5091084_08420110826. output_prefix=L5091084_08420110826_toar metfile=C:\data\landsat\LS5\L5091084_08420110826_MTL.txt sensor=tm5 date=2011-08-26 solar_elevation=33.7251948 product_date=2011-09-03


Run the Automated Cloud Cover Assessment on the TOAR from 7:
8. i.landsat.acca -5 -x -2 -s input_prefix=L5091084_08420110826_toar output=L5091084_08420110826_toar_acca


Processing first pass...
Preliminary scene analysis:
* Desert index: 0.76
* Snow cover: 0.08 %
* Cloud cover: 0.47 %
* Temperature of clouds:
** Maximum: 292.43 K
** Mean (all cloud): 277.37 K
** Minimum: 203.37 K
Histogram cloud signature:
* Mean temperature: 276.30 K
* Standard deviation: 5.09
* Skewness: -3.40
* Histogram classes: 100
* 98.75 percentile: 285.88 K
* 97.50 percentile: 285.12 K
* 83.50 percentile: 278.67 K
Maximum temperature:
* Cold cloud: 285.12 K
* Warm cloud: 278.67 K
Removing ambiguous pixels...
(Mon Nov 07 06:20:20 2011) Command finished (3 min 13 sec)



Now to generate a topographic shadow mask:
9. Locate the appropriate 1second SRTM tile download' reproject to Landsat map system and resample to match pixel grid by making the output grid a multiple of the Landsat pixel size (I used GDAL for this)...