3.2. SCP dock

3.2.1. Simplified SCP dock

_images/simplified_interface.png

Simplified SCP dock

A Simplified interface is loaded after the first installation of the plugin. It is especially designed for new users in order to ease the classification process, from the definition of input images to executing the classification algorithm.

Tüyo

The Complete interface can be loaded from the settings in the SCP menu, by deselecting Simplified interface and restarting QGIS.

_images/scp_menu_simplified.png

SCP menu with activated option for the simplified interface

The SCP includes tools for downloading and preprocessing satellite images. The interface includes buttons for opening the following tools:

download Download products

open the tab Download products

preprocessing Image conversion

open the tab Preprocessing

3.2.1.1. Band set definition

Image input in SCP is named band set, and it is saved with the QGIS project. It is recommended to load single band raster in a Band set.

The section Band set definition includes the following tools:

Tool symbol and name

Description

open_file Open file

open file explorer and add raster files (preferably single band raster) to the band set

plus Add layer

open a window to select single band rasters already loaded in QGIS and add them to the band set

move_up Move up

move highlighted bands upward

move_down Move down

move highlighted bands downward

reset Reset

clear all bands from band set

remove Delete row

remove highlighted bands from the band set

radiobutton RGB= input_list project_save

select a Color Composite that is applied to the Band set (complete interface) and displayed in the map; new color composites can be entered typing the band numbers separated by - (e.g., RGB = 4-3-2); use the button radiobutton to show/hide the band set in the map

Wavelength input_list

rapid definition of band center wavelength for the following satellite sensors such as Band order (integer values), Landsat 8 OLI, Sentinel-2

Tüyo

The Band set is also called active band set. The Complete interface allows for the creation of multiple band sets that can be used in other tools.

3.2.1.2. ROI & Signature list

ROIs are polygons used for the definition of the samples of land cover classes that are used by the classification algorithms. The SCP manages the ROIs by creating a file named Training input.

The Training input stores the ROI polygons and spectral signatures; depending on the algorithm, the training could be performed using ROI polygons (e.g., Random Forest) or spectral signatures (e.g., Spectral Angle Mapping). The Training input is displayed in QGIS as vector file.

Uyarı

In order to avoid data loss, do not edit the vector Training input using the QGIS tools. Use only the tools of SCP for managing the Training input.

SCP allows for the creation of temporary ROI polygons using a region growing algorithm or drawn manually with the tools provided in the Working toolbar (complete interface). These are temporary ROI polygons because the ROI creation is an interactive process, and one can refine the geometry according to photointerpreation. Then, one can save temporary ROI polygons in the Training input which is the actual input for classifications.

The Training input is composed of a vector part that stores the geometries and a spectral signature part, which are managed by SCP. A temporary layer is added to QGIS but the actual file is saved and modified during the editing in SCP.

The section ROI & Signature list includes the following tools:

Tool symbol and name

Description

open_file Open file

open a training input file; ROIs and spectral signatures are loaded in ROI & Signature list; the vector part of the training input is loaded in QGIS

new_file New file

create an empty training input file (.scpx); the vector part of the training input is loaded in QGIS; also a backup file is created (a file .scpx.backup in the same directory as the file .scpx) when the QGIS project is saved; to use the backup file simply rename it deleting the ending .backup extension and open it as training input

Training input input_text project_save

it displays the path to the training input file

reset Reset

remove the training input

import_spectral_library Import file

open the tab Import signatures

export_spectral_library Export ROIs

open the tab Export signatures and export highlighted items

delete_signature Delete ROI

delete highlighted ROIs

sign_plot Spectral plot

show the ROI spectral signature in the Spectral Signature Plot; spectral signature is calculated from the Band set (complete interface)

manual_ROI Spectral plot

activate the pointer to create a temporary ROI by drawing a polygon in the map; left click on the map to define the ROI vertices and right click to define the last vertex closing the polygon

roi_single Pointer

activate the pointer to create a temporary ROI using the region growing algorithm; left click on the map for creating the ROI

undo_save_roi

undo of ROI creation from the Training input; it is possible to undo a maximum of 10 actions

redo_save_roi

redo ROI creation in the Training input

Class input_number project_save

ROI class identifier

Name input_text project_save

ROI class name

save_roi Save

save the temporary ROI to the Training input using the defined classes and macroclasses; ROI is displayed in the ROI & Signature list

The tree list ROI & Signature list has the following fields:

  • Class: Class value used for classification; it can be edited with a single click

  • Name: Class Name; it can be edited with a single click

  • Color: Class color; double click to select a color for the class that is used in the classification

3.2.1.3. Classification

In SCP, land cover classes (and ROIs) are defined with a system of Classes. Each Class is identified by a value and a Name, but only the Class value is used for the classification process.

The classification can be performed for the entire image (see Algorithm) or for a part of it creating a Classification preview.

The section Classification includes the following tools:

Tool symbol and name

Description

Algorithm input_list

select a classification algorithm (additional parameters can be defined in Classification)

preview

activate the pointer for the creation of a Classification preview; left click the map to start the classification process and display the classification preview

RUN run

select an output and run the classification

This tool allows for the selection of one the following classification algorithms:

3.2.2. Complete interface

The Complete interface is designed for experienced users, and provides access to all the tools offered by the SCP. The Complete interface can be loaded from the settings in the SCP menu.

The Training input is composed of a vector part that stores the geometries and a spectral signature part, which are managed by SCP. A temporary layer is added to QGIS but the actual file is saved and modified during the editing in SCP.

In SCP, land cover classes (and ROIs) are defined with a system of Classes (Class ID) and Macroclasses (Macroclass ID) (see Classes and Macroclasses) that are used for the classification process; each Macroclass ID is related to a Macroclass Information (e.g. macroclass name) and each Class ID is related to a Class Information (e.g. class name), but only Macroclass ID and Class ID are used for the classification process.

The use of the Macroclass ID or Class ID for classifications is defined with the option Use MC ID or C ID in the Algorithm. Using Macroclass ID instead of Class ID is useful to group materials that belong to the same land cover class but have spectral signatures that are distant enough to be considered as different materials (e.g., different types of vegetation).

Spectral signatures of classes are calculated from the ROIs or can be imported from other sources (see Import signatures). It is worth pointing out that classification is always based on spectral signatures.

3.2.2.1. Home

_images/SCP_home.png

Home

The left side of SCP dock contains buttons for accessing the main functions of SCP. The tab Home contains the buttons for accessing the main functions of SCP:

bandset_tool

Band set (complete interface)

tools

Basic tools

download

Download products

preprocessing

Preprocessing

band_processing

Band processing

postprocessing

Postprocessing

bandcalc

Band calc

script_tool

Script (complete interface)

3.2.2.1.1. SCP news

This section displays news about the SCP and related services. News are downloaded on startup (internet connection required). It can be enabled or disabled in the settings Settings.

3.2.2.2. Training input

_images/roi_signature_list.png

Training input

This tool allows for the creation of the training input file (.scpx ) required for storing ROIs and spectral signatures. The training input file is created according to the characteristics of the active band set defined in Band set (complete interface). A new training input file should be created for every band set, unless the band sets have the same spectral characteristics and coordinate reference system.

Tool symbol and name

Description

open_file

open a training input file; ROIs and spectral signatures are loaded in ROI & Signature list; the vector part of the training input is loaded in QGIS

new_file

create an empty training input file (.scpx); the vector part of the training input is loaded in QGIS; also a backup file is created (a file .scpx.backup in the same directory as the file .scpx) when the QGIS project is saved; to use the backup file simply rename it deleting the ending .backup extension and open it as training input

Training input input_text project_save

it displays the path to the training input file

reset

remove the training input

The training input is displayed in QGIS as vector file. ROIs and spectral signatures are displayed in the ROI & Signature list.

Uyarı

In order to avoid data loss, do not edit the vector Training input using the QGIS tools. Use only the tools of SCP for managing the Training input.

3.2.2.2.1. ROI & Signature list

The tab ROI & Signature list displays the ROI polygons and spectral signatures contained in the training input file. The tab ROI & Signature list is structured as tree list, where every ROI is grouped in the corresponding Macroclass.

A filter for names can be defined in Filter input_text.

The tree list ROI & Signature list has the following fields:

  • MC ID: Macroclass ID is the root of corresponding ROIs and signatures; it can be edited with a single click; if the ID of a spectral signature is set 0, then pixels belonging to this signature are labelled as unclassified; every listed ROIs or signatures has a selection checkbox (only the spectral signatures checked in this list are used for the classification process);

  • C ID: Class ID; it can be edited with a single click;

  • Name: Macroclass and Class Name; it can be edited with a single click;

  • Type: type of the item:
    • R = only ROI polygon;

    • S = only spectral signature;

    • RS = both ROI and spectral signature;

  • Color: C ID color; double click to select a color for the class that is used in the classification;

Changes in the ROI & Signature list are applied to the file Training input only when the QGIS project is saved (but there is also the option checkbox Autosave). ROIs can be edited, deleted and merged from this list.

_images/example_roi_list.jpg

ROI & Signature list example

Tüyo

According to Algorithm, classifications performed using C ID have the colors defined for classes in the ROI & Signature list; classifications performed using MC ID have the colors defined for the macroclasses.

If an item is a ROI polygon, double click the item to zoom to that ROI in the map. Items in the list can be highlighted with the mouse left click.

Tüyo

ROIs and spectral signatures can be imported from other sources (see Import signatures) and exported (see Export signatures).

The following tools are available:

Tool symbol and name

Description

merge_sign

merge highlighted spectral signatures or ROIs obtaining a new signature calculated as the average of signature values for each band (covariance matrix is excluded)

add_sign_tool

calculate spectral signatures of highlighted ROIs using the active band set in Band set (complete interface)

delete_signature

delete highlighted ROIs and signatures

sign_plot

show the ROI spectral signature in the Spectral Signature Plot; spectral signature is calculated from the Band set (complete interface)

scatter_plot

add highlighted ROIs to the Scatter Plot

import_spectral_library

open the tab Import signatures

export_spectral_library

open the tab Export signatures and export highlighted items

ROI & Signature list is complementary to the Working toolbar (complete interface) and it allows for saving ROIs to the Training input defining classes and macroclasses. A Band set (complete interface) must be defined before the ROI creation, and ROI polygons must be inside the area of the Band set.

Tool symbol and name

Description

MC ID input_number project_save

ROI Macroclass ID

MC Name input_text project_save

ROI Macroclass Name

C ID input_number project_save

ROI Class ID

C Name input_text project_save

ROI Class Name

undo_save_roi

undo of ROI creation from the Training input; it is possible to undo a maximum of 10 actions

redo_save_roi

redo ROI creation in the Training input

checkbox Autosave project_save

if checked, automatically save the ROI & Signature list to the Training input every time a ROI is saved

checkbox Signature project_save

if checked, while saving a ROI, the spectral signature thereof is calculated (from Band set (complete interface) pixels under ROI polygon) and saved to Training input (calculation time depends on the band number of the active band set in Band set (complete interface))

save_roi

save the temporary ROI to the Training input using the defined classes and macroclasses; ROI is displayed in the ROI & Signature list

3.2.2.2.2. Right click menu

_images/scp_dock_menu.png

Right click menu

A right click on ROI & Signature list allows for opening a menu containing several functions to manage ROIs and spectral signatures.

Tool symbol and name

Description

zoom_to_ROI Zoom to

zoom to highlighted items (if ROI polygons) in the map

check Check/uncheck

check or uncheck highlighted items

select_all Clear selection

clear selection of highlighted items

docks Collapse/expand all

collapse or expand all macroclasses

enter Change MC ID

edit the macroclass of highlighted items (using the value MC ID input_number displayed in ROI & Signature list); if a macroclass is selected, the function is performed to all the included items

enter Change color

select a color for the highlighted items; if a macroclass is selected, the function is performed to all the included items

merge_sign Merge items

merge highlighted spectral signatures or ROIs obtaining a new signature calculated as the average of signature values for each band (covariance matrix is excluded); if a macroclass is selected, the function is performed to all the included items

add_sign_tool Calculate signatures

calculate spectral signatures of highlighted ROIs using the active band set in Band set (complete interface); if a macroclass is selected, the function is performed to all the included items

delete_signature Delete items

delete highlighted ROIs and signatures; if a macroclass is selected, the function is performed to all the included items;

sign_plot Add to spectral plot

show the ROI spectral signature in the Spectral Signature Plot; spectral signature is calculated from the Band set (complete interface); if a macroclass is selected, the function is performed to all the included items

scatter_plot Add to scatter plot

add highlighted ROIs to the Scatter Plot; if a macroclass is selected, the function is performed to all the included items

accuracy_tool Properties

show the properties of highlighted items;

import_spectral_library Import

open the tab Import signatures

export_spectral_library Export

open the tab Export signatures and export highlighted items

3.2.2.3. ROI options

_images/roi_options.png

ROI options

ROI options are useful for displaying pixel values or improving the creation of ROIs.

Tool symbol and name

Description

checkbox Display input_list project_save

if the ROI creation pointer is active (see Working toolbar (complete interface)), the pixel value of selected vegetation index is displayed on the map; vegetation indices available in the combo box are: NDVI (Normalized Difference Vegetation Index); EVI (Enhanced Vegetation Index); Custom (use the custom expression defined in the following line)

input_text project_save

set a custom expression; expression is based on the Band set and bands such as band 1 is referred to as “b1”, band 2 as “b2” and so on; also reference to band names such as “#NIR#” or “#RED#” can be used

checkbox Rapid ROI b. input_number

if checked, temporary ROI is created with region growing using only one Band set (complete interface) band (i.e.region growing is rapider); the band is defined by the Band set number; if unchecked, ROI is the result of the intersection between ROIs calculated on every band (i.e. region growing is slower, but ROI is spectrally homogeneous in every band)

checkbox Auto-plot

calculate automatically the temporary ROI spectral signature and display it in the Spectral Signature Plot (MC Name of this spectral signature is set tempo_ROI)

checkbox Auto-refresh ROI

calculate automatically a new temporary ROI while Region growing parameters in the Working toolbar (complete interface) are being changed

Maximum training buffer input_number

defines the maximum number of action for undo and redo ROIs; the higher is the number, the more is the required memory