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 a 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.

../_images/enmapbox_components.png

Launching the EnMAP-Box

Once you successfully installed the EnMAP-Box, you can access the plugin via the enmapbox icon in the QGIS toolbar. Furthermore, the EnMAP-Box Processing Algorithms should also appear in the QGIS Processing Toolbox.

../_images/ebx_firstopen.png

The Graphical User Interface (GUI) of the EnMAP-Box on first open

Tip

Have a look at the User Manual for a detailed description of the GUI.

Loading Testdata

  • Go to Project ‣ Load Example Data to load example datasets into you project (on first open, you will be asked whether to download the dataset, confirm with 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.shp
    • landcover_berlin_polygon.shp
    • library_berlin.sli

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.shp

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 viewlist_mapdock 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.

    ../_images/mapviewshift.png
  • 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 remove library_berlin.sli and landcover_berlin_polygon.shp, 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 View ‣ Set Map Linking and select link_all_mapscale_center Link map scale and center.

  • Move the map (using mActionPan 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 Applications ‣ Classification Workflow to open the Classification Workflow application.

  • At the top, choose enmap_berlin.bsq as Raster and landcover_berlin_point.shp as Reference. Select level_2_id as Attribute. After selection of the attribute the class names and colors become visible in the Sampling submenu.

    ../_images/classwf1.png
  • 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 enmap_berlin.bsq as Raster.

  • Make sure to check cb1 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 cb1 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).

    ../_images/classwf2.png
  • Click the run button action to start the classification.

  • Once the process has finished, the classification image will be listed in the Data Sources panel (if not, open it again via add_datasource). Also, the HTML report of the accuracy assessment will open automatically in the default web browser.

    ../_images/screenshot_aareport.png

    Screenshot of the Classification Performance HTML report

  • Now visualize the classification result side-by-side with the initial image. Therefore, right-click into Map #2 and select ‣ Clear. Drag the classification image from the Data Sources panel into Map #2

    ../_images/screenshot_class_result1.png

    Screenshot of the Map Views: EnMAP image on the left and classification result on the right

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 View ‣ Panels ‣ Processing Toolbox
  • Open the Classification from Vector algorithm under EnMAP-Box ‣ Create Raster.
  • Use the following settings:
    • Pixel Grid: enmap_berlin.bsq
    • Vector: landcover_berlin_polygon.shp
    • Class id attribute: level_3_id
    • Minimal overall coverage: 0
    • Minimal dominant coverage: 0
    • Oversampling factor: 1
  • Specify an output filepath under Output Classification and click Run
../_images/example_rasterize_classification.png

Result of the Classification from Vector algorithm (right) and the input grid (left) and polygon dataset (middle)