-
Notifications
You must be signed in to change notification settings - Fork 33
/
overviews.sh
executable file
·155 lines (136 loc) · 2.99 KB
/
overviews.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#!/bin/bash
set -eu # Always put this in Bourne shell scripts
IFS="`printf '\n\t'`" # Always put this in Bourne shell scripts
#Make an overview image of each chart type
for chart in sectional wac;
do
echo $chart
gdalbuildvrt \
-resolution highest \
$chart-overview.vrt \
-srcnodata b4 \
-overwrite \
./warpedRasters/$chart/*.tif
gdal_translate \
-strict \
-co TILED=YES \
-co COMPRESS=LZW \
-outsize 1024 768 \
$chart-overview.vrt \
$chart-translate.tif \
# # #-te -120 37 -77 38 \
# gdalwarp \
# --debug on \
# -r bilinear \
# -ts 1024 768 \
# -co TWF=YES \
# -wm 512 \
# --config GDAL_CACHEMAX 256 \
# -co SKIP_NOSOURCE=YES \
# -multi \
# -wo NUM_THREADS=ALL_CPUS \
# -overwrite \
# $chart-overview.vrt \
# ./$chart-warp.tif \
done
for chart in enroute;
do
echo $chart
gdalbuildvrt \
-resolution highest \
$chart-low-overview.vrt \
-srcnodata b4 \
-overwrite \
./warpedRasters/$chart/ENR_L*.tif \
./warpedRasters/$chart/ENR_AKL*.tif
gdal_translate \
-strict \
-co TILED=YES \
-co COMPRESS=LZW \
--config GDAL_CACHEMAX 256 \
-outsize 1024 768 \
$chart-low-overview.vrt \
$chart-low-translate.tif \
# #-te -120 37 -77 38 \
# gdalwarp \
# --debug on \
# -r lanczos \
# -ts 1024 768 \
# -co TWF=YES \
# -wm 512 \
# --config GDAL_CACHEMAX 256 \
# $chart-low-overview.vrt \
# ./$chart-low-warp.tif \
done
for chart in enroute;
do
echo $chart
gdalbuildvrt \
-resolution highest \
$chart-high-overview.vrt \
-srcnodata b4 \
-overwrite \
./warpedRasters/$chart/ENR_H*.tif \
./warpedRasters/$chart/ENR_AKH*.tif
gdal_translate \
-strict \
-co TILED=YES \
-co COMPRESS=LZW \
-outsize 1024 768 \
--config GDAL_CACHEMAX 256 \
$chart-high-overview.vrt \
$chart-high-translate.tif \
# #-te -120 37 -77 38 \
# gdalwarp \
# --debug on \
# -r lanczos \
# -ts 1024 768 \
# -co TWF=YES \
# -wm 512 \
# --config GDAL_CACHEMAX 256 \
# $chart-high-overview.vrt \
# $chart-high-warp.tif \
done
# #-----------------------------------------------
# gdalwarp \
# -of VRT \
# -co TILED=YES \
# -r lanczos \
# ../clippedRasters/wac/CF-17_WAC.tif \
# ./CF-17_WAC.vrt \
#
# gdalwarp \
# -of VRT \
# -co TILED=YES \
# -r lanczos \
# ../clippedRasters/wac/CF-18_WAC.tif \
# ./CF-18_WAC.vrt \
#
# gdalwarp \
# -of VRT \
# -co TILED=YES \
# -r lanczos \
# ../clippedRasters/wac/CF-19_WAC.tif \
# ./CF-19_WAC.vrt \
#
# gdalbuildvrt \
# -resolution highest \
# -srcnodata b4 \
# -overwrite \
# wac_overview.vrt \
# ./*.vrt
#
# gdal_translate \
# -strict \
# -co TILED=YES \
# -co COMPRESS=LZW \
# -outsize 1024 768 \
# wac_overview.vrt \
# wac.tif \
#-----------------------------------------------
# gdal_merge.py \
# -o wac2.tif \
# -co TILED=YES \
# -co COMPRESS=LZW \
# -ps 1024 768\
# ./clippedRasters/wac/*.tif