8. Frequently Asked Questions

If you have comments or questions please join the Facebook group .

Before asking, please check the official site From GIS to Remote Sensing and the following Frequently Asked Questions.

8.1. Plugin installation

8.1.1. How to install the plugin manually?

The SCP can be installed manually (this can be useful when an internet connection is not available, or the installation is required on multiple computers), following a few steps:

  1. download the SCP zip archive from https://github.com/semiautomaticgit/SemiAutomaticClassificationPlugin/archive/master.zip ;
  2. extract the content of the archive (several files such as COPYING.txt and folders such as ui) in a new folder named SemiAutomaticClassificationPlugin (without -master);
  3. open the QGIS plugins directory (in Windows usually C:\Users\username\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins, in Linux and Mac usually /home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins) and delete the folder SemiAutomaticClassificationPlugin if present;
  4. copy the folder SemiAutomaticClassificationPlugin inside the QGIS plugins directory;
  5. the plugin should be installed; start QGIS, open the Plugin Manager and be sure that Semi-Automatic Classification Plugin is checked.

8.1.2. How to install the plugin from the official SCP repository?

It is possible to install the SCP using the official repository. This repository allows for the installation of the latest version of SCP (master), in some cases also before the availability thereof in the QGIS repository. Therefore, this can be useful if you need a fix or a new function that is still not available in the QGIS repository. Moreover, the master version in the SCP repository can be installed along with the version available in the QGIS repository.

In order to install the SCP repository follow these steps:

  • Run QGIS;
  • From the main menu, select Plugins > Manage and Install Plugins;
_images/install.jpg
  • Click Settings then click the button Add;
_images/qgis_repos_settings.jpg
  • Inside the Repository details enter:

Name:

SCP

URL:

https://semiautomaticgit.github.io/SemiAutomaticClassificationPlugin/repository.xml

and click OK;

_images/qgis_repos_add.jpg
  • After the repository update, the item Semi-Automatic Classification Plugin - master should be listed with the other plugins;
_images/qgis_repos_list.jpg
  • From the menu All, select the Semi-Automatic Classification Plugin - master and click the button Install plugin; the latest version of SCP should be automatically activated (ignore errors, the restart of QGIS could be necessary to complete the SCP installation); it is possible to deactivate the other SCP installed in the QGIS repository;
_images/qgis_repos_installed.jpg

8.1.3. Can I use the previous version 6 of SCP?

It is possible to install the previous version 6 of SCP using the official repository. Also, this version can be installed along with the SCP version 7.

In order to install the SCP repository follow these steps:

  • Run QGIS;
  • From the main menu, select Plugins > Manage and Install Plugins;
_images/install.jpg
  • Click Settings then click the button Add;
_images/qgis_repos_settings.jpg
  • Inside the Repository details enter:

Name:

SCP

URL:

https://semiautomaticgit.github.io/SemiAutomaticClassificationPlugin_v6/repository.xml

and click OK;

_images/qgis_repos_add.jpg
  • After the repository update, the item Semi-Automatic Classification Plugin - master should be listed with the other plugins;
_images/qgis_repos_list.jpg
  • From the menu All, select the Semi-Automatic Classification Plugin - master and click the button Install plugin; the latest version of SCP should be automatically activated (ignore errors, the restart of QGIS could be necessary to complete the SCP installation); it is possible to deactivate the other SCP installed in the QGIS repository;
_images/qgis_repos_installed.jpg

8.2. Pre processing

8.2.1. Which image bands should I use for a semi-automatic classification?

In general, it is preferable to avoid thermal infrared bands. If you are using Landsat 4, 5 or 7 you should select bands: 1, 2, 3, 4, 5, 7 avoiding band 6 that is thermal infrared; for Landsat 8 you should select bands: 2, 3, 4, 5, 6, 7. Landsat 8 band 1 is generally avoided because it is very similar to the blue band and it is mainly used for coastal aerosol study. Landsat thermal infrared band is excluded from classifications because values are mainly related to object temperature.

For Sentinel-2 images you can use bands: 2, 3, 4, 5, 6, 7, 8, 8A, 11, 12.

8.2.2. Which Landsat bands can be converted to reflectance by the SCP?

All Landsat 1,2, and 3 MSS and Landsat 4, 5, 7, and 8 images downloaded from http://earthexplorer.usgs.gov/ and processed with the Level 1 Product Generation System (LPGS) can be converted to reflectance automatically by the SCP; products generated by the LPGS have a MTL file included that is required for the conversion.

8.2.3. Can I apply the conversion to Sentinel-2 images download from the web?

Yes, you can convert also images downloaded from the web (actually the conversion is recommended). You should move all the bands (.jp2 files) and if available the .xml file whose name contains MDT_SAFL1C in the same directory. Then select this directory in Sentinel-2 conversion. Images are converted to reflectance.

8.2.4. Can I apply the conversion to Sentinel-2 L2A download from the web?

Yes, you should move all the .jp2 files inside the same directory and rename the files with the band number in the ending of the name (e.g. from name_02_10m.jp2 to name_02.jp2) Then select this directory in Sentinel-2 conversion. Images are converted to reflectance.

8.2.5. How are converted Sentinel-2 images that have different resolutions?

During the conversion to reflectance, pixels of 20m bands are split in 4 pixels of 10m whose values are the same as the original 20m pixel. The purpose of this operation is to allow for the calculation between all the bands, without changing original values.

8.2.6. Can I apply the Landsat conversion and DOS correction to clipped bands?

Yes, you can clip the images before the conversion to reflectance and then copy the MTL file (contained in the Landsat dataset) inside the directory with the clipped bands. If you want to apply the DOS correction (which is an image based technique) you should convert the original Landsat bands (the entire image) and then clip the conversion output (i.e. bands converted to reflectance).

8.2.7. Can I apply the DOS correction to bands with black border (i.e. with NoData value)?

If you want to apply the DOS correction to an entire band which has NoData values (the black border with value = 0) then you have to check the checkbox Use value as  NoData and set the value to 0. This is because DOS is an image based technique, and NoData values must be excluded from the calculation.

8.2.8. How to remove cloud cover from images?

DOS1 correction does not remove clouds from the image. However, Landsat 8 images include Band 9 that identifies clouds (see this NASA site). You can use this band for the creation of a mask.

Also, see the following video-tutorial.

8.2.9. After pan-sharpening of Landsat 8 images, why NIR bands still have 30m resolution?

Landsat 8 panchromatic band doesn’t acquire in the Near Infrared (NIR) region (see Landsat Satellites). Therefore, the pan-sharpening process can’t improve the resolution of NIR and SWIR bands (see Pan-sharpening), which appear to have 30m resolution. However, all pan-sharpened rasters have 15m resolution to allow raster calculation.

8.3. Processing

8.3.1. I get classification errors. How can I improve the accuracy?

Several materials have similar spectral signatures (e.g. soil and built-up, or forest and other types of dense low vegetation), which can cause classification errors if ROIs, and spectral signatures thereof, are not acquired correctly. In order to improve the results, you can try to collect more ROIs over these areas, in order to train the algorithm for these very similar areas, also, display the spectral signatures of these areas in Spectral Signature Plot to assess their similarity. You can also use a Signature threshold for these signatures in order to reduce the variability thereof (only pixels very similar to the input signatures will be classified). The Land Cover Signature Classification is also useful for classifying specific materials that can be spectrally similar to other ones.

8.3.2. Is it possible to use the same training input for multiple images?

Yes, it is possible if all the images have the same number of bands. However, if images are acquired in different months, land cover changes (especially of vegetation state) will affect the spectral signature (i.e. the same pixel has different spectral signature in different periods). Atmospheric effects could also affect the images differently. That could reduce classification accuracy. Therefore, it is suggested to collect always the ROIs and spectral signatures for every image.

8.3.4. Can I use SCP with images from drones or aerial photographs?

Yes, you can use them if they have at least 4 bands. With less than 4 bands, semi-automatic classification algorithms are unable to classify the land cover correctly. Alternative classification methods exist, such as object oriented classification, which is not implemented in SCP.

8.3.5. Why using only Landsat 8 band 10 in the estimation of surface temperature?

Several methods were developed for estimating surface temperature. The method described in the tutorial for temperature estimation requires only one band. Moreover, USGS recommends that users refrain from relying on Landsat 8 Band 11 data in quantitative analysis of the Thermal Infrared Sensor data (see Changes to Thermal Infrared Sensor (TIRS) data by USGS).

8.4. Warnings

8.4.1. Warning [12]: The following signature will be excluded if using Maximum Likelihood. Why?

The ROI is too small (or too homogeneous) for the Maximum Likelihood algorithm because that ROI has a singular covariance matrix. You should create larger ROIs or don’t use the Maximum Likelihood algorithm in the classification process.

8.5. Errors

8.5.1. How can I report an error?

If you found an error of the Semi-Automatic Classification Plugin please follow these steps in order to collect the required information (log file):

  1. close QGIS if already open;
  2. open QGIS, open the Plugin tab Debug and check the checkbox checkbox Records events in a log file ;
_images/settings_debug_tab.png

Debug

  1. click the button Test dependencies enter in the tab Debug ;
  2. load the data in QGIS (or open a previously saved QGIS project) and repeat all the steps that cause the error in the Plugin;
  3. if an error message appears (like the one in the following image), copy the whole content of the message in a text file;
_images/python_error.jpg

Error message

  1. open the tab Debug and uncheck the checkbox checkbox Records events in a log file, then click the button export and save the log file (which is a text file containing information about the Plugin processes);
  2. open the log file and copy the whole content of the file;
  3. join the Facebook group , create a new post and copy the error message and the log file (or attach them).

8.5.2. Virtual raster creation issues. Why?

The automatic creation of the virtual raster after Landsat conversion to reflectance is not required for the classification. Errors could happen if the output destination path contains special characters (such as accented letters) or spaces; try to rename directories (e.g. rename new directory to new_directory). If you still get the same error you can create a virtual raster manually.

8.5.3. Error „Plugin is damaged. Python said: ascii“. Why?

It could be related to a wrong installation. Please, uninstall QGIS and install it again with administrative rights. Then run QGIS and try to install the plugin following the Plugin Installation guide.

Also, it could be related to the user name containing special characters. Please try the installation creating a new user without special characters (e.g. user).

8.5.4. Error [50] „Internet error“. Unable to download Sentinel-2 images. Why?

The error message usually includes some information about the issue. First, check the user name and password. If the account registration was recent, it could take a few days to complete the process for allowing the download from SCP.

Also, there could be an interruption of the service. For Sentinel-2 images please check this website https://scihub.copernicus.eu/news/ for messages about the state of the service.

In case you still get the same error, please follow these steps How can I report an error?.

8.5.5. Error installing the plugin, possible missing dependencies. Why?

The plugin requires the installation of GDAL, NumPy, SciPy and Matplotlib, which should be installed along with QGIS. If the plugin installation fails, and you get a message about possible missing dependencies, you should try to install or update QGIS and the required dependencies. Notice that in order to avoid this error, python dependencies should not be installed through Anaconda.

8.6. Various

8.6.1. What can I do with the SCP?

SCP allows for the land cover classification of remote sensing images through Supervised Classification. You can produce a land cover raster using one of the Classification Algorithms available in SCP. These algorithms require spectral signatures or ROIs as input (for definitions please read Brief Introduction to Remote Sensing) that define the land cover classes to be identified in the image.

_images/multispectral_classification.jpg

A multispectral image processed to produce a land cover classification

(Landsat image provided by USGS)

SCP can work with multispectral images acquired by satellites, airplanes, or drones. Also, SCP allows for the direct search and download of free images (see Download products). You cannot use orthophotos with less than 4 bands, SAR data, and LIDAR data with SCP.

Input image in SCP is called Band set, which is used as input for the classification. SCP provides several tools for the Передоброблення of downloaded images, such as the conversion to reflectance and manipulation of bands.

Classification results can be assessed with the tools Accuracy and Classification report. Also, rasters can be manipulated using Післяоброблення tools such as Classification to vector, Reclassification, Edit raster directly, Classification sieve, Classification erosion, and Classification dilation.

The Spectral Signature Plot and Scatter Plot allow for the analysis of spectral signatures and ROIs. Also, several Basic tools are available for easing the ROI creation and editing spectral signatures.

Raster calculation is available through the seamless integration of the tool Band calc with bands in the Band set, calculating mathematical expressions and spectral indices. Also, an output raster can be calculated based on Decision rules.

The tool Batch allows for the automatic execution of several SCP functions using a scripting interface.

See the Basic Tutorials for more information and examples.

8.6.2. How to contribute to SCP

You can contribute to SCP by fixing and adding functionalities (see Where is the source code of SCP?), or translating the user manual (see How can I translate this user manual to another language?).

Also, you can donate to this project at the following link https://fromgistors.blogspot.com/p/donations.html .

8.6.4. Other tutorials about SCP, also in languages other than English

There are several tutorials about SCP on the internet. Following an incomplete list of these resources (please note that these resources could use older versions of SCP):

8.6.5. How can I translate this user manual to another language?

It is possible to easily translate the user manual to any language, because it is written in reStructuredText as markup language (using Sphinx). Therefore, your contribution is fundamental for the translation of the manual to your language. The following guide illustrates the main steps for the translation, which can be performed:

  • using the free online service Transifex;
  • using the gettext .po files.

Before translating, please read this document from the QGIS translation guide, which helps you understand the reStructuredText.

Method 1. Translation using the free online service Transifex

This is probably the easiest way to translate the manual using an online service.

  1. Join the Semi-automatic Classification Manual project

    Go to the page https://www.transifex.com/semi-automatic-classification/semi-automatic-classification-plugin-manual and click the button Help translate. You can sign in using your Google or Facebook account, or with a free registration.

  2. Select your language

    Select your language and click the button Join team. If your language is not listed, click the button Request language.

  3. Translation

    There are several files to be translated, which refer to the sections of the SCP documentation. To translate the SCP interface you should select the file semiautomaticclassificationplugin.ts .

Method 2. Translation using the gettext .po files

In order to use this method, you should be familiar with GitHub. This translation method allows for the translation of the PO files locally.

  1. Download the translation files

    Go to the GitHub project https://github.com/semiautomaticgit/SemiAutomaticClassificationManual_v4/tree/master/locale and download the .po files of your language (you can add your language, if it is not listed), or you can fork the repository. Every file .po is a text file that refers to a section of the User Manual.

  2. Edit the translation files

    Now you can edit the .po files. It is convenient to edit those file using one of the following programs: for instance Poedit for Windows and Mac OS X, or Gtranslator for Linux or OmegaT (Java based) for Windows, Linux and Mac OS X. These editors allow for an easy translation of every sentence in the User Manual.