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
- Use the Spectral Library
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 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.
Have a look at the User Manual for a detailed description of the GUI.
- Go to OK). The following datasets
will be added (now they are listed in the Data Sources window):
to load example datasets into you project (on first open, you will be asked whether
to download the dataset, confirm with
Have a look at the section Test dataset for further information on the datasets. In this section we will
mainly work with
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.bsqand 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 remove
landcover_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 . and select Link map scale and center
- Move 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
image using a point vector dataset with the classes impervious, low vegetation, tree, soil, water and a random forest classifier.
- Open the Classification workflow .
- In the Source dropdown menu select categorized vector layer and feature raster.
- Click on create dataset. A new window is opened, where you have to choose the Categorized vector layer and the Raster layer with features.
landcover_berlin_point.gpkgas Vector layer and
enmap_berlin.bsqas Raster layer.
- You also need to define the Field with class values. Select
level_2_idhere. Specify an output path and filename by pressing … or use the default, which will save the output to a temporary location. Leave all other default settings and run the algorithm.
- The newly created dataset is now used to fit the classifier. The advanced classification workflow also allows you to split the dataset, select different classifiers, calculate feature clusters and rankings. For now, however, let’s leave everything at the default settings and continue with the model fitting.
Find more information on the Classification Workflow application in the User Manual > Applications > Classification Worklow.
- Move on to the tab Model and select dataset as Dataset. Again specify an output path and filename by pressing … or use the default, and run fit classifier.
- We can also already test our model by using a cross-validation performance. Choose cross-validation performace as Algorithm, specify an output path and file name or leave the default and click on assess performance. The HTML report will open automatically in the default web browser.
- Now that we finished fitting the classifier, we can move on to the actual image classification. The Classifier will be set automatically. Choose the
enmap_berlin.bsqas Raster layer with features which is the image that we want to classify. Specify an output path and filename for the prediction output or use the default, and run predict output products.
- Once the process has finished, the classification image will be listed in the Data Sources panel (if not, open it again via ).
- 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
Example output of the Random Forest Classification
The classification output is displayed in random colours. You can change the visualization settings in the Layer Properties of the raster. Right click on the layer in the Data Views panel, select **Layer Properties* and edit the colors and names accordingly.
- 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
Example of the statistics of the classification result
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:
- Specify an output filepath under Output Classification and click Run.
Use the Spectral Library¶
A Spectral Library is a library is a vector layer with a layer field designated to store spectral profiles. This section gives a very brief overview of the Spectral Library. To get more detailed information about all the functionalities, please follow the instructions in the User Manual > Spectral Libraries.
- Open the spectral library window via .
- You should now see an empty window where you can collect spectra.
- If not already activated, enable the button in the menu bar and open a raster in a new map view from which you want to collect spectra.
- Create spectra from the image by clicking with the left mouse button in the opened image. The collected spectral information is now stored as a temporary profile candidate, which is displayed as a dotted line. Each time you click into the image, the profile candidate is replaced by a new one.
- Click on Add Profile(s) to keep the candidate profile in the spectral library. Activate Add profiles automatically to collect multiple profiles and display them all in the same spectral library.
Add information to the attribute table:
Each spectral library has its own attribute table where you can manage your collected spectral profiles and add or delete information. The Spectral Library Window has a number of functions similar to the vector editing functions you may be familiar with from QGIS.
- To add information, open the Attribute table by clicking the icon, then enable the Editing mode by clicking the symbol.
- Add a new field via