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