4. Main Interface Window

The Main Interface Window is composed of several tabs described in detail in the following paragraphs. Tabs can be selected through the menu at the left side.

4.1. Band set

_images/band_set_tab.jpg

bandset_tool Band set

Image input in SCP is named band set. This tab allows for the definition of one or more band sets used as input for classification and other tools.

Band sets are identified by numbers. The active band set (i.e. the tab selected in Band set definition with bold green name) is used as input for the tools in SCP dock and Working toolbar. Other SCP tools allow for the selection of band set numbers.

The Band set definition is saved with the QGIS project.

4.1.1. Multiband image list

This section allows for the selection of a multiband raster. If selected, raster bands are listed in the active band set.

  • input_list : select the input image from a list of multispectral images loaded in QGIS;
  • open_file: open one or more raster files that are added to the active band set and loaded in QGIS;
  • reload: refresh layer list;

4.1.2. Single band list

List of single band rasters already loaded in QGIS. It is possible to select one or more bands to be added to the active band set.

  • reload: refresh list of raster bands loaded in QGIS;
  • select_all: select all raster bands;
  • plus: add selected rasters to the active band set.

4.1.3. Band set definition

Definition of bands composing the band sets . The active band set is the tab selected with bold green name. It is possible to add new band sets clicking the following button:

  • add_bandset: add a new empty band set;

Click the close_bandset in the tab to remove the corresponding band set. Band sets can be reordered dragging the tabs.

The Center wavelength of bands should be defined in order to use several functions of SCP. If the Center wavelength of bands is not defined, the band number is used and some SCP tools will be disabled.

It is possible to define a multiplicative rescaling factor and additive rescaling factor for each band (for instance using the values in Landsat metadata), which are used on the fly (i.e. pixel value = original pixel value * multiplicative rescaling factor + additive rescaling factor) during the processing.

Every band set is defined with the following table:

  • input_table Band set #: table containing the following fields;
    • Band name project_save: name of the band; name cannot be edited;
    • Center wavelength project_save: center of the wavelength of the band;
    • Multiplicative Factor project_save: multiplicative rescaling factor;
    • Additive Factor project_save: additive rescaling factor;
    • Wavelength unit project_save: wavelength unit;
    • Image name project_save: image name for multiband rasters;
  • move_up: move highlighted bands upward;
  • move_down: move highlighted bands downward;
  • order_by_name : sort automatically bands by name, giving priority to the ending numbers of name;
  • remove: remove highlighted bands from the active band set;
  • reset: clear all bands from active band set;
  • Quick wavelength settings input_list optional: rapid definition of band center wavelength for the following satellite sensors:
    • ASTER;
    • GeoEye-1;
    • Landsat 8 OLI;
    • Landsat 7 ETM+;
    • Landsat 5 TM;
    • Landsat 4 TM;
    • Landsat 1, 2, and 3 MSS;
    • MODIS;
    • Pleiades;
    • QuickBird;
    • RapidEye;
    • Sentinel-2;
    • Sentinel-3;
    • SPOT 4;
    • SPOT 5;
    • SPOT 6;
    • WorldView-2 and WorldView-3;
  • Wavelength unit input_list project_save: select the wavelength unit among:
    • Band number: no unit, only band number;
    • \(\mu m\): micrometres;
    • nm: nanometres;
  • import: import a previously saved active band set from file;
  • export: export the active band set to a file;

4.1.4. Band set tools

It is possible to perform several processes directly on active band set.

  • checkbox Create virtual raster of band set: if checked, create a virtual raster of bands;
  • checkbox Create raster of band set (stack bands): if checked, stack all the bands and create a unique .tif raster;
  • checkbox Build band overviews: if checked, build raster overviews (i.e. pyramids) for improving display performance; overview files are created in the same directory as bands;
  • checkbox Band calc expression: if checked, calculate the Expression entered in Band calc; it is recommended the use of Band set variables in the expression (e.g. bandset#b1 );
  • RUN run: choose the output destination and start the process;

4.2. Basic tools

The tab tools Basic tools includes several tools for manipulating input data.

4.2.1. RGB list

_images/RGB_list_tab.jpg

rgb_tool RGB list

This tab allows for managing the RGB Color Composite used in the list RGB= of the Image control.

4.2.1.1. RGB list

  • input_table RGB list: table containing the following fields;
    • RGB: RGB combination; this field can be manually edited;
  • move_up: move highlighted RGB combination upward;
  • move_down: move highlighted RGB combination downward;
  • order_by_name : automatically sort RGB combinations by name;
  • add: add a row to the table;
  • remove: remove highlighted rows from the table;
  • reset: clear all RGB combinations from RGB list;
  • export: export the RGB list to a file (i.e. .csv);
  • import: import a previously saved RGB list from file (i.e. .csv);

4.2.1.2. Automatic RGB

  • Band combinations enter: add the combinations of all bands (i.e. permutation) to the RGB list (e.g. 1-2-3, 1-2-4, …, 3-2-1);

4.2.2. Algorithm band weight

_images/Algorithm_band_weight.jpg

weight_tool Algorithm band weight

This tab allows for the definition of band weights that are useful for improving the spectral separability of materials at certain wavelengths (bands). During the classification process, band values and spectral signature values are multiplied by the corresponding band weights, thus modifying the spectral distances. A tab is displayed for every Band set.

4.2.2.1. Band weight

  • input_table Band weight: table containing the following fields;
    • Band number : number of the band in the Band set;
    • Band name : name of the band;
    • Weight : weight of the band; this value can be edited;

4.2.2.2. Automatic weight

  • reset: reset all band weights to 1;
  • Set weight input_number enter: set the defined value as weight for all the highlighted bands in the table;

4.2.3. Multiple ROI Creation

_images/multiple_ROIs.jpg

roi_multiple Multiple ROI Creation

This tab allows for the automatic creation of ROIs, useful for the rapid classification of multi-temporal images, or for accuracy assessment. Given a list of point coordinates and ROI options, this tool performs the region growing of ROIs. Created ROIs are automatically saved to the Training input. The active band set in Band set is used for calculations.

4.2.3.1. Create random points

  • Number of points input_number: set a number of points that will be created when Create points enter is clicked;
  • checkbox inside grid input_number: if checked, the band set area is divided in cells where the size thereof is defined in the combobox (image unit, usually meters); points defined in Number of random points are created randomly within each cell;
  • checkbox min distance input_number: if checked, random points have a minimum distance defined in the combobox (image unit, usually meters); setting a minimum distance can result in fewer points than the number defined in Number of points;
  • Create points enter: create random points inside the band set area;

4.2.3.2. Point coordinates and ROI definition

  • input_table Point coordinates and ROI definition: table containing the following fields;
    • X : point X coordinate (float);
    • Y : point Y coordinate (float);
    • MC ID: ROI Macroclass ID (int);
    • MC Info: ROI Macroclass information (text);
    • C ID: ROI Class ID (int);
    • C Info: ROI Class information (text);
    • Min : the minimum area of a ROI (in pixel unit);
    • Max : the maximum width of a ROI (in pixel unit);
    • Dist : the interval which defines the maximum spectral distance between the seed pixel and the surrounding pixels (in radiometry unit);
    • Rapid ROI band : if a band number is defined, ROI is created only using the selected band, similarly to Rapid ROI band in ROI Signature list ;
  • add: add a new row to the table; all the table fields must be filled for the ROI creation;
  • remove: delete the highlighted rows from the table;
  • import: import a point list from text file or a point shapefile to the table; in case of text file, every line must contain values separated by tabs of X, Y, MC ID, MC Info, Class ID, C Info, Min, Max, Dist, and optionally the Rapid ROI band; in case of shapefile, only point coordinates are imported;
  • export: export the point list to text file;

4.2.3.3. Run

  • checkbox Calculate sig.: if checked, the spectral signature is calculated while the ROI is saved to Training input;
  • RUN run: start the ROI creation process for all the points and save ROIs to the Training input;

4.2.4. Import signatures

The tab import_spectral_library Import signatures allows for importing spectral signatures from various sources.

4.2.4.1. Import library file

_images/import_library_file.jpg

Import library file

This tool allows for importing spectral signatures from various sources: a previously saved Training input (.scp file); a USGS Spectral Library (.asc file); a previously exported CSV file. In case of USGS Spectral Library, the library is automatically sampled according to the image band wavelengths defined in the Band set, and added to the ROI Signature list;

4.2.4.2. Import shapefile

_images/import_shapefile.jpg

Import shapefile

This tool allows for importing a shapefile, selecting the corresponding fields of the Training input.

  • Select a shapefile open_file: open a shapefile;
  • MC ID field input_list: select the shapefile field corresponding to MC ID;
  • MC Info field input_list: select the shapefile field corresponding to MC Info;
  • C ID field input_list: select the shapefile field corresponding to C ID;
  • C Info field input_list: select the shapefile field corresponding to C Info;
  • checkbox Calculate sig.: if checked, the spectral signature is calculated while the ROI is saved to Training input;
  • Import shapefile enter: import all the shapefile polygons as ROIs in the Training input;

4.2.4.3. Download USGS Spectral Library

_images/USGS_spec_library.jpg

Download USGS Spectral Library

The tab Download USGS Spectral Library allows for the download of the USGS spectral library (Clark, R.N., Swayze, G.A., Wise, R., Livo, E., Hoefen, T., Kokaly, R., Sutley, S.J., 2007, USGS digital spectral library splib06a: U.S. Geological Survey, Digital Data Series 231).

The libraries are grouped in chapters including Minerals, Mixtures, Coatings, Volatiles, Man-Made, Plants, Vegetation Communities, Mixtures with Vegetation, and Microorganisms. An internet connection is required.

  • Select a chapter input_list: select one of the library chapters; after the selection, chapter libraries are shown in Select a library;

  • Select a library input_list: select one of the libraries; the library description is displayed in the frame Library description;

  • Import spectral library enter: download the library and add the sampled spectral signature to the ROI Signature list using the parameters defined for class and macroclass; the library is automatically sampled according to the image band wavelengths defined in the active band set in Band set, and added to the ROI Signature list;

    Tip: Spectral libraries downloaded from the USGS Spectral Library can be used with Minimum Distance or Spectral Angle Mapping algorithms, but not Maximum Likelihood because this algorithm needs the covariance matrix that is not included in the spectral libraries.

4.2.5. Export signatures

_images/export_signatures_tab.jpg

export_spectral_library Export signatures

This tool allows for exporting the signatures highlighted in the ROI Signature list.

  • Export as SCP file new_file: create a new .scp file and export highlighted ROIs and spectral signatures as SCP file (* .scp);
  • Export as shapefile new_file: export highlighted ROIs (spectral signature data excluded) as a new shapefile (* .shp);
  • Export as CSV file open_dir: open a directory, and export highlighted spectral signatures as individual CSV files (* .csv) separated by semicolon ( ; );

4.2.6. Signature threshold

_images/Signature_threshold.jpg

threshold_tool Signature threshold

This tab allows for the definition of a classification threshold for each spectral signature. All the signatures contained in the Training input are listed. Thresholds defined in this tool are applied to classification only if Threshold value in Algorithm is 0.

This is useful for improving the classification results, especially when spectral signatures are similar. Thresholds of signatures are saved in the Training input.

If threshold is 0 then no threshold is applied and all the image pixels are classified. Depending on the selected Algorithm the threshold value is evaluated differently:

  • for Minimum Distance, pixels are unclassified if distance is greater than threshold value;
  • for Maximum Likelihood, pixels are unclassified if probability is less than threshold value (max 100);
  • for Spectral Angle Mapping, pixels are unclassified if spectral angle distance is greater than threshold value (max 90).

4.2.6.1. Signature threshold

  • input_table Signature threshold: table containing the following fields;
    • MC ID: signature Macroclass ID;
    • MC Info: signature Macroclass Information;
    • C ID: signature Class ID;
    • C Info: signature Class Information;
    • MD Threshold: Minimum Distance threshold; this value can be edited;
    • ML Threshold: Maximum Likelihood threshold; this value can be edited;
    • SAM Threshold: Spectral Angle Mapping threshold; this value can be edited;
  • reset: reset all signatures thresholds to 0 (i.e. no threshold used);

4.2.6.2. Automatic thresholds

  • Set threshold input_number enter: set the defined value as threshold for all the highlighted signatures in the table;
  • Set threshold = σ * input_number enter: for all the highlighted signatures, set an automatic threshold calculated as the distance (or angle) between mean signature and (mean signature + (σ * v)), where σ is the standard deviation and v is the defined value; currently works for Minimum Distance and Spectral Angle Mapping;

4.2.7. LCS threshold

_images/LCS_threshold.jpg

LCS_threshold LCS threshold

This tab allows for setting the signature thresholds used by Land Cover Signature Classification. All the signatures contained in the Training input are listed; also, signature thresholds are saved in the Training input.

Overlapping signatures (belonging to different classes or macroclasses) are highlighted in orange in the table LC Signature threshold; the overlapping check is performed considering MC ID or C ID according to the setting Use checkbox MC ID checkbox C ID in Algorithm. Overlapping signatures sharing the same ID are not highlighted.

4.2.7.1. LC Signature threshold

  • input_table LC Signature threshold: table containing the following fields;
    • MC ID: signature Macroclass ID;
    • MC Info: signature Macroclass Information;
    • C ID: signature Class ID;
    • C Info: signature Class Information;
    • Color [overlap MC_ID-C_ID]: signature color; also, the combination MC ID-C ID is displayed in case of overlap with other signatures (see Land Cover Signature Classification);
    • Min B X: minimum value of band X; this value can be edited;
    • Max B X: maximum value of band X; this value can be edited;
  • sign_plot: show the ROI spectral signature in the Spectral Signature Plot; spectral signature is calculated from the Band set;

4.2.7.2. Automatic thresholds

Set thresholds automatically for highlighted signatures in the table LC Signature threshold; if no signature is highlighted, then the threshold is applied to all the signatures.

  • Min Max enter: set the threshold based on the minimum and maximum of each band;
  • σ * input_number enter: set an automatic threshold calculated as (band value + (σ * v)), where σ is the standard deviation of each band and v is the defined value;
  • From ROI LCS_threshold_ROI_tool: set the threshold using the temporary ROI pixel values, according to the following checkboxes:
    • checkbox +: if checked, signature threshold is extended to include pixel signature;
    • checkbox : if checked, signature threshold is reduced to exclude pixel signature;
  • From pixel LCS_threshold_set_tool: set the threshold by clicking on a pixel, according to the following checkboxes:
    • checkbox +: if checked, signature threshold is extended to include pixel signature;
    • checkbox : if checked, signature threshold is reduced to exclude pixel signature;

4.3. Download products

The tab download Download products includes the tools for searching and downloading free remote sensing images. Also, automatic conversion to reflectance of downloaded bands is available.

An internet connection is required and free registration could be required depending on the download service.

This tool allows for searching and downloading:

  • Landsat Satellites images (from 1 MSS to 8 OLI) acquired from the 80s to present days;
  • Sentinel-2 Satellite images (Level-1C and Level-2A) acquired from 2015 to present days;
  • Sentinel-3 Satellite images (OLCI Level-1B OL_1_EFR) acquired from 2016 to present days;
  • ASTER Satellite images (Level 1T) acquired from 2000 to present days;
  • MODIS Products images (MOD09GQ, MYD09GQ, MOD09GA, MYD09GA, MOD09Q1, MYD09Q1, MOD09A1, MYD09A1) acquired from 2000 to present days;

For Landsat, ASTER, and MODIS the search is performed through the CMR Search API developed by NASA. Landsat images are freely available through the services: EarthExplorer , Google Earth Engine , and the Amazon Web Services (AWS) (only for Landsat 8). The ASTER L1T and MODIS products are retrieved from the online Data Pool, courtesy of the NASA Land Processes Distributed Active Archive Center (LP DAAC), USGS/Earth Resources Observation and Science (EROS) Center, Sioux Falls, South Dakota, https://lpdaac.usgs.gov/data_access/data_pool.

For Sentinel-2 and Sentinel-3 the search is performed through the Copernicus Open Access Hub (using the Data Hub API ); images are mainly downloaded from the Amazon S3 AWS if available.

This tool attempts to download images first from Amazon Web Services and Google Earth Engine ; only if images are not available, the download is performed through the services that require to login.

4.3.1. Login data

_images/login_data.jpg

login_data Login data

4.3.1.1. Login https://ers.cr.usgs.gov

For Landsat images USGS EROS credentials (https://ers.cr.usgs.gov) are required for downloads from EarthExplorer . Login using your USGS EROS credentials or register for free at https://ers.cr.usgs.gov/register .

  • User input_text registry_save: enter the user name;
  • Password input_text registry_save: enter the password;
  • checkbox remember: remember user name and password in QGIS;

4.3.1.2. Login https://urs.earthdata.nasa.gov

For ASTER and MODIS images EOSDIS Earthdata credentials (https://urs.earthdata.nasa.gov ) are required for download. Login using your EOSDIS Earthdata credentials or register for free at https://urs.earthdata.nasa.gov/users/new . Before downloading ASTER and MODIS images, you must approve LP DAAC Data Pool clicking the following link https://urs.earthdata.nasa.gov/approve_app?client_id=ijpRZvb9qeKCK5ctsn75Tg

  • User input_text registry_save: enter the user name;
  • Password input_text registry_save: enter the password;
  • checkbox remember: remember user name and password in QGIS;

4.3.1.3. Login Sentinels

In order to access to Sentinel data a free registration is required at https://scihub.copernicus.eu/userguide/1SelfRegistration (other services may require different registrations). After the registration, enter the user name and password for accessing data.

4.3.3. Download options

_images/download_options.jpg

download_options_tab Download options

This tab allows for the selection of single bands for Landsat, Sentinel-2, and Sentinel-3 images. Depending on the download service, single band download could be unavailable.

  • checkbox Band X: select bands for download;
  • checkbox Ancillary data: if checked, the metadata files are selected for download;
  • select_all: select or deselect all bands;

4.4. Preprocessing

The tab preprocessing Preprocessing provides several tools for data manipulation which are useful before the actual classification process.

4.4.1. Landsat

_images/landsat_tab.jpg

landsat_tool Landsat

This tab allows for the conversion of Landsat 1, 2, and 3 MSS and Landsat 4, 5, 7, and 8 images from DN (i.e. Digital Numbers) to the physical measure of Top Of Atmosphere reflectance (TOA), or the application of a simple atmospheric correction using the DOS1 method (Dark Object Subtraction 1), which is an image-based technique (for more information about the Landsat conversion to TOA and DOS1 correction, see Image conversion to reflectance). Pan-sharpening is also available; for more information read Pan-sharpening.

Once the input is selected, available bands are listed in the metadata table.

WARNING: For the best spectral precision you should download the Landsat Level-2 Data Products (Surface Reflectance) from https://earthexplorer.usgs.gov .

4.4.1.1. Landsat conversion to TOA reflectance and brightness temperature

  • Directory containing Landsat bands open_dir: open a directory containing Landsat bands; names of Landsat bands must end with the corresponding number; if the metadata file is included in this directory then Metadata are automatically filled;
  • Select MTL file open_file optional: if the metadata file is not included in the Directory containing Landsat bands, select the path of the metadata file in order to fill the Metadata automatically;
  • checkbox Brightness temperature in Celsius: if checked, convert brightness temperature to Celsius (if a Landsat thermal band is listed in Metadata); if unchecked temperature is in Kelvin;
  • checkbox Apply DOS1 atmospheric correction: if checked, the DOS1 Correction is applied to all the bands (thermal bands excluded);
  • checkbox only to blue and green bands: if checked (with Apply DOS1 atmospheric correction also checked), the DOS1 Correction is applied only to blue and green bands;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Perform pan-sharpening: if checked, a Brovey Transform is applied for the Pan-sharpening of Landsat bands;
  • checkbox Create Band set and use Band set tools: if checked, the Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;

4.4.1.2. Metadata

All the bands found in the Directory containing Landsat bands are listed in the table Metadata. If the Landsat metadata file (a .txt or .met file with the suffix MTL) is provided, then Metadata are automatically filled. For information about Metadata fields read this page and this one .

  • Satellite input_text: satellite name (e.g. Landsat8);
  • Date input_text: date acquired (e.g. 2013-04-15);
  • Sun elevation input_number: Sun elevation in degrees;
  • Earth sun distance input_number: Earth Sun distance in astronomical units (automatically calculated if Date is filled;
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;
    • RADIANCE_MULT: multiplicative rescaling factor;
    • RADIANCE_ADD: additive rescaling factor;
    • REFLECTANCE_MULT: multiplicative rescaling factor;
    • REFLECTANCE_ADD: additive rescaling factor;
    • RADIANCE_MAXIMUM: radiance maximum;
    • REFLECTANCE_MAXIMUM: reflectance maximum;
    • K1_CONSTANT: thermal conversion constant;
    • K2_CONSTANT: thermal conversion constant;
    • LMAX: spectral radiance that is scaled to QCALMAX;
    • LMIN: spectral radiance that is scaled to QCALMIN;
    • QCALMAX: minimum quantized calibrated pixel value;
    • QCALMIN: maximum quantized calibrated pixel value;

4.4.1.3. Run

  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;

4.4.2. Sentinel-2

_images/sentinel2_tab.jpg

sentinel2_tool Sentinel-2

This tab allows for the conversion of Sentinel-2 images Level-1C to the physical measure of Top Of Atmosphere reflectance (TOA), or the application of a simple atmospheric correction using the DOS1 method (Dark Object Subtraction 1), which is an image-based technique (for more information about conversion to TOA and DOS1 correction, see Image conversion to reflectance). This tool can also convert Sentinel-2 images Level-2A from DN to reflectance values.

Once the input is selected, available bands are listed in the metadata table. Bands with 20m spatial resolution are resampled to 10m resolution without changing the original pixel value (i.e. one 20m pixel is divided in four 10m pixels with the same value).

WARNING: For the best spectral precision you should download the Sentinel-2 Level-2A Products (Surface Reflectance) or use the official SNAP tool for atmospheric correction (see http://step.esa.int).

4.4.2.1. Sentinel-2 conversion

  • Directory containing Sentinel-2 bands open_dir: open a directory containing Sentinel-2 bands; names of Sentinel-2 bands must end with the corresponding number; if the metadata file is included in this directory then Metadata are automatically filled;
  • Select metadata file open_file optional: select the metadata file which is a .xml file whose name contains MTD_MSIL1C);
  • checkbox Apply DOS1 atmospheric correction: if checked, the DOS1 Correction is applied to all the bands;
  • checkbox only to blue and green bands: if checked (with Apply DOS1 atmospheric correction also checked), the DOS1 Correction is applied only to blue and green bands;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Create Band set and use Band set tools: if checked, the active Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;
  • checkbox Add bands in a new Band set: if checked, bands are added to a new empty Band set;

4.4.2.2. Metadata

All the bands found in the Directory containing Sentinel-2 bands are listed in the table Metadata. If the Sentinel-2 metadata file (a .xml file whose name contains MTD_MSIL1C) is provided, then Metadata are automatically filled. For information about Metadata fields read this informative page .

  • Satellite input_text: satellite name (e.g. Sentinel-2A);
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;
    • Quantification value: value for conversion to TOA reflectance;
    • Solar irradiance: solar irradiance of band;

4.4.2.3. Run

  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;

4.4.3. Sentinel-3

_images/sentinel3_tab.jpg

sentinel3_tool Sentinel-3

This tab allows for the conversion of Sentinel-3 images (OL_1_EFR) to the physical measure of Top Of Atmosphere reflectance (TOA), or the application of a simple atmospheric correction using the DOS1 method (Dark Object Subtraction 1), which is an image-based technique (for more information about conversion to TOA and DOS1 correction, see Image conversion to reflectance). The following ancillary data are required for conversion: instrument_data.nc , geo_coordinates.nc , tie_geometries.nc .

Once the input is selected, available bands are listed in the metadata table.

WARNING: Sentinel-3 bands are reprojected to WGS 84 coordinate system using a sample of pixels from the file geo_coordinates.nc . For the best precision you should use the official SNAP tool (see http://step.esa.int).

4.4.3.1. Sentinel-3 conversion

  • Directory containing Sentinel-3 bands open_dir: open a directory containing Sentinel-3 bands; names of Sentinel-2 bands must end with the corresponding number; ancillary data required for conversion must be in the same directory;
  • checkbox Apply DOS1 atmospheric correction: if checked, the DOS1 Correction is applied to all the bands;
  • checkbox only to blue and green bands: if checked (with Apply DOS1 atmospheric correction also checked), the DOS1 Correction is applied only to blue and green bands;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Create Band set and use Band set tools: if checked, the Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;

4.4.3.2. Metadata

All the bands found in the Directory containing Sentinel-3 bands are listed in the table Metadata.

  • Satellite input_text: satellite name (e.g. Sentinel-3A);
  • Product input_text: product name (e.g. OLCI);
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;

4.4.3.3. Run

  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;

4.4.4. ASTER

_images/aster_tab.jpg

aster_tool ASTER

This tab allows for the conversion of ASTER L1T images to the physical measure of Top Of Atmosphere reflectance (TOA), or the application of a simple atmospheric correction using the DOS1 method (Dark Object Subtraction 1), which is an image-based technique (for more information about conversion to TOA and DOS1 correction, see Image conversion to reflectance).

Once the input is selected, available bands are listed in the metadata table.

4.4.4.1. ASTER conversion

  • Select file ASTER L1T open_file: select an ASTER image (file .hdf);
  • checkbox Apply DOS1 atmospheric correction: if checked, the DOS1 Correction is applied to all the bands;
  • checkbox only to green band: if checked (with Apply DOS1 atmospheric correction also checked), the DOS1 Correction is applied only to green band;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Create Band set and use Band set tools: if checked, the Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;

4.4.4.2. Metadata

All the bands found in the Select file ASTER L1T are listed in the table Metadata. For information about Metadata fields visit the ASTER page .

  • Date input_text: date acquired (e.g. 20130415);
  • Sun elevation input_number: Sun elevation in degrees;
  • Earth sun distance input_number: Earth Sun distance in astronomical units (automatically calculated if Date is filled;
  • UTM zone input_text: UTM zone code of the image;
  • UPPERLEFTM input_text: coordinates of the upper left corner of the image;
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;
    • UnitConversionCoeff: value for radiance conversion;
    • PixelSize: solar irradiance of band;

4.4.4.3. Run

  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;

4.4.5. MODIS

_images/modis_tab.jpg

modis_tool MODIS

This tab allows for the conversion of MODIS images to .tif format, and the reprojection to WGS 84.

Once the input is selected, available bands are listed in the metadata table.

4.4.5.1. MODIS conversion

  • Select file MODIS open_file: select a MODIS image (file .hdf);
  • checkbox Reproject to WGS 84: if checked, reproject bands to WGS 84, required for use in SCP;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Create Band set and use Band set tools: if checked, the Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;

4.4.5.2. Metadata

All the bands found in the Select file MODIS are listed in the table Metadata. For information about Metadata fields visit the MODIS page .

  • ID input_text: ID of the image;
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;
    • UnitConversionCoeff: value for conversion;

4.4.5.3. Run

  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;

4.4.6. Vector to raster

_images/vector_to_raster_tab.jpg

vector_to_raster_tool Vector to raster

This tab allows for the conversion of a vector to raster format.

  • Select the vector input_list: select a vector already loaded in QGIS;
  • reload: refresh layer list;
  • checkbox Use the value field of the vector input_list: if checked, the selected field is used as attribute for the conversion; pixels of the output raster have the same values as the vector attribute;
  • checkbox Use constant value input_number: if checked, the polygons are converted to raster using the selected constant value;
  • Select the type of conversion input_list: select the type of conversion between Center of pixels and All pixels touched:
    • Center of pixels: during the conversion, vector is compared to the reference raster; output raster pixels are attributed to a polygon if pixel center is within that polygon;
    • All pixels touched: during the conversion, vector is compared to the reference raster; output raster pixels are attributed to a polygon if pixel touches that polygon;
  • Select the reference raster input_list: select a reference raster; pixels of the output raster have the same size and alignment as the reference raster;
  • reload: refresh layer list;

4.4.6.1. Run

  • RUN run: choose the output destination and start the conversion to raster;

4.4.7. Clip multiple rasters

_images/clip_multiple_rasters.jpg

clip_tool Clip multiple rasters

This tab allows for cutting several image bands at once, using a rectangle defined with point coordinates or a boundary defined with a vector.

4.4.7.1. Raster list

  • reload: refresh layer list;
  • select_all: select all the rasters;

4.4.7.2. Clip coordinates

Set the Upper Left (UL) and Lower Right (LR) point coordinates of the rectangle used for clipping; it is possible to enter the coordinates manually. Alternatively use a vector.

  • UL X input_number: set the UL X coordinate;
  • UL Y input_number: set the UL Y coordinate;
  • LR X input_number: set the LR X coordinate;
  • LR Y input_number: set the LR Y coordinate;
  • radiobutton Show: show or hide the clip area drawn in the map;
  • pointer: define a clip area by drawing a rectangle in the map; left click to set the UL point and right click to set the LR point; the area is displayed in the map;
  • checkbox Use vector for clipping input_list: if checked, use the selected vector (already loaded in QGIS) for clipping; UL and LR coordinates are ignored;
  • checkbox Use vector field for output name input_list: if checked, a vector field is selected for clipping while iterating through each vector polygon and the corresponding field value is added to the output name;
  • checkbox Use temporary ROI for clipping: if checked, use a temporary ROI (see ROI Signature list) for clipping; UL and LR coordinates are ignored;
  • reload: refresh layer list;
  • checkbox NoData value input_number: if checked, set the value for NoData pixels (e.g. pixels outside the clipped area);
  • Output name prefix input_text: set the prefix for output file names (default is clip);

4.4.7.3. Run

  • RUN run: choose an output destination and clip selected rasters; only rasters selected in the Raster list are clipped and automatically loaded in QGIS;

4.4.8. Split raster bands

_images/split_raster_tab.jpg

split_raster Split raster bands

Split a multiband raster to single bands.

4.4.8.1. Raster input

  • Select a multiband raster input_list: select a multiband raster already loaded in QGIS;
  • reload: refresh layer list;
  • Output name prefix input_text: set the prefix for output file names (default is split);

4.4.8.2. Run

  • RUN run: choose the output destination and split selected raster; output bands are automatically loaded in QGIS;

4.4.9. Stack raster bands

_images/stack_raster_tab.jpg

stack_raster Stack raster bands

Stack raster bands into a single file.

4.4.9.1. Raster list

  • reload: refresh layer list;
  • select_all: select all the rasters;

4.4.9.2. Run

  • RUN run: choose the output destination and stack selected rasters; output is automatically loaded in QGIS;

4.4.10. Mosaic band sets

_images/mosaic_bandsets_tab.jpg

mosaic_tool Mosaic band sets

This tool allows for the mosaic of band sets, merging the corresponding bands of two or more band sets defined in the Band set. An output band is created for every corresponding set of bands in the band sets.

NoData values of one band set are replaced by the values of the other band sets.

4.4.10.1. Mosaic of band sets

  • Band set list input_text: list if band sets defined in the Band set; in case of overlapping images, the pixel values of the first band set in the list are assigned.
  • checkbox Use NoData value input_number: if checked, set the value of NoData pixels, ignored during the calculation;
  • Output name prefix input_text: set the prefix for output file names (default is mosaic);

4.4.10.2. Run

  • RUN run: select an output directory and start the mosaic process;

4.4.11. Cloud masking

_images/cloud_masking_tab.jpg

cloud_masking_tool Cloud masking

This tool allows for cloud masking, based on the values of a raster mask, creating an output masked band for each band of the Band set. NoData is set in all the bands of the Band set for pixels corresponding to clouds.

4.4.11.1. Mask of band set

  • Select input band set input_number: select the input Band set to be masked;
  • Select the classification input_list: select a classification raster (already loaded in QGIS) which contains a cloud class;
  • reload: refresh layer list;
  • Mask class values input_text: set the class values to be masked; class values must be separated by , and - can be used to define a range of values (e.g. 1, 3-5, 8 will select classes 1, 3, 4, 5, 8); if the text is red then the expression contains errors;
  • checkbox Use buffer of pixel size input_number: if checked, a buffer is created for masked area, corresponding to the defined number of pixels; this can be useful to dilate masked area in case the mask doesn’t cover the thinner border of clouds;
  • NoData value: set the value of NoData pixels, corresponding to clouds;
  • Output name prefix input_text: set the prefix for output file names (default is mask);

4.4.11.2. Run

  • RUN run: select an output directory and start the mask process;

4.5. Band processing

The tab band_processing Band processing provides several functions that can be applied to the Band set.

4.5.1. Band combination

_images/band_combination_tab.jpg

band_combination Band combination

This tab allows for the combination of bands loaded in a Band set. This tool is intended for combining classifications in order to get a raster where each value corresponds to a combination of class values. A combination raster is produced as output and the area of each combination is reported in an text file.

4.5.1.1. Combination of band values

  • Select input band set (of classifications) input_number: select the input Band set;

4.5.1.2. Run

  • RUN run: choose the output destination and start the calculation; also, the details about the combinations are displayed in the tab Output and saved in a .txt file in the output directory;

4.5.2. PCA

_images/pca_tab.jpg

pca_tool PCA

This tab allows for the PCA (Principal Component Analysis) of bands loaded in the Band set.

4.5.2.1. Principal Component Analysis of Band set

  • Select input band set input_number: select the input Band set;
  • checkbox Number of components input_number: if checked, set the number of calculated components; if unchecked, all the components are calculated;
  • checkbox Use NoData value input_number: if checked, set the value of NoData pixels, ignored during the calculation;

4.5.2.2. Run

  • RUN run: select an output directory and start the calculation process; principal components are calculated and saved as raster files; also, the details about the PCA are displayed in the tab Output and saved in a .txt file in the output directory;

4.5.3. Clustering

_images/clustering_tab.jpg

clustering Clustering

This tab allows for the Clustering of a Band set. In particular, K-means and ISODATA methods are available.

4.5.3.1. Clustering of band set

  • Select input band set input_number: select the input Band set;
  • Method radiobutton K-means radiobutton ISODATA: select the clustering method K-means or ISODATA;
  • checkbox Distance threshold input_number: if checked, for K-means: iteration is terminated if distance is lower than threshold; for ISODATA: signatures are merged if distance is greater than threshold;
  • Number of classes input_number: number of desired output classes;
  • Max number of iterations input_number: maximum number of iterations if Distance threshold is not reached;
  • ISODATA max standard deviation input_number: maximum standard deviation considered for splitting a class, for ISODATA algorithm only;
  • ISODATA minimum class size in pixels input_number: desired minimum class size in pixels, for ISODATA algorithm only;
  • checkbox Use NoData value input_number: if checked, set the value of NoData pixels, ignored during the calculation;

4.5.3.2. Seed signatures

  • radiobutton Seed signatures from band values radiobutton Use Signature list as seed signatures radiobutton Use random seed signatures: select one options for seed signatures that start the iteration; the option Seed signatures from band values divides the spectral space of the Band set to get spectral signatures; the option Use Signature list as seed signatures uses the spectral signatures checked in ROI Signature list; the option Use random seed signatures randomly selects the spectral signatures of pixels in the Band set;
  • Distance algorithm radiobutton Minimum Distance radiobutton Spectral Angle Mapping: select Minimum Distance or * Spectral Angle Mapping for spectral distance calculation;
  • checkbox Save resulting signatures to Signature list: if checked, save the resulting spectral signatures in the ROI Signature list;

4.5.3.3. Run

  • RUN run: choose the output destination and start the calculation;

4.5.4. Spectral distance

_images/spectral_distance_tab.jpg

spectral_distance Spectral distance

This tab allows for calculating the spectral distance between every corresponding pixel of two band sets. The output is a raster containing the spectral distance of each pixel. Optionally, a threshold can be defined for creating a binary raster of values below and above the threshold.

4.5.4.1. Spectral distance of band sets

  • Select first input band set input_number: select the first input Band set;
  • Select second input band set input_number: select the second input Band set;
  • Distance algorithm radiobutton Minimum Distance radiobutton Spectral Angle Mapping: select Minimum Distance or * Spectral Angle Mapping for spectral distance calculation;
  • checkbox Distance threshold input_number: if checked, a binary raster of values below and above the threshold is created;

4.5.4.2. Run

  • RUN run: choose the output destination and start the calculation;

4.6. Postprocessing

The tab post_process Postprocessing provides several functions that can be applied to the classification output.

4.6.1. Accuracy

_images/accuracy_tab.jpg

accuracy_tool Accuracy

This tab allows for the validation of a classification (read Accuracy Assessment ). Classification is compared to a reference raster or reference vector (which is automatically converted to raster). If a vector is selected as reference, it is possible to choose a field describing class values.

Several statistics are calculated such as overall accuracy, user’s accuracy, producer’s accuracy, and Kappa hat. The output is an error raster that is a .tif file showing the errors in the map, where pixel values represent the categories of comparison (i.e. combinations identified by the ErrorMatrixCode in the error matrix) between the classification and reference. Also, a text file containing the error matrix (i.e. a .csv file separated by tab) is created with the same name defined for the .tif file.

4.6.1.1. Input

  • Select the classification to assess input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Select the reference vector or raster input_list: select a raster or a vector (already loaded in QGIS), used as reference layer (ground truth) for the accuracy assessment;
  • reload: refresh layer list;
  • Vector field input_list: if a vector is selected as reference, select a vector field containing numeric class values;

4.6.1.2. Run

  • RUN run: choose the output destination and start the calculation; the error matrix is displayed in the tab Output and the error raster is loaded in QGIS;

4.6.2. Land cover change

_images/land_cover_change_tab.jpg

land_cover_change Land cover change

The tab Land cover change allows for the comparison between two classifications in order to assess land cover changes. Output is a land cover change raster (i.e. a file .tif showing the changes in the map, where each pixel represents a category of comparison (i.e. combinations) between the two classifications, which is the ChangeCode in the land cover change statistics) and a text file containing the land cover change statistics (i.e. a file .csv separated by tab, with the same name defined for the .tif file).

4.6.2.1. Input

  • Select the reference classification input_list: select a reference classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Select the new classification input_list: select a new classification raster (already loaded in QGIS), to be compared with the reference classification;
  • reload: refresh layer list;
  • checkbox Report unchanged pixels: if checked, report also unchanged pixels (having the same value in both classifications);

4.6.2.2. Run

  • RUN run: choose the output destination and start the calculation; the land cover change statistics are displayed in the tab Output (and saved in a text file) and the land cover change raster is loaded in QGIS;

4.6.3. Classification report

_images/classification_report_tab.jpg

report_tool Classification report

This tab allows for the calculation of class statistics such as number of pixels, percentage and area (area unit is defined from the image itself).

4.6.3.1. Input

  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • checkbox Use NoData value input_number: if checked, NoData value will be excluded from the report;

4.6.3.2. Run

  • RUN run: choose the output destination and start the calculation; the report is saved in a text file and displayed in the tab Output;

4.6.4. Cross classification

_images/cross_classification_tab.jpg

cross_classification Cross classification

This tab allows for the calculation of a cross classification raster and matrix. Classification is compared to a reference raster or reference vector (which is automatically converted to raster). This is useful for calculating the area for every combination between reference classes and classification values. If a vector is selected as reference, it is possible to choose a field describing class values.

The output is a cross raster that is a .tif file where pixel values represent the categories of comparison (i.e. combinations identified by the CrossMatrixCode) between the classification and reference. Also, a text file containing the cross matrix (i.e. a .csv file separated by tab) is created with the same name defined for the .tif file.

4.6.4.1. Input

  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • checkbox Use NoData value input_number: if checked, NoData value will be excluded from the calculation;
  • Select the reference vector or raster input_list: select a raster or a vector (already loaded in QGIS), used as reference layer;
  • reload: refresh layer list;
  • Vector field input_list: if a vector is selected as reference, select a vector field containing numeric class values;

4.6.4.2. Run

  • RUN run: choose the output destination and start the calculation; the cross matrix is displayed in the tab Output and the cross raster is loaded in QGIS;

4.6.5. Class signature

_images/class_signature_tab.jpg

class_signature Class signature

This tab allows for the calculation of the mean spectral signature of each class in a classification using a Band set.

  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Select input band set input_number: select the input Band set for spectral signature calculation;
  • checkbox Save resulting signatures to Signature list: if checked, save the resulting spectral signatures to ROI Signature list;

4.6.5.1. Run

  • RUN run: choose the output destination and start the conversion;

4.6.6. Classification to vector

_images/classification_vector_tab.jpg

class_to_vector_tool Classification to vector

This tab allows for the conversion of a classification raster to vector shapefile.

  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;

4.6.6.1. Symbology

  • checkbox Use code from Signature list input_list: if checked, color and class information are defined from ROI Signature list:
    • MC ID: use the ID of macroclasses;
    • C ID: use the ID of classes;

4.6.6.2. Run

  • RUN run: choose the output destination and start the conversion;

4.6.7. Reclassification

_images/reclassification_tab.jpg

reclassification_tool Reclassification

This tab allows for the reclassification (i.e. assigning a new class code to raster pixels). In particular, it eases the conversion from C ID to MC ID values.

  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;

4.6.7.1. Values

  • checkbox calculate C ID to MC ID values: if checked, the reclassification table is filled according to the ROI Signature list when Calculate unique values enter is clicked;
  • Calculate unique values enter: calculate unique values in the classification and fill the reclassification table;
  • input_table Values: table containing the following fields;
    • Old value: set the expression defining old values to be reclassified; Old value can be a value or an expressions defined using the variable name raster (custom names can be defined in Variable name for expressions ), following Python operators (e.g. raster > 3 select all pixels having value > 3 ; raster > 5 | raster < 2 select all pixels having value > 5 or < 2 ; raster >= 2 & raster <= 5 select all pixel values between 2 and 5);
    • New value: set the new value for the old values defined in Old value;
  • add: add a row to the table;
  • remove: remove highlighted rows from the table;

4.6.7.2. Symbology

  • checkbox Use code from Signature list input_list: if checked, color and class information are defined from ROI Signature list:
    • MC ID: use the ID of macroclasses;
    • C ID: use the ID of classes;

4.6.7.3. Run

  • RUN run: choose the output destination and start the calculation; reclassified raster is loaded in QGIS;

4.6.8. Edit raster

_images/edit_raster_tab.jpg

edit_raster Edit raster

This tab allows for the direct editing of pixel values in a raster. Only pixels beneath ROI polygons or vector polygons are edited.

Attention: the input raster is directly edited; it is recommended to create a backup copy of the input raster before using this tool in order to prevent data loss.

This tool can rapidly edit large rasters, especially when editing polygons are small, because pixel values are edited directly. In addition, the SCP Edit Toolbar is available for easing the raster editing using multiple values.

  • Select the input raster input_list: select a raster (already loaded in QGIS);
  • reload: refresh layer list;

4.6.8.1. Edit raster values

  • radiobutton Edit values using ROI polygons: if checked, raster is edited using temporary ROI polygons in the map;
  • radiobutton Edit values using a vector input_list: if checked, raster is edited using all the polygons of selected vector;
  • reload: refresh layer list;

4.6.8.2. Edit options

  • checkbox Use the value field of the vector input_list: if checked, raster is edited using the selected vector (in Edit values using a vector) and the polygon values of selected vector field;
  • checkbox Use constant value input_number: if checked, raster is edited using the selected constant value;
  • checkbox Use expression input_text: if checked, raster is edited according to the entered expression; the expression must contain one or more where; accepted variable are raster representing the input raster value and vector representing the vector value if selected; the following example expression where(raster == 1, 2, raster) is already entered, which sets 2 where raster equals 1, and leaves unchanged the values where raster is not equal to 1;

4.6.8.3. Run

  • undo_edit_raster: undo the last raster edit (available only when using ROI polygons);
  • RUN run: edit the raster;

4.6.9. Classification sieve

_images/classification_sieve_tab.jpg

classification_sieve Classification sieve

This tab allows for the replacement of isolated pixel values with the value of the largest neighbour patch (based on GDAL Sieve ). It is useful for removing small patches from a classification.

  • Select the classification input_list: select a raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Size threshold input_number: size of the patch to be replaced (in pixel unit); all patches smaller the the selected number of pixels will be replaced by the value of the largest neighbour patch;
  • Pixel connection input_list: select the type of pixel connection:
    • 4: in a 3x3 window, diagonal pixels are not considered connected;
    • 8: in a 3x3 window, diagonal pixels are considered connected;

4.6.9.1. Run

  • RUN run: choose the output destination and start the calculation;

4.6.10. Classification erosion

_images/classification_erosion_tab.jpg

classification_erosion Classification erosion

This tab allows for removing the border of a class patch (erosion), defining the class values to be eroded and the number of pixels from the border. It is useful for classification refinement.

  • Select the classification input_list: select a raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Class values input_text: set the class values to be eroded; class values must be separated by , and - can be used to define a range of values (e.g. 1, 3-5, 8 will select classes 1, 3, 4, 5, 8); if the text is red then the expression contains errors;
  • Size in pixels input_number: number of pixels to be eroded from the border;
  • Pixel connection input_list: select the type of pixel connection:
    • 4: in a 3x3 window, diagonal pixels are not considered connected;
    • 8: in a 3x3 window, diagonal pixels are considered connected;

4.6.10.1. Run

  • RUN run: choose the output destination and start the calculation;

4.6.11. Classification dilation

_images/classification_dilation_tab.jpg

classification_dilation Classification dilation

This tab allows for dilating the border of a class patch, defining the class values to be dilated and the number of pixels from the border. It is useful for classification refinement.

  • Select the classification input_list: select a raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Class values input_text: set the class values to be dilated; class values must be separated by , and - can be used to define a range of values (e.g. 1, 3-5, 8 will select classes 1, 3, 4, 5, 8); if the text is red then the expression contains errors;
  • Size in pixels input_number: number of pixels to be dilated from the border;
  • Pixel connection input_list: select the type of pixel connection:
    • 4: in a 3x3 window, diagonal pixels are not considered connected;
    • 8: in a 3x3 window, diagonal pixels are considered connected;

4.6.11.1. Run

  • RUN run: choose the output destination and start the calculation;

4.7. Band calc

_images/band_calc_tab.jpg

bandcalc_tool Band calc

The Band calc allows for the raster calculation for bands (i.e. calculation of pixel values) using NumPy functions . Raster bands must be already loaded in QGIS. Input rasters must be in the same projection.

In addition, it is possible to calculate a raster using decision rules.

4.7.1. Band list

  • input_table Band list: table containing a list of single band rasters (already loaded in QGIS);
    • Variable: variable name defined automatically for every band (e.g. raster1, raster2);
    • Band name: band name (i.e. the layer name in QGIS);
  • reload: refresh image list;

4.7.2. Expression

Enter a mathematical expression for raster bands. In particular, NumPy functions can be used with the prefix np. (e.g. np.log10(raster1) ). For a list of NumPy functions see the NumPy page .

The expression can work with both Variable and Band name (between double quotes). Also, bands in the Band set can be referenced directly; for example bandset#b1 refers to band 1 of the Band set. Double click on any item in the Band list for adding its name to the expression. In addition, the following variables related to Band set the are available:

  • “#BLUE#”: the band with the center wavelength closest to 0.475 \(\mu m\);
  • “#RED#”: the band with the center wavelength closest to 0.65 \(\mu m\);
  • “#NIR#”: the band with the center wavelength closest to 0.85 \(\mu m\);

Variables for output name are available:

  • #BANDSET#: the name of the first band in the Band set;
  • #DATE#: the current date and time (e.g. 20161110_113846527764);

If text in the Expression is green, then the syntax is correct; if text is red, then the syntax is incorrect and it is not possible to execute the calculation.

It is possible to enter multiple expressions separated by newlines such as the following example:

"raster1" + "raster2"

"raster3" - "raster4"

The above example calculates two new rasters in the output directory with the suffix _1 (e.g. calc_raster_1 ) for the first expression and _2 (e.g. calc_raster_2 ) for the second expression. Also, it is possible to define the output name using the symbol @ followed by the name, such as the following example:

"raster1" + "raster2" @ calc_1

"raster3" - "raster4" @ calc_2

The following buttons are available:

  • +: plus;
  • -: minus;
  • *: product;
  • /: ratio;
  • ^: power;
  • V: square-root;
  • (: open parenthesis;
  • ): close parenthesis;
  • >: greater then;
  • <: less then;
  • ln: natural logarithm;
  • π: pi;
  • ==: equal;
  • !=: not equal;
  • sin: sine;
  • asin: inverse sine;
  • cos: cosine;
  • acos: inverse cosine;
  • tan: tangent;
  • atan: inverse tangent;
  • where: conditional expression according to the syntax where( condition , value if true, value if false) (e.g. where("raster1" == 1, 2, "raster1"));
  • exp: natural exponential;
  • nodata: NoData value of raster (e.g. nodata("raster1")); it can be used as value in the expression (e.g. where("raster1" == nodata("raster1"), 0, "raster1"));

4.7.3. Index calculation

Index calculation allows for entering a spectral index expression (see Spectral Indices).

  • Index calculation input_list: list of spectral indices:
    • NDVI: if selected, the NDVI calculation is entered in the Expression ( (( "#NIR#" - "#RED#") / ( "#NIR#" + "#RED#") @ NDVI) );
    • EVI: if selected, the EVI calculation is entered in the Expression ( 2.5 * ( "#NIR#" - "#RED#" ) / ( "#NIR#" + 6 * "#RED#" - 7.5 * "#BLUE#" + 1) @ EVI );
  • open_file: open a text file (.txt) containing custom expressions to be listed in Index calculation; the text file must contain an expression for each line; each line must be in the form expression_name; expression (separated by ;) where the expression_name is the expression name that is displayed in the Index calculation; if you open an empty text file, the default values are restored; following an example of text content:

    NDVI; ( "#NIR#" - "#RED#" ) / ( "#NIR#" + "#RED#" ) @NDVI
    EVI; 2.5 * ( "#NIR#" - "#RED#" ) / ( "#NIR#" + 6 * "#RED#" - 7.5 * "#BLUE#" + 1) @EVI
    SR; ( "#NIR#" / "#RED#" ) @SR
    

4.7.4. Decision rules

_images/band_calc_decision_rules.jpg

Decision rules allows for the calculation of an output raster based on rules. Rules are conditional statements based on other rasters; if the Rule is true, the corresponding Value is assigned to the output pixel.

Rules are verified from the first to the last row in the table; if the first Rule is false, the next Rule is verified for that pixel, until the last rule. If multiple rules are true for a certain pixel, the value of the first Rule is assigned to that pixel. The NoData value is assigned to those pixels where no Rule is true.

  • input_table Decision rules: table containing the following fields;
    • Value: the value assigned to pixels if the Rule is true;
    • Rule: the rule to be verified (e.g. "raster1" > 0); multiple conditional statements can be entered separated by ; (e.g. "raster1" > 0; "raster2" < 1 which means to set the Value where raster1 > 0 and raster2 < 1);
  • move_up: move highlighted rule up;
  • move_down: move highlighted rule down;
  • add: add a new row to the table;
  • remove: delete the highlighted rows from the table;
  • reset: clear the table;
  • export: export the rules to a text file that can be imported later;
  • import: import rules from a text file;

4.7.5. Output raster

The output raster is a .tif file, with the same spatial resolution and projection of input rasters; if input rasters have different spatial resolutions, then the highest resolution (i.e. minimum pixel size) is used for output raster.

  • checkbox Use NoData value input_number: if checked, set the value of NoData pixels in output raster;
  • Extent: if the following options are unchecked, the output raster extent will include the extents of all input rasters;
    • checkbox Intersection: if checked, the extent of output raster equals the intersection of input raster extents (i.e. minimum extent);
    • checkbox Same as input_list: if checked, the extent of output raster equals the extent of “Map extent” (the extent of the map currently displayed) or a selected layer;
  • radiobutton Align: if checked, and checkbox Same as is checked selecting a raster, the calculation is performed using the same extent and pixel alignment of selected raster;
  • RUN run: if Expression is active and text is green, choose the output destination and start the calculation based on Expression; if Decision rules is active and text is green, choose the output destination and start the calculation based on Decision rules;

4.8. Batch

_images/batch_tab.jpg

batch_tool Batch

This tab allows for the automatic execution (batch) of several SCP functions using a scripting interface.

4.8.1. Batch

Enter a batch expression; each function must be in a new line. Functions have the following structure:

function name; function options

Each function has options, identified by a name, with the following structure:

option name: option argument

Options must be separated by the character ; . Each function option represents an option in the corresponding interface of SCP; option arguments of type text must be between the character ' ; in case of checkboxes, the value 1 represents checked, while the value 0 represents unchecked. A new line beginning with # can be used for commenting.

According to the function, some of the options are mandatory while other options can be omitted from the expression. Option names that contain path require the full path to a file. Some options require multiple arguments such as lists; lists must be separated by , .

If the expression contains errors, the text is red. An expression check label is displayed with a brief description of the error.

  • reset: clear the expression;
  • export: export the batch expression to a file;
  • import: import a previously saved batch expression from file;
A table Functions is displayed at the right side; double click to insert a function in the expression; the following functions are available with the corresponding options:
  • Accuracy: calculate accuracy (accuracy;classification_file_path : '';reference_file_path : '';shapefile_field_name : '';output_raster_path : '');
  • ASTER: ASTER conversion (aster_conversion;input_raster_path : '';celsius_temperature : 0;apply_dos1 : 0;use_nodata : 1;nodata_value : 0;create_bandset : 1;output_dir : '');
  • Band calc: band calculation (band_calc;expression : '';output_raster_path : '';extent_same_as_raster_name : '';extent_intersection : 1;set_nodata : 0;nodata_value : 0);
  • Band combination: band combination (band_combination;band_set : 1;output_raster_path : '');
  • Class signature: class signature (class_signature;input_raster_path : '';band_set : 1;save_signatures : 1;output_text_path : '');
  • Classification output: perform classification (classification;use_macroclass : 0;algorithm_name  : 'Minimum Distance';use_lcs : 0;use_lcs_algorithm : 0;use_lcs_only_overlap : 0;apply_mask : 0;mask_file_path : '';vector_output : 0;classification_report : 0;save_algorithm_files : 0;output_classification_path : '');
  • Classification dilation: dilation of a classification (classification_dilation;input_raster_path : '';class_values : '';size_in_pixels : 1;pixel_connection : 4;output_raster_path : '');
  • Classification erosion: erosion of a classification (classification_erosion;input_raster_path : '';class_values : '';size_in_pixels : 1;pixel_connection : 4;output_raster_path : '');
  • Classification report: report of a classification (classification_report;input_raster_path : '';use_nodata : 0;nodata_value : 0;output_report_path : '');
  • Classification sieve: classification sieve(classification_sieve;input_raster_path : '';size_threshold : 2;pixel_connection : 4;output_raster_path : '');
  • Classification to vector: convert classification to vector (classification_to_vector;input_raster_path : '';use_signature_list_code : 1;code_field : 'C_ID';output_vector_path : '');
  • Clip multiple rasters: clip multiple rasters (clip_multiple_rasters;input_raster_path : '';output_dir : '';use_shapefile : 0;shapefile_path : '';ul_x : '';ul_y : '';lr_x : '';lr_y : '';nodata_value : 0;output_name_prefix : 'clip');
  • Cloud masking: cloud masking (cloud_masking;band_set : 1;input_raster_path : '';class_values : '';use_buffer : 1;size_in_pixels : 1;nodata_value : 0;output_name_prefix : 'mask';output_dir : '');
  • Clustering: clustering (clustering;band_set : 1;clustering_method : 1;use_distance_threshold : 1;threshold_value : 0.0001;number_of_classes : 10;max_iterations : 10;isodata_max_std_dev : 0.0001;isodata_min_class_size : 10;use_nodata : 0;nodata_value : 0;seed_signatures : 1;distance_algorithm : 1;save_signatures : 0;output_raster_path : '');
  • Cross classification: cross classification (cross_classification;classification_file_path : '';use_nodata : 0;nodata_value : 0;reference_file_path : '';shapefile_field_name : '';output_raster_path : '');
  • Edit raster: edit raster values using a shapefile); (edit_raster_using_shapefile;input_raster_path : '';input_vector_path : '';vector_field_name : '';constant_value : 0;expression :  'where(raster == 1, 2, raster)');
  • Land cover change: calculate land cover change (land_cover_change;reference_raster_path : '';new_raster_path : '';output_raster_path : '');
  • Landsat: Landsat conversion (landsat_conversion;input_dir : '';mtl_file_path : '';celsius_temperature : 0;apply_dos1 : 0;use_nodata : 1;nodata_value : 0;pansharpening : 0;create_bandset : 1;output_dir : '');
  • MODIS: MODIS conversion (modis_conversion;input_raster_path : '';reproject_wgs84 : 1;use_nodata : 1;nodata_value : -999;create_bandset : 1;output_dir : '');
  • PCA: Principal Component Analysis (pca;use_number_of_components : 0, number_of_components : 2;use_nodata : 1;nodata_value : 0;output_dir : '');
  • Reclassification: raster reclassification (reclassification;input_raster_path : '';value_list : 'oldVal-newVal;oldVal-newVal';use_signature_list_code : 1;code_field : 'MC_ID';output_raster_path : '');
  • Sentinel-2: Sentinel-2 conversion (sentinel2_conversion;input_dir : '';mtd_safl1c_file_path : '';apply_dos1 : 0;use_nodata : 1;nodata_value : 0;create_bandset : 1;output_dir : '');
  • Sentinel-3: Sentinel-3 conversion (sentinel3_conversion;input_dir : '';apply_dos1 : 0;dos1_only_blue_green : 1;use_nodata : 1;nodata_value : 0;create_bandset : 1;output_dir : '';band_set : 1);
  • Spectral distance: spectral distance of band sets (spectral_distance;first_band_set : 1;second_band_set : 2;distance_algorithm  : 1;use_distance_threshold : 1;threshold_value : 0.1;output_dir : '');
  • Split raster bands: split raster to single bands (split_raster_bands;input_raster_path : '';output_dir : '';output_name_prefix : 'split');
  • Stack raster bands: stack rasters into a single file (stack_raster_bands;input_raster_path : '';output_raster_path : '');
  • Vector to raster: convert vector to raster (vector_to_raster;vector_file_path : '';use_value_field : 1;vector_field_name : '';constant_value : 1;reference_raster_path : '';type_of_conversion : 'Center of pixels';output_raster_path : '');
In addition, the following functions are available:
  • Add a new band set: add a new empty band set (add_new_bandset;);
  • Add raster to QGIS: add a raster to QGIS (add_raster;input_raster_path : '';input_raster_name : '');
  • Create band set: create a Band set assigning bands (create_bandset;raster_path_list : '';center_wavelength : '';wavelength_unit : 1;multiplicative_factor : '';additive_factor : '');
  • Open training input: open a training input file (open_training_input;training_file_path : '');
  • Remove band set: remove a band set by the number thereof (remove_bandset;band_set : 1);
  • Select band set: select a band set (active band set) by the number thereof (select_bandset;band_set : 1);
  • Set working directory: set a working directory (argument is the path to a directory) (!working_dir!;'');

If a working directory is defined, !working_dir! can be entered in other functions where a path is required (e.g. add_raster;input_raster_path : '!working_dir!/raster1.tif';input_raster_name : 'raster1.tif'); An example of batch expression is:

!working_dir!; '/home/user/Desktop/temp/'
add_raster;input_raster_path : '!working_dir!/raster1.tif';input_raster_name : 'raster1.tif'
band_calc;expression : 'where("raster1.tif" > 1, 1,0)';output_raster_path : '!working_dir!/calc1.tif';set_nodata : 1;nodata_value : 0
band_calc;expression : '"raster1.tif" * "calc1.tif"';output_raster_path : '!working_dir!/calc2.tif';extent_intersection : 0

4.8.2. Run

  • RUN run: if text in the batch expression is green, start the batch processes;

4.9. Settings

The tab settings_tool Settings allows for the customization of SCP.

4.9.1. Processing

_images/settings_processing_tab.jpg

Processing

4.9.1.1. Classification process

  • checkbox Play sound when finished registry_save: if checked, play a sound when the classification process is completed;
  • checkbox Use virtual rasters for temp files registry_save: if checked, create virtual rasters for certain temporary files, instead of creating real rasters; it is useful for reducing disk space usage during calculations;
  • checkbox Raster compression registry_save: if checked, a lossless compression (DEFLATE or PACKBITS) is applied to raster outputs in order to save disk space; it is recommended to check this option, however compressed files are sometimes larger than files without compression;

4.9.1.2. SMTP process notification

  • SMTP server input_text registry_save: the SMTP server to login for sending a notification email when all the SCP processes are finished (a notification is sent also in case of error, but not in case of crash);
  • user input_text registry_save: the SMTP server user;
  • password input_text registry_save: the SMTP server password;
  • Send email of completed process to input_text registry_save: a list of addresses (separated by comma) to send the notification email to;

4.9.1.3. RAM

  • Available RAM (MB) input_number registry_save: set the available RAM (in MB) that is used during the processes in order to improve the SCP performance; this value should be half of the system RAM (e.g. 1024MB if system has 2GB of RAM); in case of errors, set a value lower than 512MB;

4.9.1.4. Temporary directory

  • open_dir registry_save: select a new temporary directory where temporary files are saved during processing; the path to the current temporary directory is displayed; default is a system temporary directory;
  • reset: reset to default temporary directory;

4.9.2. Interface

Customization of the interface.

_images/settings_interface_tab.jpg

Interface

4.9.2.1. Field names of training input

Set the names of fields in the Training input . Changing field names should usually be avoided.

  • MC ID field input_text registry_save: name of the Macroclass ID field (default is MC_ID);
  • MC Info field input_text registry_save: name of the Macroclass Information field (default is MC_info);
  • C ID field input_text registry_save: name of the Class ID field (default is C_ID);
  • C Info field input_text registry_save: name of the Class Information field (default is C_info);
  • reset: reset field names to default;

4.9.2.2. ROI style

Change ROI color and transparency for a better visualization of temporary ROIs on the map.

  • ROI color registry_save: button for changing ROI color;
  • Transparency input_slider registry_save: change ROI transparency;
  • reset: reset ROI color and transparency to default;

4.9.2.3. Variable name for expressions

Set the variable name used in expressions of the Reclassification and Edit raster .

  • Variable name input_text registry_save: set variable name (default is raster);
  • reset: reset variable name to default;

4.9.2.4. Temporary group name

Set the temporary group name in QGIS Layers used for temporary layers .

  • Group name input_text registry_save: set group name (default is Class_temp_group);
  • reset: reset group name to default;

4.9.2.5. Dock

  • checkbox Download news on startup: if checked, news about the SCP and related services are downloaded on startup and displayed in Dock;

4.9.3. Debug

_images/settings_debug_tab.jpg

Debug

Debugging utilities for the creation of a Log file (i.e. recording of SCP activities for reporting issues) and testing SCP dependencies.

If you found a plugin error, please read How can I report an error? .

4.9.3.1. Log file

  • checkbox Records events in a log file registry_save: if checked, start recording events in a Log file;
  • export: export the Log file (i.e. a .txt file);
  • reset: clear the content of Log file;

4.9.3.2. Test

  • Test dependencies enter: test SCP dependencies (GDAL, GDAL subprocess, NumPy, SciPy, Matplotlib, Internet connection); results are displayed in a window;