1
|
# correct immage with anomalus pixel valus.
|
2
|
# the file
|
3
|
# giuseppea@turaco:/mnt/data2/dem_variables/GMTED2010/altitude/class_mi$ pkinfo -hist -i ../../tiles/mi75_grd_tif/5_1.tif | more
|
4
|
# -931 1 anomalus
|
5
|
# -898 1 anomalus
|
6
|
# -498 1
|
7
|
# -461 1
|
8
|
|
9
|
# therefore the -931 -898 will be fill in withe the nearby pixel.
|
10
|
|
11
|
cd /mnt/data2/dem_variables/GMTED2010/tiles/mi75_grd_tif
|
12
|
cp 5_1.tif 5_1_orig.tiff
|
13
|
pkgetmask -co COMPRESS=LZW -i 5_1.tif -min -890 -max 10000 -t 1 -f 0 -o 5_1_mask.tif
|
14
|
pkfillnodata -i 5_1.tif -m 5_1_mask.tif -o 5_1_fill.tif
|
15
|
mv 5_1_fill.tif 5_1.tif
|
16
|
rm 5_1_mask.tif
|
17
|
|
18
|
# the values becom -93 and -80
|
19
|
|
20
|
# -93 2830
|
21
|
# -93 2831
|
22
|
#
|
23
|
# -80 19449
|
24
|
# -80 19450
|
25
|
|
26
|
# correction of a square box of 500 500 pixel. Set the value = to 179 as the near by pixel.
|
27
|
cd /mnt/data2/dem_variables/GMTED2010/tiles/mi75_grd_tif
|
28
|
gdal_translate -srcwin 10070 3830 500 500 2_1.tif 2_1_clip.tif
|
29
|
|
30
|
pksetmask -co COMPRESS=LZW -t 0 -f 179 -i 2_1.tif -m 2_1_clip.tif -o 2_1_correct.tif
|
31
|
mv 2_1.tif 2_1_orig.tiff
|
32
|
mv 2_1_correct.tif 2_1.tif
|
33
|
rm 2_1_clip.tif
|
34
|
|
35
|
# correction of a square in the caspian sea set value to -27
|
36
|
cd /mnt/data2/dem_variables/GMTED2010/tiles/mi75_grd_tif
|
37
|
gdal_translate -srcwin 5719 5249 1050 1050 6_1.tif 6_1_clip1.tif
|
38
|
gdal_translate -srcwin 6200 6200 1050 550 6_1.tif 6_1_clip2.tif
|
39
|
gdal_translate -srcwin 6700 6700 1050 550 6_1.tif 6_1_clip3.tif
|
40
|
gdal_translate -srcwin 7150 7000 550 700 6_1.tif 6_1_clip4.tif
|
41
|
gdal_translate -srcwin 6700 7550 1050 1100 6_1.tif 6_1_clip5.tif
|
42
|
gdal_translate -srcwin 7150 8000 1050 1150 6_1.tif 6_1_clip6.tif
|
43
|
|
44
|
pksetmask -co COMPRESS=LZW -t 0 -f -27 -t 0 -f -27 -t 0 -f -27 -t 0 -f -27 -t 0 -f -27 -t 0 -f -27 -m 6_1_clip1.tif -m 6_1_clip2.tif -m 6_1_clip3.tif -m 6_1_clip4.tif -m 6_1_clip5.tif -m 6_1_clip6.tif -i 6_1.tif -o 6_1_correct.tif
|
45
|
mv 6_1.tif 6_1_orig.tiff
|
46
|
mv 6_1_correct.tif 6_1.tif
|
47
|
rm 6_1_clip*.tif
|
48
|
|
49
|
# correction of a square box of 500 500 pixel. Set the value = to 179 as the near by pixel.
|
50
|
cd /mnt/data2/dem_variables/GMTED2010/tiles/mx75_grd_tif
|
51
|
gdal_translate -srcwin 10070 3830 500 500 2_1.tif 2_1_clip.tif
|
52
|
|
53
|
pksetmask -co COMPRESS=LZW -t 0 -f 179 -i 2_1.tif -m 2_1_clip.tif -o 2_1_correct.tif
|
54
|
mv 2_1.tif 2_1_orig.tiff
|
55
|
mv 2_1_correct.tif 2_1.tif
|
56
|
rm 2_1_clip.tif
|
57
|
|
58
|
# correction of a square in the caspian sea set value to -27
|
59
|
cd /mnt/data2/dem_variables/GMTED2010/tiles/mx75_grd_tif
|
60
|
gdal_translate -srcwin 5719 5249 1050 1050 6_1.tif 6_1_clip1.tif
|
61
|
gdal_translate -srcwin 6200 6200 1050 550 6_1.tif 6_1_clip2.tif
|
62
|
gdal_translate -srcwin 6700 6700 1050 550 6_1.tif 6_1_clip3.tif
|
63
|
gdal_translate -srcwin 7150 7000 550 700 6_1.tif 6_1_clip4.tif
|
64
|
gdal_translate -srcwin 6700 7550 1050 1100 6_1.tif 6_1_clip5.tif
|
65
|
gdal_translate -srcwin 7150 8000 1050 1150 6_1.tif 6_1_clip6.tif
|
66
|
|
67
|
pksetmask -co COMPRESS=LZW -t 0 -f -27 -t 0 -f -27 -t 0 -f -27 -t 0 -f -27 -t 0 -f -27 -t 0 -f -27 -m 6_1_clip1.tif -m 6_1_clip2.tif -m 6_1_clip3.tif -m 6_1_clip4.tif -m 6_1_clip5.tif -m 6_1_clip6.tif -i 6_1.tif -o 6_1_correct.tif
|
68
|
mv 6_1.tif 6_1_orig.tiff
|
69
|
mv 6_1_correct.tif 6_1.tif
|
70
|
rm 6_1_clip*.tif
|
71
|
|