-
Notifications
You must be signed in to change notification settings - Fork 1
/
GWB
127 lines (127 loc) · 5.87 KB
/
GWB
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
#!/bin/bash
#
echo "==============================================================================="
echo " GWB: GuidosToolbox-Workbench"
echo "==============================================================================="
echo " Part A: brief module description"
echo "==============================================================================="
echo "cmd-line image analysis modules from GuidosToolbox "
echo "(https://forest.jrc.ec.europa.eu/en/activities/lpa/gtb/):"
echo "Usage of GWB implies compliance with the conditions in the EULA_GWB.pdf"
echo "(https://ies-ows.jrc.ec.europa.eu/gtb/GWB/EULA_GWB.pdf)"
echo " "
echo "GWB_check4updates"
echo " Display installed and current program version"
echo " and test for program updates"
echo " (Automatic updater for Debian systems: '/opt/GWB/tools/GWBupdate_deb.sh')"
echo " "
echo "GWB_ACC: Accounting of image objects and area classes"
echo " Requirements: 1b-BG, 2b-FG, optional: 0b-missing, "
echo " optional: 3b-special background 1, 4b-special background 2"
echo " Parameter file: input/acc-parameters.txt"
echo " "
echo "GWB_DIST: Euclidean Distance and Hypsometric Curve"
echo " Requirements: 1b-BG, 2b-FG, optional: 0b-missing"
echo " Parameter file: input/dist-parameters.txt"
echo " "
echo "GWB_FRAG: user-selected custom scale fragmentation analysis"
echo " Requirements: binary or grayscale map (see frag-parameters.txt), "
echo " Parameter file: input/frag-parameters.txt"
echo " "
echo "GWB_GSC: GraySpatCon analysis of attribute adjacency table"
echo " Requirements: categorical map within [0b, 255b]"
echo " Parameter file: input/gsc-parameters.txt"
echo " "
echo "GWB_LM: Landscape Mosaic "
echo " Requirements: 1b-Agriculture, 2b-Natural, 3b-Developed "
echo " optional: 0b-missing"
echo " Parameter file: input/lm-parameters.txt"
echo " "
echo "GWB_MSPA: Morphological Spatial Pattern Analysis"
echo " Requirements: 1b-BG, 2b-FG, optional: 0b-missing"
echo " Parameter file: input/mspa-parameters.txt"
echo " "
echo "GWB_PARC: Landscape Parcellation index"
echo " Requirements: [1b, 255b]-land cover classes, optional: 0b-missing"
echo " Parameter file: input/parc-parameters.txt"
echo " "
echo "GWB_REC: Recode class values"
echo " Requirements: categorical map with up to 256 classes within [0b, 255b]"
echo " Parameter file: input/rec-parameters.txt"
echo " "
echo "GWB_RSS: Restoration Status summary"
echo " Requirements: 1b-BG, 2b-FG, optional: 0b-missing"
echo " Parameter file: input/rss-parameters.txt"
echo " "
echo "GWB_SC: SpatCon analysis of attribute adjacency table"
echo " Requirements: categorical map within [0b, 255b]"
echo " Parameter file: input/sc-parameters.txt"
echo " "
echo "GWB_SPA: Spatial Pattern Analysis (2, 3, 5, or 6 classes)"
echo " Requirements: 1b-BG, 2b-FG, optional: 0b-missing"
echo " Parameter file: input/spa-parameters.txt"
echo " "
echo "GWB_SPLITLUMP: Cut/process/merge buffered stripes of large images"
echo " Requirements: categorical map within [0b, 255b]"
echo " Parameter file: input/splitlump-parameters.txt"
echo " "
echo "More details in the module-specific parameter files, or run: GWB_XXX --help"
echo " "
echo "==============================================================================="
echo " Part B: usage"
echo "==============================================================================="
echo "a) system mode (GWB installed in /opt/GWB/): "
echo " To get started in system mode, copy the input/output directories to"
echo " your $HOME folder using the command: cp -fr /opt/GWB/*put ~/"
echo " To process, add the full path to your input and output directory: "
echo " GWB_ACC -i=$HOME/input -o=$HOME/output"
echo " "
echo "b) standalone mode (within $HOME/GWB<version>/GWB): "
echo " Note: standalone mode requires using the existing directories:"
echo " $HOME/GWB<version>/GWB/input as the input directory and"
echo " $HOME/GWB<version>/GWB/output as the output directory"
echo " To process, ensure you are in $HOME/GWB<version>/GWB, then run:"
echo " ./GWB_ACC"
echo " "
echo "==============================================================================="
echo " Part C: processing requirements"
echo "==============================================================================="
echo "RAM requirements depend on amount/configuration of image objects, the selected "
echo "module and processing settings, and the image size: imsizeGB = xdim*ydim/1024^3"
echo " "
echo "Note:"
echo "a) On multi-user systems you may not have full access to the available RAM"
echo "b) The peak RAM usage factors below are indicative only. "
echo "c) The log-file will list: imsizeGB, ~ RAM requirements, peak RAM usage"
echo " "
echo "Approximate peak RAM usage factors for an image of size imsizeGB: "
echo "GWB_ACC : 30 * imsizeGB"
echo "GWB_DIST : 18 * imsizeGB"
echo "GWB_FRAG : 20 * imsizeGB"
echo "GWB_GSC : 5 * imsizeGB"
echo "GWB_LM : 9 * imsizeGB"
echo "GWB_MSPA : 20 * imsizeGB"
echo "GWB_PARC : 22 * imsizeGB"
echo "GWB_REC : 2 * imsizeGB"
echo "GWB_RSS : 20 * imsizeGB"
echo "GWB_SPA : 20 * imsizeGB"
echo "GWB_SC : 5 * imsizeGB"
echo "GWB_SPLITLUMP: shell-script, no RAM required"
echo " "
echo "Example: input image 50,000 x 50,000 pixels -> imsizeGB = 2.33 GB. "
echo "Processing this image for GWB_ACC will require 30 * 2.33 ~ 70 GB RAM"
echo " "
echo "Online manual: https://gwbdoc.readthedocs.io"
echo "==============================================================================="
echo " *** To read all GWB information in Part A, B, C above, ***"
echo " *** either scroll up or run the command: less /usr/bin/GWB ***"
echo "==============================================================================="
# Find the location of this script and check status of GWB
topdir=$(dirname "$0")
if test "$topdir" = "." ; then
topdir=$PWD;
fi
checker="$topdir"/GWB_check4updates
if [[ -f "$checker" ]];then
$checker
fi