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
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.
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 dataset. 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:
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.shp, since they are not needed here. Right-click on the layer in the Data Views panel and select Remove Layer.
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.
Go toto open the Classification Workflow application.
In the Type dropdown menu select
Raster / Vector Classification.
enmap_berlin.bsqas Raster and
landcover_berlin_point.shpas Reference. Select
level_2_idas Attribute. After selection of the attribute 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%).
As Classifier choose RandomForestClassifier (which is the default setting)
In the Model Parameters text field add the parameter
n_estimators = 300. This will increase the number of trees in the random forest. We alter this parameter here, because the scikit-learn default is 10, which is quite low. So the text field should look like this:
from sklearn.ensemble import RandomForestClassifier estimator = RandomForestClassifier(n_estimators = 300)
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
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
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:
- Pixel Grid:
- Class id attribute: level_3_id
- Minimal overall coverage:
- Minimal dominant coverage:
- Oversampling factor:
- Pixel Grid:
- Specify an output filepath under Output Classification and click Run