This is not an Eclipse, nor a Python, nor a GRASS tutorial. It is just a description on how to get these components to work together. It assumes some (but not much, because I don't have much!) knowledge of each component.
http://grass.osgeo.org/wiki/Using_Eclipse_to_develop_GRASS_Python_programs
Tuesday, November 1, 2011
GRASS GIS and Landsat pixel quality software development
GRASS GIS >v6.4 provides many of the modules required in the Landsat pixel quality software specification - http://grass.fbk.eu/download/software.php
v6.5 for developers has the required components and looks like it might install without a build on linux?
Relevant Landsat Add-on modules:
http://grass.osgeo.org/wiki/LANDSAT
v6.5 for developers has the required components and looks like it might install without a build on linux?
Relevant Landsat Add-on modules:
http://grass.osgeo.org/wiki/LANDSAT
- d.rgb - display 3-band data
- i.landsat.rgb - auto-enhance colors
- i.atcorr - correct top of atmosphere to surface reflectance - see also the Atmospheric correction wiki page
- 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)
- i.landsat.toar (addon, included in GRASS 6.5 and 7) - convert DN to top of atmosphere radiance
- i.landsat.acca (addon, included in GRASS 6.5 and 7) - cloud identification
- i.landsat.dehaze (addon) - haze removal
- i.topo.corr -used to topographically correct reflectance from imagery files, e.g. obtained with i.landsat.toar, using a sun illumination terrain model.
Create an MASK to only show data where coverage exists for all bands
BASE=L71074092_09220040924
g.region rast=$BASE.1
r.series in=`g.mlist pat="$BASE.[0-8]*" sep=,` -n out=$BASE.thresh method=threshold thresh=1
r.mapcalc "$BASE.mask = if(isnull($BASE.thresh))"
g.remove $BASE.threshCalculate top-of-atmosphere reflectance and band-6 temperature
Calculate top-of-atmosphere reflectance and band-6 temperature (-t only if MTL, not MET file) with i.landsat.toar:i.landsat.toar input_prefix=$BASE output_prefix=${BASE}_toar sensor=tm7 metfile=${BASE}_MTL.txt -tNote: the resulting temperature map is in Kelvin:# convert to degree Celsius r.mapcalc "$BASE.temp_celsius = ${BASE}_toar.6 - 273.15" r.info -r $BASE.temp_celsius
Cloud identification
Identify clouds in the image with i.landsat.acca:i.landsat.acca -f input_prefix=226_62_toar. output=226_62.acca_cloudmaskMask out the clouds:r.mapcalc "MASK = if(isnull($BASE.acca_cloudmask))"Topographic shadowg.region rast=elevation.dem -p # calculate horizons # (we put a bufferzone of 10% of maxdistance around the study area) r.horizon elevin=elevation.dem horizonstep=30 bufferzone=200 horizon=horangle dist=0.7 maxdistance=2000 # slope + aspect r.slope.aspect elevation=elevation.dem aspect=aspect.dem slope=slope.dem # calculate global radiation for day 180 at 14:00hs r.sun -s elevation.dem horizon=horangle horizonstep=30 aspin=aspect.dem \ slopein=slope.dem glob_rad=global_rad day=180 time=14Topographic correction - relevance?i.topo.corr -i base=SRTM zenith=33.3631 azimuth=59.8897 out=SRTM.illumination i.topo.corr base=SRTM.illumination input=toar.5,toar.4,toar.3 out=tcor \ zenith=33.3631 method=c-factor
Subscribe to:
Posts (Atom)