LANDSAT: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
Line 66: Line 66:
==== Landsat-5: Oct 14, 1987 ====
==== Landsat-5: Oct 14, 1987 ====


Metadata:
Provided metadata:
  IMAGE_ID=P016R35_5T871014,PATH=16,ROW=35,DATE=10/14/87,PLATFORM=LANDSAT5
  IMAGE_ID=P016R35_5T871014
PATH=16
ROW=35
DATE=10/14/87
PLATFORM=LANDSAT5


==== Landsat-7: Mar 31, 2000 ====
==== Landsat-7: Mar 31, 2000 ====

Revision as of 06:49, 28 September 2010

LANDSAT Data Availability

Modules

  • d.rgb - display 3-band data
  • i.landsat.rgb - auto-enhance colors
  • i.atcorr - correct top of atmosphere to surface reflectance
  • i.oif - calculate the 3 bands showing the greatest difference (for use as R,G,B bands)
  • r.composite - flatten 3-bands of data into a single image (lossy)

LANDSAT Pre-Processing

Some notes from Yann Chemin:

  1. Open GRASS GIS, select create location from georeferenced file
  2. Use r.in.gdal to import into GRASS GIS.
    1. Most landsat scenes are delivered in "north-is-up" orientation, hence import is straightforward
    2. If you get "ERROR: Input map is rotated - cannot import.", the image must be first externally rotated, applying the rotation info stored in the metadata field of the raster image file. For example, the gdalwarp software can be used to transform the map to North-up (note, there are several gdalwarp parameters to select the resampling algorithm):
 gdalwarp rotated.tif northup.tif
  1. In grass/add-ons look for any of these to correct from radiance to reflectance at top of atmosphere
    1. i.landsat.toar
    2. i.dn2full.l5
    3. i.dn2full.l7
  2. Use i.atcorr to correct top of atmosphere to surface reflectance

Notes

The i.landsat.toar and i.landsat.acca modules want the maps to be named such as "scenename.1, .2, .3", etc. for the different bands. GloVis names LANDSAT-7 like _B10, _B20, _B30, etc.

Here's a little trick with r.reclass to rename it without touching the data or wasting disk space:

BASE=L71074092_09220040924

for BAND in 10 20 30 40 50 61 70 80; do
  BAND1st=`echo $BAND | sed -e 's/0$//'`
  r.reclass in="${BASE}_B$BAND" out=$BASE.$BAND1st << EOF
    * = *
EOF
done

Calculate top-of-atmosphere reflectance and band-6 temperature:

i.landsat.toar -7 band_pre=$BASE metfile=${BASE}_MTL.txt

Identify clouds in the image:

i.landsat.acca -2 -f band_prefix=$BASE.toar out=$BASE.acca

Mask out the clouds:

r.mapcalc "MASK = if( isnull($BASE.acca), 1, null() )"


Sample data

The North Carolina 2008 sample dataset comes with 3 different Landsat scenes:

Landsat-5: Oct 14, 1987

Provided metadata:

IMAGE_ID=P016R35_5T871014
PATH=16
ROW=35
DATE=10/14/87
PLATFORM=LANDSAT5

Landsat-7: Mar 31, 2000

Metadata:

SPACECRAFT_ID=Landsat7
SENSOR_ID=ETM+
ACQUISITION_DATE=2000-03-31
WRS_PATH=16
CPF_FILE_NAME=L7CPF20000101_20000331_12
LMAX_BAND1=191.600
LMIN_BAND1=-6.200
LMAX_BAND2=196.500
LMIN_BAND2=-6.400
LMAX_BAND3=152.900
LMIN_BAND3=-5.000
LMAX_BAND4=241.100
LMIN_BAND4=-5.100
LMAX_BAND5=31.060
LMIN_BAND5=-1.000
LMAX_BAND61=17.040
LMIN_BAND61=0.000
LMAX_BAND62=12.650
LMIN_BAND62=3.200
LMAX_BAND7=10.800
LMIN_BAND7=-0.350
LMAX_BAND8=243.100
LMIN_BAND8=-4.700
QCALMAX_BAND1=255.0
QCALMIN_BAND1=1.0
QCALMAX_BAND2=255.0
QCALMIN_BAND2=1.0
QCALMAX_BAND3=255.0
QCALMIN_BAND3=1.0
QCALMAX_BAND4=255.0
QCALMIN_BAND4=1.0
QCALMAX_BAND5=255.0
QCALMIN_BAND5=1.0
QCALMAX_BAND61=255.0
QCALMIN_BAND61=1.0
QCALMAX_BAND62=255.0
QCALMIN_BAND62=1.0
QCALMAX_BAND7=255.0
QCALMIN_BAND7=1.0
QCALMAX_BAND8=255.0
QCALMIN_BAND8=1.0
SUN_AZIMUTH=139.6033279
SUN_ELEVATION=51.5246529

Landsat-7: Apr 24, 2002

Metadata:

`p016r035_7x20020524.met`
SPACECRAFT_ID=Landsat7
SENSOR_ID=ETM+
ACQUISITION_DATE=2002-05-24
WRS_PATH=016
WRS_ROW=035
SUN_AZIMUTH=120.8810347
SUN_ELEVATION=64.7730999
QA_PERCENT_MISSING_DATA=0
CLOUD_COVER=0
CPF_FILE_NAME=L7CPF20020401_20020630_03
LMAX_BAND1=191.600
LMIN_BAND1=-6.200
LMAX_BAND2=196.500
LMIN_BAND2=-6.400
LMAX_BAND3=152.900
LMIN_BAND3=-5.000
LMAX_BAND4=241.100
LMIN_BAND4=-5.100
LMAX_BAND5=31.060
LMIN_BAND5=-1.000
LMAX_BAND61=17.040
LMIN_BAND61=0.000
LMAX_BAND62=12.650
LMIN_BAND62=3.200
LMAX_BAND7=10.800
LMIN_BAND7=-0.350
LMAX_BAND8=243.100
LMIN_BAND8=-4.700
QCALMAX_BAND1=255.0
QCALMIN_BAND1=1.0
QCALMAX_BAND2=255.0
QCALMIN_BAND2=1.0
QCALMAX_BAND3=255.0
QCALMIN_BAND3=1.0
QCALMAX_BAND4=255.0
QCALMIN_BAND4=1.0
QCALMAX_BAND5=255.0
QCALMIN_BAND5=1.0
QCALMAX_BAND61=255.0
QCALMIN_BAND61=1.0
QCALMAX_BAND62=255.0
QCALMIN_BAND62=1.0
QCALMAX_BAND7=255.0
QCALMIN_BAND7=1.0
QCALMAX_BAND8=255.0
QCALMIN_BAND8=1.0