Getting Started¶
Info
This section is aimed at users with no previous EnMAP-Box experience. You will get a brief introduction into the main functionalities:
- Getting to know the Graphical User Interface
- Use an EnMAP-Box Application (Classification Workflow)
- Use a Processing Algorithm
Primer¶
The EnMAP-Box can be divided into several major components. The Graphical User Interface (GUI) provides main access to all features and lets you manage and visualize raster and vector data as well as spectral libraries. From here you can access further Tools and Applications, which can be regarded as additional plugins that add specific functionalities such as plotting, metadata editing or raster algebra. Furthermore, the EnMAP-Box extents the QGIS Processing Toolbox with a comprehensive collection of various Processing Algorithms for (raster) data manipulation. ‘Underneath’ all this is the EnMAP-Box API, HUB-Workflow API and HUB-Datacube API, which are high-level application programming interfaces that allow more advanced users to operate EnMAP-Box functionalities directly from code or to build their own applications on top.
Launching the EnMAP-Box¶
Once you successfully installed the EnMAP-Box, you can access the plugin via the icon in the QGIS toolbar. Furthermore, the EnMAP-Box Processing Algorithms should also appear in the QGIS Processing Toolbox.
Tip
Have a look at the User Manual for a detailed description of the GUI.
Loading Testdata¶
- Go to OK). The following datasets
will be added (now they are listed in the Data Sources window):
enmap_berlin.bsq
hires_berlin.bsq
landcover_berlin_point.gpkg
landcover_berlin_polygon.gpkg
library_berlin.sli
to load example datasets into you project (on first open, you will be asked whether
to download the dataset, confirm with
Tip
Have a look at the section Test dataset for further information on the dataset. In this section we will
mainly work with enmap_berlin.bsq
and landcover_berlin_point.gpkg
First Steps in the GUI¶
By default the example data is loaded into a single Map View. Let’s rearrange those for better visualisation and in order to get to know the GUI functionalities:
Click the Open a map window button to add a second map view. The window appears below the first map window.
We want to arrange the windows so that they are next to each other (horizontally). Click and hold on the blue area of Map #2 and drag it to the right of Map #1 (see figure below). The translucent blue rectangle indicates where the map window will be docked once you stop holding the left mouse button.
Now, in the Data Views window, expand the Map #1 list, so that you can see the individual layers. Select
hires_berlin.bsq
and drag the layer into Map #2 (you can drag them directly into the map views or the respective menu item under Data Views). You can removelibrary_berlin.sli
andlandcover_berlin_polygon.gpkg
, since they are not needed here. Right-click on the layer in the Data Views panel and select Remove Layer.In the next step we link both map views, so that zoom and center are synchronized between both. Go to Link map scale and center.
and selectMove the map (using or holding mouse wheel) and see how both map views are synchronized.
Use an Application¶
In this section we will use the EnMAP-Box application Classification Workflow to classify the enmap_berlin.bsq
image using a point vector dataset with the classes impervious, low vegetation, tree, soil, water and a random forest classifier.
Go to
to open the Classification Workflow application.In the Type dropdown menu select
Raster / Vector Classification
.Choose
enmap_berlin.bsq
as Raster andlandcover_berlin_point.gpkg
as Reference. Now the class names and colors become visible in the Sampling submenu.Here you can alter the class colors and the class names or change the size of your sample. But for this tutorial use the default settings (sample size at 100%).
Tip
Find more information on the Classification Workflow application in the User Manual.
As Classifier choose RandomForestClassifier (which is the default setting).
Under Mapping you have to specify the raster which will be classified. We will choose the same raster we took the samples from, so select
enmap_berlin.bsq
as Raster.Make sure to check the Classification output. Specify an output path and filename by pressing … or use the default, which will save the output to a temporary location.
Also select to perform a Cross-validation with n-folds. You can leave the number of folds at 3. Specify output path for the HTML report or use default (temporary directory).
Once the process has finished, the classification image will be listed in the Data Sources panel (if not, open it again via ). Also, the HTML report of the accuracy assessment will open automatically in the default web browser.
Now visualize the classification result side-by-side with the initial image. Therefore, right-click into Map #2 and select . Drag the classification image from the Data Sources panel into Map #2
In the Data Views panel, right-click on the classification layer and select Classification Statistics. This will show you an interactive plot with the different class counts
Use a Processing Algorithm¶
In this section we will use a processing algorithm from the EnMAP-Box algorithm provider. More precise, we are converting a polygon dataset holding information on different landcover types into a classification raster, i.e., we are going to rasterize the vector dataset.
- First of all, make sure the Processing Toolbox window is opened. If not, activate it via
- Open the algorithm under
- Use the following settings:
- Categorized vector layer:
landcover_berlin_polygon.gpkg
- Grid:
enmap_berlin.bsq
- Categorized vector layer:
- Specify an output filepath under Output Classification and click Run
Use the Spectral Library¶
In this section, we will use the spectral library to characterize and compare spectra of different surfaces.
In the following, the enmap_berlin.bsq
is used to explain how to collect spectra and edit their properties.
Open the spectral library window via
Now you should see an empty window where all spectra can now be collected.
If not activated yet, enable the button in the menu bar and open a raster you want to collect spectra from in a Map Window.
Now you can generate spectra from the image by using the left mouse button and clicking in the opened image.
To display multiple spectra at the same time in the same spectral library, activate the Add profiles automatically button in the drop-down list.
Add information to the attribute table: