GWB: GuidosToolbox-Workbench:
===============================================================================
This directory contains image analysis modules from GuidosToolbox (GTB)
(https://forest.jrc.ec.europa.eu/en/activities/lpa/gtb/)
for cmd-line only, batch-processing execution on a Linux 64bit server.
Requirements: gdal and a running X-session.
Contact: peter.vogt@ec.europa.eu

===============================================================================
Usage of the compiled GWB modules implies compliance with the license
conditions outlined in the included file: EULA_GWB.pdf
(https://ies-ows.jrc.ec.europa.eu/gtb/GWB/EULA_GWB.pdf)
The source code of GWB and all dependencies is open source, licensed
under GPLv3 and available at: https://github.com/ec-jrc/GWB/
===============================================================================

GWB image analysis modules
===============================================================================
The following image analysis modules are available and provide the same
results compared to running GTB in interactive or batch processing mode
(see: https://ies-ows.jrc.ec.europa.eu/gtb/GTB/MSPA_Guide.pdf  and
https://forest.jrc.ec.europa.eu/en/activities/lpa/gtb/#Productsheets):

GWB_ACC: Accounting of image objects and area classes
  Requirements: 1b-BG, 2b-FG, optional: 0b-missing,
  3b-special background 1, 4b-special background 2 
  Parameter file: input/acc-parameters.txt
      
GWB_DIST: Euclidean Distance and Hypsometric Curve
  Requirements: 1b-BG, 2b-FG, optional: 0b-missing
  Parameter file: input/dist-parameters.txt

GWB_FRAG: user-selected custom scale FOS fragmentation analysis
  Requirements: binary or grayscale map (see frag-parameters.txt),
  Parameter file: input/frag-parameters.txt

GWB_FOSCHANGE: change of FOS fragmentation/connectivity
  Requirements: two GTB/GWB-generated FOS-tif/sav file pairs
  Parameter file: input/foschange-parameters.txt

GWB_GSC: GraySpatCon analysis of attribute adjacency table
  Requirements: categorical map within [0b, 255b]
  Parameter file: input/gsc-parameters.txt

GWB_LM: Landscape Mosaic 
  Requirements: 1b-Agriculture, 2b-Natural, 3b-Developed,
  optional: 0b-missing
  Parameter file: input/lm-parameters.txt
      
GWB_MSPA: Morphological Spatial Pattern Analysis (up to 23 classes)
  Requirements: 1b-BG, 2b-FG, optional: 0b-missing
  Parameter file: input/mspa-parameters.txt
      
GWB_PARC: Landscape Parcellation index
  Requirements: [1b, 255b]-land cover classes, optional: 0b-missing
  Parameter file: input/parc-parameters.txt
      
GWB_REC: Recode class values 
  Requirements: categorical map with up to 256 classes within [0b, 255b]
  Parameter file: input/rec-parameters.txt  

GWB_RSS: Restoration Status Summary 
  Requirements: 1b-BG, 2b-FG, optional: 0b-missing
  Parameter file: input/rss-parameters.txt

GWB_SC:  SpatCon analysis of attribute adjacency table
  Requirements: categorical map within [0b, 255b]
  Parameter file: input/sc-parameters.txt

GWB_SPA: Spatial Pattern Analysis (2, 3, 5, or 6 classes)
  Requirements: 1b-BG, 2b-FG, optional: 0b-missing
  Parameter file: input/spa-parameters.txt

GWB_SPLITLUMP: cut/process/merge buffered stripes of large images
  Requirements: categorical map within [0b, 255b]
  Parameter file: input/splitlump-parameters.txt

Online manual:  https://gwbdoc.readthedocs.io
      
GWB setup:
===============================================================================
- input: directory having:
  a) the input images (tif or geotif, single-layer, 8bit = byte formatted)
  b) the file X-parameters.txt with module-specific settings
     (see header for further information)
       
- output: directory providing:
  a) images+statistics in input image specific sub-directories
  b) x-log.txt: a log-file with information on the batch process
  
- tools: directory with:
  a) docs: links to GTB-manual and module-specific product sheets
  b) idl: IDL-libraries and tools needed for processing 
  c) source: GWB_XXX.pro IDL source code for the interested reader
  d) .sav and other files needed for processing

- GWB_XXX: executable script for each processing module 
- GWB_check4updates: script to test for GWB updates

Usage:

a) System mode  (GWB installed in /opt/GWB/):
===============================================================================
To get started in system mode, as a regular user, copy the input/output directories to
your home folder using the command: cp -fr /opt/GWB/*put ~/
- as regular user, run the command GWB to get an overview of the available GWB-modules
- or run a specific module of your choice and specify your own input and 
  output directory, you must have write permissions in both folders.
  i.e. for Accounting, run: GWB_ACC -i=$HOME/input -o=$HOME/output

Please ensure that your
- input directory has the module-specific parameter files (backup in /opt/GWB/input/backup/)
- output directory is empty before you start any processing task
===============================================================================

b) Standalone mode:
===============================================================================
- as regular user, use the directory $HOME/GWB<version>/GWB
- copy your (geo)tif images into the directory  $HOME/GWB<version>/GWB/input/
- read through/amend the file:  $HOME/GWB<version>/GWB/input/*-parameter.txt
- open a terminal in the directory $HOME/GWB<version>/GWB
- run the analysis module of your choice * without * specifying any input/output directory
  i.e. for Accounting, run: ./GWB_ACC
- the image analysis results + log-file will be saved into
  the directory $HOME/GWB<version>/GWB/output/

Note: standalone mode requires using the existing directories:
- $HOME/GWB<version>/GWB/input           as the input directory and
- $HOME/GWB<version>/GWB/output        as the output directory
===============================================================================
