| 1 |
Test suite i.atcorr |
| 2 |
|
| 3 |
ETM4_atmospheric_input.txt = File with the atmospheric and sensor conditions |
| 4 |
ETM4.res = Output file showing the atmospheric and sensor conditions |
| 5 |
ETM4_400x400.raw = Image input file |
| 6 |
ETM4_400x400_atms_corr.raw = Image output file (expected output) |
| 7 |
|
| 8 |
|
| 9 |
# try in Spearfish location or other: |
| 10 |
|
| 11 |
# import raw Landsat channel 4: |
| 12 |
r.in.gdal ETM4_400x400.raw out=ETM4_400x400.raw -o |
| 13 |
# set region to this map |
| 14 |
g.region raster=ETM4_400x400.raw |
| 15 |
|
| 16 |
# create synthetic DEM, close to sea level |
| 17 |
r.mapcalc "atcorr_dem = 10.0" |
| 18 |
|
| 19 |
# run atmospheric correction on imported channel 4: |
| 20 |
i.atcorr -r --o iimg=ETM4_400x400.raw \ |
| 21 |
icnd=./ETM4_atmospheric_input_GRASS.txt \ |
| 22 |
ialt=atcorr_dem \ |
| 23 |
oimg=ETM4_400x400.corrected |
| 24 |
|
| 25 |
# import already corrected test data set for comparison: |
| 26 |
r.in.gdal ETM4_400x400_atms_corr.raw out=ETM4_400x400_atms_corr -o |
| 27 |
|
| 28 |
# compare: |
| 29 |
r.mapcalc "atcorr_diff = ETM4_400x400_atms_corr - ETM4_400x400.corrected" |
| 30 |
r.colors atcorr_diff color=differences |
| 31 |
|
| 32 |
r.univar atcorr_diff |