-
Notifications
You must be signed in to change notification settings - Fork 3
/
count_series.sh
executable file
·70 lines (59 loc) · 1.45 KB
/
count_series.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
#!/bin/bash
r.series input=`g.list type=rast -e patt="^ff_surface_count_[0-5]" m=. sep=comma` \
output=ff_series_05_min_raster,ff_series_05_max_raster \
method=min_raster,max_raster
r.series input=`g.list type=rast -e patt="^ff_surface_count_[1-5]" m=. sep=comma` \
output=ff_series_15_min_raster_14,ff_series_15_max_raster_14 \
method=min_raster,max_raster
r.recode input=ff_series_15_max_raster_14 output=ff_series_15_max_raster rules=- <<EOF
0:0:1
1:1:2
2:2:3
3:3:4
4:4:5
EOF
r.colors map=ff_series_05_max_raster raster_3d=ff
r.colors map=ff_series_15_max_raster raster_3d=ff
N=13
r.neighbors input=ff_series_05_max_raster \
output=ff_series_05_max_raster_neighbors \
method=mode size=$N -c
r.neighbors input=ff_series_15_max_raster \
output=ff_series_15_max_raster_neighbors \
method=mode size=$N -c
r.category map=ff_series_05_max_raster separator=space rules=- << EOF
0 exterior
1 patch
2 transitional
3 edge
4 perforated
5 interior
6 undetermined
EOF
r.category map=ff_series_15_max_raster separator=space rules=- << EOF
0 exterior
1 patch
2 transitional
3 edge
4 perforated
5 interior
6 undetermined
EOF
r.category map=ff_series_05_max_raster_neighbors separator=space rules=- << EOF
0 exterior
1 patch
2 transitional
3 edge
4 perforated
5 interior
6 undetermined
EOF
r.category map=ff_series_15_max_raster_neighbors separator=space rules=- << EOF
0 exterior
1 patch
2 transitional
3 edge
4 perforated
5 interior
6 undetermined
EOF