[GRASS-user] Pre-processing LANDSAT TM Orthorectified images from GLCF

Hi,

For a project I am involved with, we are conducting landcover
classification from LANDSAT TM (orthorectified) data downloaded from
GLCF.
We are now in the process on pre-processing the image and then conduct
classification using i.smap.

Following the GRASS book, we will be conducting the pre-processing
steps outlined:

1. calibration from DN to apparent radiance at sensor - gain/bias offsets

following grass book 2nd ed. (page 222)
r.mapcalc "band.rad = ((LMAX - (LMIN))/(255.0 - 1.0)) * (band -1.0) + (LMIN)"

or

i.landsat.toar

2. correction for atmospheric effects

use i.atcorr
problem: the metadata supplied by GLCF does not indicate image acquisition time
sample metadata: http://tinyurl.com/6oo428

or use
i.landsat.dehaze

3. correction for topographic/terrain effects (most of my study area
are in maountainous regions)
use book 2nd ed. (page 226) "cosine correction"
using r.sunmask, r.mapcalc
Problem: again, no image acquisition time

4. removal of clouds
use i.landsat.acca
https://svn.osgeo.org/grass/grass-addons/imagery/i.landsat.acca/

The beauty with GRASS and the GRASS book is that it has the
tools/modules I need for this project, however, I find it difficult to
choose which one I should use (i.atcoor or i.landsat.dahaze?). Am I
following the steps in correct order? Or is it necessary to do all
this? Reading from GLCF documentation, they did orthrectification for
this image already.

Any pointers would be very helpful.

cheers,

maning

--
|---------|----------------------------------------------------------|
| __.-._ |"Ohhh. Great warrior. Wars not make one great." -Yoda |
| '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
| /'.-c |Linux registered user #402901, http://counter.li.org/ |
| | /T |http://esambale.wikispaces.com|
| _)_/LI
|---------|----------------------------------------------------------|

On Mon, Jun 2, 2008 at 7:50 AM, maning sambale
<emmanuel.sambale@gmail.com> wrote:

Hi,

For a project I am involved with, we are conducting landcover
classification from LANDSAT TM (orthorectified) data downloaded from GLCF.
We are now in the process on pre-processing the image and then conduct
classification using i.smap.

Following the GRASS book, we will be conducting the pre-processing
steps outlined:

1. calibration from DN to apparent radiance at sensor - gain/bias offsets

following grass book 2nd ed. (page 222)
r.mapcalc "band.rad = ((LMAX - (LMIN))/(255.0 - 1.0)) * (band -1.0) + (LMIN)"

or

i.landsat.toar

i.landsat.toar is the more sophisticated approach (or, easier since you
don't need to write the formula manuallly).

2. correction for atmospheric effects

use i.atcorr
problem: the metadata supplied by GLCF does not indicate image acquisition time
sample metadata: http://tinyurl.com/6oo428

or use
i.landsat.dehaze

AFAIK LANDSAT is sun-synchronous, it passes in the local morning time
(something like 10:30-11:00).

Maybe this helps:
http://earthobservatory.nasa.gov/MissionControl/overpass.html

i.atcorr is the sophisticated correction, i.landsat.dehaze only a simple
approach based on image statistics.

3. correction for topographic/terrain effects (most of my study area
are in maountainous regions)
use book 2nd ed. (page 226) "cosine correction"
using r.sunmask, r.mapcalc
Problem: again, no image acquisition time

(see above). "cosine correction" is a simple approach. See also
i.topo.corr (from GRASS AddOns).

4. removal of clouds
use i.landsat.acca
https://svn.osgeo.org/grass/grass-addons/imagery/i.landsat.acca/

Never tried, please report back.

The beauty with GRASS and the GRASS book is that it has the
tools/modules I need for this project, however, I find it difficult to
choose which one I should use (i.atcoor or i.landsat.dahaze?). Am I
following the steps in correct order? Or is it necessary to do all
this? Reading from GLCF documentation, they did orthrectification for
this image already.

Any pointers would be very helpful.

I have collected all this now in
http://grass.osgeo.org/wiki/Image_processing#Preprocessing

Feel free to further improve that Wiki page.

Markus

Markus,

AFAIK LANDSAT is sun-synchronous, it passes in the local morning time
(something like 10:30-11:00).

Maybe this helps:
http://earthobservatory.nasa.gov/MissionControl/overpass.html

Since it is an overpass predictor, it doesn't provide information on
previous landsat overpass. Can I use this as a proxy to the hh:mm for
i.atcorr (me thinks no)? Or set an arbitrary time say between 10:30
to 11:00?

i.atcorr is the sophisticated correction, i.landsat.dehaze only a simple
approach based on image statistics.

3. correction for topographic/terrain effects (most of my study area
are in maountainous regions)
use book 2nd ed. (page 226) "cosine correction"
using r.sunmask, r.mapcalc
Problem: again, no image acquisition time

(see above). "cosine correction" is a simple approach. See also
i.topo.corr (from GRASS AddOns).

Thank you for this one.

4. removal of clouds
use i.landsat.acca
https://svn.osgeo.org/grass/grass-addons/imagery/i.landsat.acca/

Never tried, please report back.

Will do, via wiki.

I have collected all this now in
http://grass.osgeo.org/wiki/Image_processing#Preprocessing

Feel free to further improve that Wiki page.
Markus

As usual, thank you very much.

cheers,
maning

--
|---------|----------------------------------------------------------|
| __.-._ |"Ohhh. Great warrior. Wars not make one great." -Yoda |
| '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
| /'.-c |Linux registered user #402901, http://counter.li.org/ |
| | /T |http://esambale.wikispaces.com|
| _)_/LI
|---------|----------------------------------------------------------|

Hi,
I have created a simple script to automate the pre-processing process
of landsat tm+. Here it is, if you see it needs improvement (my bash
skill is very rudimentary) please comment:

===============================================
#!/bin/sh -x

# Script to automate pre-processing of LANDSAT ETM+ data
# Requires bands 1-5, 6 & 7 from
ftp://ftp.glcf.umiacs.umd.edu/glcf/Landsat/WRS2 and also a DEM file
# Requires i.landsat.toar, i.topo.corr, i.landsat.acca module from grass addons
# June 12, 2008

# set the following variables

#original band prefix
BANDPREF=lsat7_2000
#path to metadata
METADATA=/home/maning/pfua/map_data/landsat/glcf_met/p111r054_7x20000309.met
#data of image
DATE=2000-03-09
#solar elevation
SUNELV=57.1772505
#sun zenith you can get it from http://www.nrel.gov/midc/solpos/solpos.html
SUNZEN=32.727
#sun azimuth
SUNAZI=112.3801002
#dem file
DEM=dem_90

############## nothing to change below
if [ -z "$GISBASE" ]
then
  echo ""
  echo "You must be in GRASS GIS to run this program"
  echo ""
  exit 1
fi

g.region rast=${BANDPREF}.1

# calibrate DN values to top of atmosphere radiance
echo "Calibrating to radiance ..."
i.landsat.toar -7 -v band_prefix=${BANDPREF} metfile=${METADATA}
echo "Imported as '${BANDPREF}.toar.bandnumber'"

echo "Correcting topographic effects ..."
i.topo.corr -i base=${DEM} zenith=${SUNZEN} azimuth=${SUNAZI} out=cosi
i.topo.corr base=cosi
input=${BANDPREF}.toar.1,${BANDPREF}.toar.2,${BANDPREF}.toar.3,${BANDPREF}.toar.4,${BANDPREF}.toar.5,${BANDPREF}.toar.61,${BANDPREF}.toar.7
out=tcor zenith=${SUNZEN} method=c-factor

echo "Calculating cloud cover ..."
i.landsat.acca -f2s band=tcor.${BANDPREF}.toar out=${BANDPREF}.acca

echo "Done!"
g.list rast

Some notes:
1. Calculation for solar zenith is taken from:
http://www.nrel.gov/midc/solpos/solpos.html
2. DEM for i.topo.corr is the default SRTM resolution (90m), is this okay?
3. i.landsat.cca gives very good results, however, adding the -s flag
(for cloud shadows), sometimes misclassify water bodies such as
rivers.
image: http://farm4.static.flickr.com/3126/2571893895_0a73dd3380.jpg

cheers,
maning

On 6/2/08, maning sambale <emmanuel.sambale@gmail.com> wrote:

Markus,

AFAIK LANDSAT is sun-synchronous, it passes in the local morning time
(something like 10:30-11:00).

Maybe this helps:
http://earthobservatory.nasa.gov/MissionControl/overpass.html

Since it is an overpass predictor, it doesn't provide information on
previous landsat overpass. Can I use this as a proxy to the hh:mm for
i.atcorr (me thinks no)? Or set an arbitrary time say between 10:30
to 11:00?

i.atcorr is the sophisticated correction, i.landsat.dehaze only a simple
approach based on image statistics.

3. correction for topographic/terrain effects (most of my study area
are in maountainous regions)
use book 2nd ed. (page 226) "cosine correction"
using r.sunmask, r.mapcalc
Problem: again, no image acquisition time

(see above). "cosine correction" is a simple approach. See also
i.topo.corr (from GRASS AddOns).

Thank you for this one.

4. removal of clouds
use i.landsat.acca
https://svn.osgeo.org/grass/grass-addons/imagery/i.landsat.acca/

Never tried, please report back.

Will do, via wiki.

I have collected all this now in
http://grass.osgeo.org/wiki/Image_processing#Preprocessing

Feel free to further improve that Wiki page.
Markus

As usual, thank you very much.

cheers,
maning