1
|
# This scripts are to make SRTM vrt file and ASTER GDEM2 vrt file (full extent N82).
|
2
|
# Then make tiff for each region (9). With ASTER, we will make four tiff files for each region,
|
3
|
# Three for the boundary analysis purpose [ one for above N60, one for below N60, and one for straddle (N59-61) ].
|
4
|
# The forth aster tiff file is full-extent (N59 to N82), which will be used in "check" and "meanElv" analysis.
|
5
|
# All the files should be saved at /data/project/organisms/DEM/Yuni/Data/
|
6
|
#
|
7
|
# Dec 9th 2011
|
8
|
# Yuina Nunokawa
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
---------------------------------------------------------------------
|
14
|
|
15
|
#SRTM
|
16
|
export SRTMDIR="/data/project/organisms/DEM/Yuni/Data/srtm"
|
17
|
|
18
|
|
19
|
# Create SRTM Tiff files for each region (also convert to 16bit integer)
|
20
|
gdalbuildvrt $SRTMDIR/srtm.vrt /data/project/organisms/DEM/cgiarSrtm/SRTM_90m_ASCII_4_1/srtm_*_01.asc
|
21
|
|
22
|
|
23
|
gdalwarp -ot Int16 -te 20 59 59.99 60 -ts 48000 1200 -r bilinear $SRTMDIR/srtm.vrt $SRTMDIR/srtm_e020e059_below.tif
|
24
|
gdalwarp -ot Int16 -te 60 59 99.99 60 -ts 48000 1200 -r bilinear $SRTMDIR/srtm.vrt $SRTMDIR/srtm_e060e099_below.tif
|
25
|
gdalwarp -ot Int16 -te 100 59 139.99 60 -ts 48000 1200 -r bilinear $SRTMDIR/srtm.vrt $SRTMDIR/srtm_e100e139_below.tif
|
26
|
gdalwarp -ot Int16 -te 140 59 179.99 60 -ts 48000 1200 -r bilinear $SRTMDIR/srtm.vrt $SRTMDIR/srtm_e140e179_below.tif
|
27
|
gdalwarp -ot Int16 -te -20 59 19.99 60 -ts 48000 1200 -r bilinear $SRTMDIR/srtm.vrt $SRTMDIR/srtm_w020e019_below.tif
|
28
|
gdalwarp -ot Int16 -te -60 59 -21.99 60 -ts 48000 1200 -r bilinear $SRTMDIR/srtm.vrt $SRTMDIR/srtm_w060w021_below.tif
|
29
|
gdalwarp -ot Int16 -te -100 59 -61.99 60 -ts 48000 1200 -r bilinear $SRTMDIR/srtm.vrt $SRTMDIR/srtm_w100w061_below.tif
|
30
|
gdalwarp -ot Int16 -te -140 59 -101.99 60 -ts 48000 1200 -r bilinear $SRTMDIR/srtm.vrt $SRTMDIR/srtm_w140w101_below.tif
|
31
|
gdalwarp -ot Int16 -te -180 59 -141.99 60 -ts 48000 1200 -r bilinear $SRTMDIR/srtm.vrt $SRTMDIR/srtm_w180w141_below.tif
|
32
|
|
33
|
|
34
|
|
35
|
|
36
|
---------------------------------------------------------------------
|
37
|
|
38
|
# ASTER
|
39
|
export ASTDIR="/data/project/organisms/DEM/Yuni/Data/aster2"
|
40
|
|
41
|
|
42
|
|
43
|
gdalbuildvrt $ASTDIR/aster.vrt /data/project/organisms/DEM/asterGdem2/ASTGTM2*_dem.tif
|
44
|
|
45
|
|
46
|
|
47
|
# Create ASTER Tiff files for each region FOR Below(N60)
|
48
|
gdalwarp -ot Int16 -te 20 59 59.99 60 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e020e059_below.tif
|
49
|
gdalwarp -ot Int16 -te 60 59 99.99 60 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e060e099_below.tif
|
50
|
gdalwarp -ot Int16 -te 100 59 139.99 60 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e100e139_below.tif
|
51
|
gdalwarp -ot Int16 -te 140 59 179.99 60 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e140e179_below.tif
|
52
|
gdalwarp -ot Int16 -te -20 59 19.99 60 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w020e019_below.tif
|
53
|
gdalwarp -ot Int16 -te -60 59 -21.99 60 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w060w021_below.tif
|
54
|
gdalwarp -ot Int16 -te -100 59 -61.99 60 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w100w061_below.tif
|
55
|
gdalwarp -ot Int16 -te -140 59 -101.99 60 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w140w101_below.tif
|
56
|
gdalwarp -ot Int16 -te -180 59 -141.99 60 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w180w141_below.tif
|
57
|
|
58
|
|
59
|
# Create ASTER Tiff files for each region FOR above N60 (61N)
|
60
|
gdalwarp -ot Int16 -te 20 60 59.99 61 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e020e059_above.tif
|
61
|
gdalwarp -ot Int16 -te 60 60 99.99 61 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e060e099_above.tif
|
62
|
gdalwarp -ot Int16 -te 100 60 139.99 61 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e100e139_above.tif
|
63
|
gdalwarp -ot Int16 -te 140 60 179.99 61 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e140e179_above.tif
|
64
|
gdalwarp -ot Int16 -te -20 60 19.99 61 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w020e019_above.tif
|
65
|
gdalwarp -ot Int16 -te -60 60 -21.99 61 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w060w021_above.tif
|
66
|
gdalwarp -ot Int16 -te -100 60 -61.99 61 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w100w061_above.tif
|
67
|
gdalwarp -ot Int16 -te -140 60 -101.99 61 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w140w101_above.tif
|
68
|
gdalwarp -ot Int16 -te -180 60 -141.99 61 -ts 48000 1200 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w180w141_above.tif
|
69
|
|
70
|
|
71
|
# Create ASTER Tiff files for each region for straddle (N59 to 61)
|
72
|
# This equals to normal straddle, introduced by Jim as aster_300straddle.tif
|
73
|
gdalwarp -ot Int16 -te 20 59 59.99 61 -ts 48000 2400 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e020e059_straddle.tif
|
74
|
gdalwarp -ot Int16 -te 60 59 99.99 61 -ts 48000 2400 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e060e099_straddle.tif
|
75
|
gdalwarp -ot Int16 -te 100 59 139.99 61 -ts 48000 2400 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e100e139_straddle.tif
|
76
|
gdalwarp -ot Int16 -te 140 59 179.99 61 -ts 48000 2400 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e140e179_straddle.tif
|
77
|
gdalwarp -ot Int16 -te -20 59 19.99 61 -ts 48000 2400 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w020e019_straddle.tif
|
78
|
gdalwarp -ot Int16 -te -60 59 -21.99 61 -ts 48000 2400 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w060w021_straddle.tif
|
79
|
gdalwarp -ot Int16 -te -100 59 -61.99 61 -ts 48000 2400 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w100w061_straddle.tif
|
80
|
gdalwarp -ot Int16 -te -140 59 -101.99 61 -ts 48000 2400 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w140w101_straddle.tif
|
81
|
gdalwarp -ot Int16 -te -180 59 -141.99 61 -ts 48000 2400 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w180w141_straddle.tif
|
82
|
|
83
|
|
84
|
|
85
|
# Create ASTER Tiff files for each region FOR FULL EXTENTION (82N)
|
86
|
gdalwarp -ot Int16 -te 20 59 59.99 82 -ts 48000 27600 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e020e059_82N.tif
|
87
|
gdalwarp -ot Int16 -te 60 59 99.99 82 -ts 48000 27600 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e060e099_82N.tif
|
88
|
gdalwarp -ot Int16 -te 100 59 139.99 82 -ts 48000 27600 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e100e139_82N.tif
|
89
|
gdalwarp -ot Int16 -te 140 59 179.99 82 -ts 48000 27600 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_e140e179_82N.tif
|
90
|
gdalwarp -ot Int16 -te -20 59 19.99 82 -ts 48000 27600 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w020e019_82N.tif
|
91
|
gdalwarp -ot Int16 -te -60 59 -21.99 82 -ts 48000 27600 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w060w021_82N.tif
|
92
|
gdalwarp -ot Int16 -te -100 59 -61.99 82 -ts 48000 27600 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w100w061_82N.tif
|
93
|
gdalwarp -ot Int16 -te -140 59 -101.99 82 -ts 48000 27600 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w140w101_82N.tif
|
94
|
gdalwarp -ot Int16 -te -180 59 -141.99 82 -ts 48000 27600 -srcnodata "-9999" -r bilinear $ASTDIR/aster.vrt $ASTDIR/aster2_w180w141_82N.tif
|
95
|
|
96
|
|
97
|
|
98
|
|
99
|
|
100
|
|
101
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
107
|
|
108
|
|