ChapterPDF Available

The Use of SAGA GIS Modules in QGIS

Authors:

Abstract and Figures

The QGIS in Remote Sensing Set aims to facilitate the appropriation and operational use of the Quantum Geographic Information System (QGIS) software in the field of remote sensing. This first volume describes the operating principles of QGIS and the most frequently used and fundamental libraries in image processing and geomatics: GDAL, GRASS, SAGA and OTB. It presents many core features that will be implemented in various practical cases of remote sensing and spatial analysis in the other three volumes of the set. This work is carried out by scientists who are proficient to a high level of technicality. The book is targeted at students (Masters, engineering students, PhDs), engineers and researchers who have already adopted geographic information systems. In addition to the text, readers will have access to data and tools allowing the integral realization of the scientific procedures described in each chapter, as well as screenshots of all the windows which illustrate the manipulations necessary for the realization of each application.
Content may be subject to copyright.
4
The Use of SAGA GIS Modules in QGIS
4.1. SAGA GIS in QGIS
4.1.1. Development of SAGA GIS
SAGA GIS (System for Automated Geoscientific Analyses) is a free and open-
source software, developed since the early 2000s. SAGA GIS is mainly managed by
a team from the Department of Physical Geography at the University of Hamburg in
Germany. It is a multi-OS software that can operate in Windows, Linux and Mac
OSX.
SAGA GIS is divided into different modules allowing raster and vector process to
be run. A wide range of applications is possible. Some modules are dedicated to
multispectral image treatment, geomorphology, hydrology, geostatistics, landscape
ecology, etc. Even if SAGA GIS is famous for its raster treatment capabilities, many
modules are dedicated to vector treatments (spatial analysis, buffer zone definition,
Thiessen polygons, etc.). The software uses the GDAL and OGR libraries to manage
raster and vector formats respectively. Because of the use of these libraries, many
formats are supported.
SAGA GIS offers powerful and very interesting functionalities originating from
research carried out in many geoscientific labs across the world. Unfortunately, its
online documentation is poor.
In recent versions of QGIS, the SAGA GIS modules can be used within the QGIS
interface. This way, the flexibility and the usability of QGIS are coupled with the
power of SAGA GIS. However, some modules are still not implemented in QGIS.
Chapter written by Paul PASSY and Sylvain THÉRY.
QGIS and Generic Tools, First Edition.
Edited by Nicolas Baghdadi, Clément Mallet and Mehrez Zribi.
© ISTE Ltd 2018. Published by ISTE Ltd and John Wiley & Sons, Inc.
108 QGIS and Generic Tools
4.1.2. SAGA GIS interface in QGIS
4.1.2.1. Installation
In Windows, the SAGA GIS extension is automatically installed with QGIS. It is
generally a good idea to install QGIS using the “advanced user” option from the
“OSGeo Network Installer”. In this way, the user can precisely choose the versions
of the different modules to be installed, including SAGA GIS (Figure 4.1).
Figure 4.1. SAGA GIS installation using the OSGeo installer
In Linux, the installation differs according to the distribution used (Debian,
Ubuntu, Linux Mint, etc.). It is easiest to follow the instructions available on the
official QGIS Website (https://qgis.org).
4.1.2.2. Running the SAGA GIS modules
It is very easy to run the SAGA GIS modules from QGIS. First of all, the
“Processing Toolbox” should be installed and available. To do this, go to the
“Plugins” menu of QGIS, look for the plugin named “Processing”, install it if
necessary and check the corresponding box in order to make this toolbox available
within QGIS (Figure 4.2).
The Use of SAGA GIS Modules in QGIS 109
Figure 4.2. Installation of the Processing Toolbox
To use this toolbox, click on the “Processing” menu and select “Toolbox”. A
new panel appears on the right side of the QGIS window named “Processing
Toolbox” (Figure 4.3).
Figure 4.3. The “Processing Toolbox” on the right side of the QGIS window
If the SAGA GIS modules do not appear, click on “enable additional providers”
on the bottom of the “Processing Toolbox” panel. A new window “Processing
options” appears. Expand the lines “Providers” and “SAGA” and check the box
“activate” (Figure 4.4).
110 QGIS and Generic Tools
Figure 4.4. Activation of the SAGA modules in the “Processing options”
In this toolbox, we can use the SAGA GIS modules as well as the GDAL, QGIS
and GRASS GIS ones.
Once this installation is complete, you can access the SAGA modules by
expanding the SAGA line in the “Processing Toolbox”; 235 SAGA modules are
available. However, the version of SAGA GIS used in QGIS is not the most recent.
The modules are stored according to their field of application: “Geostatistics”,
“Raster tools”, “Vector general tools”, etc. When we expand a group, we can access
the different modules. For instance, when we expand the group Raster tools”, we
access the modules “Aggregation”, “Close gaps”, etc. To use a module, we just
double click on its name. If we know the name of the module, we can also write its
name in the panel in the top of the “Processing Toolbox”. We can find the details for
each module at the following link http://www.saga-gis.org/saga_tool_doc/
2.1.4/a2z.html. Unfortunately, this documentation is not as good as we might hope.
This chapter is divided into three parts. In the first part, we will describe how we
can use SAGA to work with multispectral satellite images. In the second part, we
will describe how we can extract a hydrological network based on a digital elevation
model (DEM). In the last part, we will see how we can interpolate discrete data by
using SAGA GIS.
The Use of SAGA GIS Modules in QGIS 111
4.2. Using SAGA GIS to work with multispectral satellite images
4.2.1. Methodology
In this section, we will present how we can use SAGA GIS in QGIS to build a
land use map from high resolution Landsat 8 images. The study area of this section
is located around the Serre-Ponçon Lake (Figure 4.5). This lake is on the Durance
River, in the French Alps (44°31′47″ N, 6°23′35″ E).
Figure 4.5. Location of the Serre-Ponçon Lake in the French Alps
We will build the land use of the area layer by using a decision tree. Using this
technique, the user can precisely define specific rules of classification. This decision
tree will be based on specific thresholds on raw Landsat bands as well as on derived
indices such as Soil-Adjusted Vegetation Index (SAVI) or Automated Water
Extraction Index (AWEI). The steps we will follow are summarized here:
– data acquisition;
– radiometric corrections of the satellite images;
– cropping of the satellite images according to the extent of the study area;
– building of color composites and exploration of the study area;
– calculation of the indices SAVI and AWEI;
– definition of the decision tree;
– implementation of the decision tree;
– filtering of the subsequent classification;
– simplification of the land use by reclassification of the pixels.
112 QGIS and Generic Tools
4.2.2. Acquisition and presentation of used data
In this exercise, we use a Landsat 8 multispectral image taken on August 23,
2016. Landsat 8 is the latest satellite of the American Landsat program that started
in the early 1970s. This sensor has been in orbit since February 2013 and takes an
image of the same land portion every 16 days on average. It is a multispectral
sensor, meaning it is able to record the energy reflected by the surface in 11 different
spectral bands (Table 4.1). The spatial resolution differs according to the spectral
band from 15 to 100 m. The Landsat images are freely available from many
Websites. One of the most convenient portals is the one managed by the USGS:
EarthExplorer (https://earthexplorer.usgs.gov/). Once registered, it is possible to
download all the Landsat archives and other products from NASA and even from
the European Space Agency.
Spectral band Wavelength (µm) Domain Resolution (m)
1 0.433–0.453 Deep blue 30
2 0.450–0.515 Blue 30
3 0.525–0.600 Green 30
4 0.630–0.680 Red 30
5 0.845–0.885 Near IR 30
6 1.560–1.660 Middle IR 1 30
7 2.100–2.300 Middle IR 2 30
8 0.500–0.680 Panchromatic 15
9 1.360–1.390 IR 30
10 10.6–11.2 Thermal IR 1 100
11 11.5–12.5 Thermal IR 2 100
Table 4.1. Landsat 8 band characteristics
In addition to the Landsat bands, we provide a shapefile with the extent of the
study area. It contains only one rectangular shape. We will use it to crop the Landsat
bands in order to work only on our study area.
4.2.3. Correction of the satellite images
Before dealing with satellite images, some preprocessing is necessary. The first
step is to georeference the image according to a system of projection and to
orthorectify it using a DEM coupled with control points. Luckily, most of the time,
this step is already done on the images we download from the different portals. In
The Use of SAGA GIS Modules in QGIS 113
our case, the system of projection we are using is the UTM zone 31N system (EPSG
code 32631). We will keep this system for this exercise.
The second step is to transform the digital values registered by the sensor into
reflectances as emitted at the top of the atmosphere. After this step, the value of each
pixel of the image corresponds to a “Top of Atmosphere” (TOA) reflectance
[OSE 16]. This method makes it possible to remove the “noise” that could be added
to the reflectance on its way from the atmosphere to the sensor. This correction is
often called “radiometric correction”.
A third step, called “atmospheric correction” consists of removing the “noise” of
the atmosphere in order to obtain surface reflectances. This noise may be due to the
wetness of the atmosphere or to the aerosols. There are many methods to perform
this correction. However, in our case this correction is not compulsory because we
are working on only one date and on a small area [SON 01]. There is in fact a risk of
increasing the noise in the image even further by applying this correction. Thus, in
our example, we will not apply atmospheric corrections.
Now we will see how to perform the only correction we need, i.e. the radiometric
correction in order to obtain “top of atmosphere” reflectances (TOA). We can
perform this correction either manually or automatically. Here, we will perform it
using a supplementary module in QGIS.
The module we use is called the “Semi-Automatic Classification Plugin”. This
module is primarily used to classify satellite images, but also enables some
preprocessing. To install this module, go to “Plugins Manage and install
plugins”. Search for the plugin by typing its name in the search bar and click on
“Install” (Figure 4.6).
Figure 4.6. Installation of the module “Semi-Automatic Classification Plugin: SCP”
Once this module is installed, a new menu called “SCP” is available. We can
now perform the radiometric correction on our Landsat images. To do this, go to the
114 QGIS and Generic Tools
menu “SCP → Preprocessing → Landsat”. In the new window, go to the line
“Directory containing Landsat bands” and search for the directory containing the
Landsat bands. This directory should also contain a metadata file (.MTL) associated
with the Landsat image. This metadata file is necessary to perform the radiometric
correction. Once this path is set, the module detects by itself (because of the
metadata file) the data associated with the image and needed for the correction
(sensor, data of acquisition, spectral bands, etc.) (Figure 4.7).
Figure 4.7. Setting of the radiometric correction in the SCP module. For a color
version of the figure, see www.iste.co.uk/baghdadi/qgis1.zip
Although we will not use it here, at this stage it is possible to convert the thermal
infrared bands to degrees Celsius, perform an atmospheric correction via the DOS1
method and perform a pansharpening. We can leave the default parameters. To run
the process, click on the yellow and green button at the bottom right of the window.
We have to define the directory in which we want to store the corrected bands. We
can call it “L8_2016-08-23_TOA”. This correction may take several minutes.
Once the correction is performed, the new images appear in the main window of
QGIS. We can check the values of some pixels using the “Identify Features” tool.
On the corrected images, the pixel values range from 0 to 1. Theses values
correspond to reflectance values. A pixel with a reflectance value of 1 in a given
spectral band indicates that this pixel reflects all the incoming energy in this spectral
band. This pixel will be white. Conversely, a pixel with a reflectance value of 0
reflects nothing. This pixel will be black.
The Use of SAGA GIS Modules in QGIS 115
4.2.4. Cropping the images according to the study area
We will now crop our Landsat images according to the provided shapefile
“study_area_32631.shp” in order to focus only on our study area. First, we load this
layer in QGIS. This layer is already in the system of projection we are using (UTM
31N - EPSG 32631). We organize our layers, we bring the layer of the study area to
the top and we arrange the Landsat bands with the first one on the top to the last one
on the bottom (Figure 4.8).
Figure 4.8. Organization of the different layers in QGIS
To crop our images, we use the SAGA module called “Clip raster with
polygons”. This module is located in the “Processing Toolbox”, in the menu
SAGA andVector <-> Raster. We can also find it by typing its name in the
search bar of the “Processing Toolbox”. A new window named “Clip raster with
polygons” appears. As we want to clip several rasters with the same extent, we
choose the option “Run as batch process…”. In the new window, we set all the
rasters we want to clip and the shapefile we want to use to clip. Let us start by
clicking on the icon “…” of the column “Input” and click on “Select from open
layers”. In the window “Multiple selection, we select the images we want to clip.
We only want to clip the first seven bands, we will not work with the four remaining
ones. In the column “Polygons”, we select the shapefile we want to use to clip the
Landsat bands. As we are using the same polygon for all the bands, we set the same
file at each line. In the column “Clipped”, we set the path where we want to save the
clipped bands. We stored them in a directory called “L8_2016-08-23_TOA” and we
call the bands “BX_L8_2016-08-23_TOA_sp”, replacing the “X” with the number
of the current band. “Sp” is used for “Serre-Ponçon”. Each time, choose the option
“Do not autofill”. We obtain a window like that in Figure 4.9. We can directly load
116 QGIS and Generic Tools
the resulting images in QGIS. Click on “Run” to start the process. Once the
treatment is done, a window appears to inform us.
Figure 4.9. Clipping of the Landsat bands using the
“Clip raster with polygons” module
The clipped layer appears in QGIS once the treatment is done. In order to better
organize our exercise, we close all the layers and we import only the clipped images.
We sort the bands with the first band at the top. We now have our first seven
Landsat bands, expressed in reflectance at the top of the atmosphere and clipped
according to the study area (Figure 4.10).
Figure 4.10. The Landsat bands clipped according
to the study area (44°37 N, 5°57 E)
4.2.5. Color composites and exploration of the area
In order to make color composites, we merge our Landsat bands together by
building a virtual raster using a GDAL tool. To do this, go to the menu “Raster
Miscellaneous → Build Virtual Raster (Catalog)…”. In the new window, we check
The Use of SAGA GIS Modules in QGIS 117
the box “Use visible raster layers for input”. We set the path where we store the
resulting file at the line “Output file” and we call it “L8_2016-08-23_TOA_stack”.
We check the box “Separate” (Figure 4.11) in order to be able to manage each band
of the virtual raster individually.
Figure 4.11. Building of the virtual raster using GDAL. We can
see (and edit) the GDAL syntax at the bottom of the window
Once the process is done, the virtual raster appears directly in QGIS. We can
open this virtual raster with a text editor. It is simply a XML file that directs to each
individual band. Using this virtual raster, we build color composites. In order to
highlight the vegetation of the region, we build a false color composite. We color the
green band in blue, the red band in green and the near infrared band (the one in
which the vegetation reflects the most) in red. Right click on the virtual raster layer,
go toProperties andStyle. For theRender style, we choose “Multiband
color”. For the red band we choose the band 5 (near infrared), for the green band we
choose the band 4 (red) and for the blue band we choose the band 3 (green). We
improve the contrast by selecting the option “Stretch to MinMaxand we click on
“Load” on the panel “Load min/max values” in order to grab the extreme values of
each band (Figure 4.12).
118 QGIS and Generic Tools
Figure 4.12. Building a color composite from a virtual raster
We obtain the following color composite (Figure 4.13). On this color composite,
vegetation appears more or less intensely in red according to its state. Indeed,
vegetation in “good health” will reflect a lot in infrared. The redder a pixel, the more
vegetation it contains.
Figure 4.13. Color composite in false colors with the near infrared in red.
For a color version of the figure, see www.iste.co.uk/baghdadi/qgis1.zip
The Use of SAGA GIS Modules in QGIS 119
Our study area is a mountainous area and the dark zones on the northwest flanks
of the mountains correspond to the shadows. The reflectances of the different bands
are affected by this phenomenon. Land use classifications on this kind of zone are
more difficult to perform compared to the those on flat regions. However, we will
see as soon as we deal with indices combining several bands together that this
artifact tends to disappear.
4.2.6. Calculation of indices in order to extract vegetation and water
surfaces
In this part, we will calculate two indices. We will first calculate the SAVI,
which is useful for extracting the vegetation in different classes. We will then
calculate the AWEI in order to extract the water surfaces.
4.2.6.1. Extraction of the vegetation using the SAVI
One of the most famous and most widely used indices is the Normalized
Difference Vegetation Index. However, it is not the only index and many others do
exist such as the SAVI. This index takes into account the reflectance of the soil that
is visible to varying degrees through the canopy. The SAVI can be calculated using
the following formula:
 = ()(  )
     [4.1]
where NIR is the near infrared band, R is the red band and L is the factor to take into
account the brightness of the soil. According to the literature, a value of 0.5 for L is
suitable for most cases.
The calculation of the SAVI may be done directly in SAGA using the module
“Vegetation index (slope based)”. We find this module in the submenu “Image
analysis” in the SAGA menu in the “Processing Toolbox”. When we execute this
module, a new window called “Vegetation index (slope based)” appears. We first
need to set the bands corresponding to the near infrared and to the red. In our case
(Landsat 8), these bands are, respectively, the bands 5 and 4 (Figure 4.14). We then
choose the indices we want to calculate and the directory in which we want to store
them. Here, we only calculate the SAVI and we store it in our directory “L8_2016-
08-23_TOA” naming it “savi_L8_2016-08-23”.
120 QGIS and Generic Tools
Figure 4.14. Calculation of the SAVI using the SAGA
module “Vegetation index (slope based)”
A new layer corresponding to the SAVI appears in QGIS. We can change the
style of this layer by going to its properties and the “style” panel. As “Render type”,
we select “Singleband pseudocolor” and for the “Colors” we choose thegreens
lookup table (Figure 4.15).
The Use of SAGA GIS Modules in QGIS 121
Figure 4.15. Setting the style of the SAVI layer
We then click on “Classify” and “Apply” and obtain the SAVI layer in green
shades (Figure 4.16).
Figure 4.16. SAVI of the area of Serre-Ponçon calculated from the
Landsat 8 image on August 23, 2016. For a color version of the figure,
see www.iste.co.uk/baghdadi/qgis1.zip
On this image (Figure 4.16), the pixels in deep green are the pixels close to 1
(the maximum value) and those in white are the pixels with very low SAVI values
close to 0 or even negative. A pixel with a high SAVI value is a pixel with dense
vegetation. A pixel with a low SAVI value is a pixel without vegetation. Finally, the
different shades of green, so the different values from 0 to 1, represent different
densities of vegetation.
122 QGIS and Generic Tools
4.2.6.2. Extraction of water surfaces using the AWEI
We can use many different indices in order to extract water surfaces from
multispectral satellite images. The AWEI will be used in this exercise because it is
robust and convenient to use [FEY 14]. It is an empirical index based on the blue,
green, near infrared and middle infrared bands. Using the AWEI, it is very
convenient to distinguish water pixels from land pixels. In fact, the AWEI is
designed to code water pixels with a value greater than 0 and land pixels with a
value less than 0. Two versions of this index exist. The first can be used on images
where there are no shadows and the second on images where there are some
shadows. The following formula is for the second version [FEY 14]:
ℎ =  + 2.5 ×  − 1.5 × ( + 1) − 0.25 × 2 [4.2]
AWEIsh is the version of the AWEI used on images with shadow areas. B
corresponds to the blue band (B2 of Landsat 8), G to the green band (B3), NIR to
the near infrared band (B5) and MIR1 and MIR2 to the middle infrared bands (B6
and B7).
It is not possible to calculate this index automatically in QGIS or SAGA GIS.
We need to calculate it using the raster calculator of QGIS in the menu “Raster
Raster calculator”. The formula should be written manually by taking into account
the correct bands as inputs. We store the resulting layer in our working directory and
name it “awei_L8_2016-08-23” (Figure 4.17).
Figure 4.17. Calculation of the AWEI using the raster calculator function
The Use of SAGA GIS Modules in QGIS 123
The resulting layer appears directly in QGIS. We can change the style of this
layer following the same steps we used for the SAVI layer. This time we do not
select the “greens” lookup table but the “blues” instead. We obtain Figure 4.18.
Figure 4.18. AWEI of the region of Serre-Ponçon calculated
from the Landsat 8 image on August 23, 2016. For a color version of the figure,
see www.iste.co.uk/baghdadi/qgis1.zip
On this image, the deep blue pixels are those with a positive AWEI value. These
pixels therefore show water surfaces. The white pixels are those with a negative
AWEI value, and are thus the land pixels. However due to the topography of our
study area, the shadows and the snowy zones tend to appear with positive values.
Here, we face one of the limits of this index. We will deal with this limit in the
following part when we build the decision tree we will use to classify the land use.
4.2.6.3. Land use classification
4.2.6.3.1. Definition of the decision tree
We will now classify the land use of this area using the raw Landsat bands,
the derived indices and a decision tree. As previously mentioned, this technique
allows the user to define the reflectance values exactly for each band and each class
of land use. This method may be time consuming and may require expertise from
the user to be implemented. However, in the end we can precisely define the
different land use classes.
124 QGIS and Generic Tools
Here, we want to classify the land use of the Serre-Poon region according to 8
classes: dry snow, melted snow, water surfaces, bare soil/artificial soil, sparse
vegetation, grassland/culture, woodland and dense forest.
Let us start by defining the snow. The first useful image to detect the snow is the
one from the AWEI. On this layer, we can see that the snowy areas’ pixels are
greater than 0.12. However, water pixels also present AWEI values greater than
0.12. Therefore we need to find a criterion to distinguish the free water from the
snow. By observing the other layers, we can see that the SAVI may be useful to
make a distinction between these two classes. Indeed, most of the time, the SAVI of
snowy areas is greater than –0.25, whereas the SAVI of free water pixels is lower
than this value. Finally, we obtain our two criteria to show the difference between
these two classes. If the AWEI of one specific pixel is greater than 0.12 and if its
SAVI is greater than –0.25, this pixel is thus covered by snow. If the AWEI of
another pixel is also greater than 0.12 but if its SAVI is less than –0.25, this pixel
thus corresponds to open water. Note that we choose an AWEI value of 0.12 instead
of 0 to detect water. This threshold allows the user to avoid some pixels in very
shadowed areas.
Figure 4.19. Decision tree used to classify the land use of the region of Serre-
Ponçon in 8 classes. For a color version of the figure, see
www.iste.co.uk/baghdadi/qgis1.zip
The Use of SAGA GIS Modules in QGIS 125
By using a similar approach for all the classes, we obtain the following decision
tree (Figure 4.19). For instance, one pixel with an AWEI value lower than 0.12, a
reflectance in the first band (deep blue) lower than 0.17 and a SAVI value between
0.3 and 0.7, is a pixel of sparse vegetation.
4.2.6.3.2. Implementation of the decision tree
Once this decision tree is defined, we will implement it using the SAGA GIS
raster calculator. We can find this module by typing its name in the search bar of the
“Processing Toolbox”. In this module, we first need to set the layers we will use as
inputs. At the line “Main input layer”, we select the first layer we are going to use.
For instance, we select “awei_L8_2016-08-23”, which is the AWEI we have
previously calculated. This layer will be named “a” in the formula we will use. We
then access the submenu “Additional layers” by clicking on the icon “…” at the end
of the line. Here, we select the other layers we will use in the decision tree, i.e. the
SAVI (“savi_L8_2016-08-23_TOA_sp”) and the first Landsat band (“B1_L8_2016-
08-23”). These layers will be named “b” and “c”, respectively, according to the
order of selection.
The main difficulty is to translate our decision tree into the SAGA GIS syntax.
We use the logical “ifelse” instruction:
ifelse(test, value if True, value if False)
For instance, if we work on the first level of our decision tree dealing with the
AWEI, we write something like this:
ifelse(Is the AWEI greater than 0.12, if yes I test if the SAVI is less than
-0.25, if no I test if the band 1 is greater than 0.17)
By using several imbricated “ifelse” instructions, we obtain the following
decision tree. We write it in the “Formula” section of the raster calculator.
ifelse(a>0.12,ifelse(b<(-0.25),1,2),ifelse(c>0.17,3,ifelse(b<0.3,4,ifelse(b<0.7,5,
ifelse(b<1,6, ifelse(b<1.17,7,8))))))
Note that when we are dealing with negative values we need to write them
between parentheses. Thus, we are testing “b<(-0.25)” and not “b<-0.25”. When all
the settings are complete, we obtain Figure 4.20.
At the line “Calculated”, we name the resulting classification “landuse_
8_classes_2016-08-23.tif” and we store it in our working directory. Once the
process is over, the classification appears directly in QGIS. We can change its name
126 QGIS and Generic Tools
through its properties and in the “General” panel. We now have a land use of the
region of Serre-Ponçon in 8 classes (Table 4.2).
Figure 4.20. Implementation of the decision tree
using the SAGA GIS raster calculator
Pixel value Land use Hexa code Color
1 Water #001dff
2 Dry snow #257cff
3 Melted snow #13d0ff
4 Bare soil/artificialized soil #8c8c8c
5 Sparse vegetation #ffbe3b
6 Grassland/culture #00db36
7 Woodland #02a200
8 Dense forest #055c0f
Table 4.2. The land use of the region of Serre-Ponçon in 8 classes. For a color
version of the table, see www.iste.co.uk/baghdadi/qgis1.zip
The Use of SAGA GIS Modules in QGIS 127
We can change the style of this layer through itsProperties and in theBand
rendering” panel. The style can be defined manually by setting the “Render type” to
“Singleband pseudocolor”. In our case, we will use a predefined style by loading the
file “L8_landuse_8_classes.qml”. To load this file, we click on the “Style” icon at
the bottom of the “Band rendering” panel and select the “Load style…” menu. We
obtain the classification shown in Figure 4.21.
Figure 4.21. Land use of the region of Serre-Ponçon in 8 classes,
derived from the Landsat 8 image on August 23, 2016. For a color version
of the figure, see www.iste.co.uk/baghdadi/qgis1.zip
4.2.6.3.3. Simplification of the land use using a majority filter
The method we used (decision tree) to classify the land use is a “pixel-based”
method. Each pixel of the image is classified within a specific class according to its
values in different layers. One of the main disadvantages of this method is the
production of a classification with a “salt and pepper” effect, where many isolated
pixels are badly classified and add somenoise” to the result. It may be difficult to
precisely define what is “noise” and what is “reality”, especially with high-
resolution images. However, an isolated pixel in the middle of a homogeneous
region is probably noise. One commonly used way of reducing this noise is to apply
a “majority filter” to the resulting classification.
A majority filter is a moving window whose size and shape are defined by the
user. The algorithm looks for the majority value within the window and replaces the
value of the central pixel if this value is initially different. There is a convenient way
of applying this kind of filter using SAGA GIS. We use the module named
“Majority filter”. In the new window, we first set the layer we want to filter. Here,
128 QGIS and Generic Tools
we select the 8 classes land use classification “landuse_8_classes_2016-08-23.tif”.
Then in the “Search mode” line we set the shape of the windows we want to use,
square or circle. In our case, we choose a “Square” window. The “Radius”
corresponds to the size of the window. For example, we set a size of 5 pixels by 5
pixels. Finally, in the line “Filtered grid” we set the name of the resulting layer. We
name it “landuse_L8_2016-08-23_filter5.tif” and we store it in our working
directory (Figure 4.22).
Figure 4.22. Application of the majority filter on the 8 classes
land use classification using SAGA GIS
Once the process is complete, we can change the style of the filtered
classification by performing a “copy and paste” of the style of the initial
classification. In the filtered classification, there is less noise and the borders
between the different land use patches are more rounded (Figure 4.23). We have to
be careful not to simplify the initial classification too much.
At this stage, it would be necessary to compute a confusion matrix in order to
validate our classification. To do this, we would need some ground control points.
An example of a confusion matrix is presented in the chapter dedicated to the survey
of clearcuttings [OSE 16].
The Use of SAGA GIS Modules in QGIS 129
Figure 4.23. Land use classification after the application
of 5 × 5 square majority filter on the initial classification. For a color version of the
figure, see www.iste.co.uk/baghdadi/qgis1.zip
4.2.6.3.4. Reduction of the number of land use classes
In some cases, it may be useful to simplify the land use into more generic
classes. For example, we will simplify our land use in 8 classes into a land use in 4
classes. We are looking for the following classes: water, snow, vegetation and bare
soil. Table 4.3 summarizes this simplification.
Initial class Initial value Final class Final value
Water 1 Water 1
Dry snow 2 Snow 2
Melted snow 3 Snow 2
Bare soil/art. soil 4 Bare soil 3
Sparse vegetation 5 Vegetation 4
Grassland/culture 6 Vegetation 4
Woodland 7 Vegetation 4
Dense forest 8 Vegetation 4
Table 4.3.
Reclassification of the 8 classes land use as the 4 classes land use
We will proceed with this simplification using the SAGA GIS module named
“Reclassifiy values (simple)”. Firstly, we need to set the raster we want to reclassify.
We choose the filtered classification in 8 classes “landuse_L8_2016-08-
130 QGIS and Generic Tools
23_filter5.tif”. In the line “Lookup table”, we specify which values we want to
change and the new values we want to set. To do this, we click on the icon “…” in
the line “Lookup table” (Figure 4.24).
Figure 4.24. Reclassification of the land use
We fill the lookup table window using the information in Table 4.3
(Figure 4.25).
Figure 4.25. Lookup table to reclass the 8 classes
land use as the 4 classes land use
The Use of SAGA GIS Modules in QGIS 131
By clicking on “OK” we go back to the previous window. In the line “Operator”,
we need to set the operator we want to use. Due to the way in which we defined our
lookup table, we also want to reclass the minimum and maximum values of each
class. Thus, we set the operator to “Low value <= grid value <= high value”, which
is the second choice. Finally, we can uncheck the boxes “reclass no data values” and
“replace other values”. We name the new classification “landuse_L8_2016-08-
23_4_classes” (Figure 4.24) and we store it in our working directory. We obtain the
layer presented in Figure 4.26.
Figure 4.26. Land use reclassified into four main classes. For a color
version of the figure, see www.iste.co.uk/baghdadi/qgis1.zip
4.3. Hydrological network extraction using SAGA GIS in QGIS
4.3.1. Interests
In order to study the hydrological, biogeochemical or other aspects of the
functioning of a river and its basin, it is often necessary to extract the associated
hydrographic network. On this network, it will be possible to calculate
morphological indices (length, drainage density, sinuosity index, etc.). These
computed networks are simplified representations of a hydrosystem in vector or
raster format. In vector format, rivers are represented as oriented polylines and
watersheds are represented as polygons.
132 QGIS and Generic Tools
The hydrographic network extraction is done mostly from DEMs. Some are
available at a nearly global scale (GTOPO30, SRTM), others at a national level (BD
Alti IGN in France) or even at more local scales. These DEMs are characterized by a
given spatial resolution (i.e. a pixel size) and by an altimetric precision, which
determine the quality and the precision of the hydrosystem representation that will
be produced.
Through an example focused on the same region of Serre-Ponçon (French Alps),
we will see how to use QGIS and its SAGA module to generate such datasets.
SAGA implements some conventional methods, based on the definition of a unique
area threshold from which a river is considered to initiate [OCA 84]. SAGA also
proposed methods based on “stream burning” [HUT 89]. In this example, we will
use a method specific to SAGA based on Strahler’s ordination [STR 57].
4.3.2. DEM preprocessing
We can download part of the SRTM dataset (near-global DEM – from latitude 56°
S to 60° N produced by NASA) [FAR 07] from the EarthExplorer website
mentioned previously. Once identified, it is possible to download in GeoTIFF format
the two SRTM tiles that encompass our area of interest. We choose the latest version
of the SRTM available with a resolution of 1 s of arc, equivalent to a resolution of
about 90 square meters at the equator, georeferenced in WGS84 [JAR 08]. In the
“EarthExplorer” interface, we select the product “SRTM 1 Arc-Second Global” in the
“Data Sets Digital Elevation SRTM” panel. The following tiles correspond to
the area we want to study: n44_e005_1arc_v3.tif and n44_e006_1arc_v3.tif.
In order to optimize our computations, we will merge these SRTM tiles and
project them into UTM zone 31 N (EPSG 32631) coordinate reference system, as in
the section dedicated to land use analysis. This projection is mandatory since SAGA
GIS mostly handles data projected in a metric system. It is also easier for a user to
think in terms of square meters rather than in square degrees.
We will firstly mosaic our SRTM tiles in order to manipulate only a single file
rather than two. We use the SAGA tool “Mosaic raster layers” in the “Raster tools”
menu. In the popup window, we specify the two tiles to be assembled in the “Input
Grids” box. We keep the other options at their default values and specify the name
under which we want to save our mosaic as “mos_tmp.tif” (Figure 4.27). Our result
now appears into the QGIS main window.
The Use of SAGA GIS Modules in QGIS 133
Figure 4.27. Popup window to mosaic the two SRTM tiles of our area of interest
We now need to project this mosaic into UTM Zone 31 N to work in a metric
and relevant projection. To do this, we click on the layer, we select the “Save as …”
menu item, then in the “Save as” input box we specify the directory where we want
to store the new layer. We name it “mos_tmp2.tif” and finally we specify that we
want to reproject this layer into UTM Zone 31 N in the “CRS” dropbox list by
clicking on the icon next to it. We can select this projection, which has the EPSG
code (32631), as shown in Figure 4.28.
134 QGIS and Generic Tools
Figure 4.28. Projection into UTM zone 31 N coordinate
reference system of the merged SRTM tiles layer
Finally, in order to optimize the computing time, we will clip our mosaic
according to the border of our study area as defined in the shapefile
“study_area_32631.shp”. First, we set the projection of the project as UTM 31N.
To do this, we click on the icon located on the bottom right of the main QGIS
interface containing the word “EPSG”. In the popup window, in the “CRS” tab we
specify the coordinate reference system of the project as UTM 31N via its EPSG
code (Figure 4.29).
Figure 4.29. Setting the coordinate reference system of the project as UTM 31N
The Use of SAGA GIS Modules in QGIS 135
We load the “study_area_32631.shp” layer into QGIS and then, using the
“Clipper ...” function found in the “Raster → Extraction” menu, we extract the DEM
according to our study area. In the popup window, we select the “mos_tmp2.tif”
mosaic dataset as the input file and we name the output file
“srtm_durance_utm31n.tif”. We set the zero values to “–99999” (default values in
SAGA). We set the “clipping mode” to “mask layer” and specify the layer to be
used (“srtm_sp_utm31n.shp”). Finally, we check the option “Crop the extent of the
target dataset to the extent of the cut line” (Figure 4.30).
Figure 4.30. Clipping the SRTM dataset according to our area of interest
We now obtain our SRTM dataset clipped to our study area. We can remove all
intermediate rasters and keep only the final one for the rest of the process.
4.3.3. Filling sinks
Using a DEM for hydrological purposes involves a first computation to fill sinks
that may be included and that would make the theoretical river flow impossible. This
typically happens when a cell of a raster that is not the outlet of a river is completely
surrounded by other cells with a higher elevation than its itself, thus forming a kind
of bowl. This might topographically be the case in the field (as with fissures and
136 QGIS and Generic Tools
sinkholes in karstic zones, for instance), but could also be artifacts due to the DEM’s
resolution or its conditions of acquisition. Building a network of oriented arcs
symbolizing a hydrographic network therefore requires these cells to be filled in
order to avoid discontinuities in the network. The operation is called “fill sinks” and
consists of interpolating the values from the edge of the bowl to the cells concerned.
Moreover, in the module we will use later, the general slope is also taken into
account to calculate the interpolated values.
There are several ways to achieve this. SAGA implements the method of [PLA
01] that fills them by simulating what would remain of the passage of a runoff over
the DEM. For the exercise, we will use the method of [WAN 06], which has the
advantage of keeping a slope gradient in the filled cells. This function is located in
the “Terrain Analysis → Hydrology → Fill sinks (Wang & Liu)” menu. In the
popup window, we first specify the DEM that we want to fill
(“srtm_sp_utm31n.tif”). We keep the default value of the “Minimum slope”. We
specify the path in which to store the filled raster and its name
(“srtm_sp_filled_utm31n.tif”). As we will not use the “Flow Directions” and
“Watershed basins” rasters, we uncheck the “Open file after execution” boxes
(Figure 4.31) related to these rasters.
Figure 4.31. Filling sinks
At the end of the process, we obtain a new DEM very similar to the first one:
only the cells identified as sinks have new elevation values.
The Use of SAGA GIS Modules in QGIS 137
4.3.4. Hydrographic network extraction
In addition to the conventional methods used to extract hydrographic networks
with a minimum upstream drainage area, SAGA provides an original method based
on Strahler’s ordination for each pixel of a DEM. The logic is exactly the same as
for the ordination of river segments. A pixel that has no upstream pixel is an order 1
pixel. When a pixel is downstream of two pixels of order 1, it becomes an order 2
pixel. If this order 2 pixel receives one order 1 pixel, the pixel remains at order 2. It
will only pass to order 3 when it receives another pixel of order 2, and so on.
With this method, we have to set a threshold on the Strahler order, above which
we estimate that a river can flow in a perennial way. If the soil is very impermeable,
this threshold will be low. Conversely, when the soil is permeable, this threshold
will be high. We apply this method to our DEM filled with the “Channel network
and drainage basins” module in the “Terrain Analysis – Channels” menu. The
window appears as shown in Figure 4.32.
Figure 4.32. River network extraction using Strahler’s ordination-based method
We first specify which DEM we wish to work on; in our case, we select the filled
DEM “srtm_sp_fill_utm31n.tif”. The threshold is by default equal to 5. This
threshold means that any pixel with a Strahler order equal to or greater than 5 will be
seen as a perennial river. We can keep this threshold value at the first step. We
138 QGIS and Generic Tools
choose only to save the “Strahler Order” raster, which we name
“srtm_sp_strahler_utm31n.tif”, and the “Channels” hydrographic network as a
shapefile of polylines, which we name “channels5_sp_utm31n.shp”. The following
result appears (Figure 4.33).
Figure 4.33. The hydrographic network extracted in the
Serre-Ponçon area (in green) using a threshold of 5 on the Strahler order.
The background image is the DEM (SRTM. For a color version of the figure, see
www.iste.co.uk/baghdadi/qgis1.zip)
In order to fully understand the logic used by SAGA and the significance of
Strahler’s threshold, we can zoom in on the source of a river, which can be
considered as a perennial spring (Figure 4.34).
Figure 4.34. Zoom on two sources of rivers (in red). The background raster
is the Strahler ordination raster pixel by pixel “srtm_sp_strahler_utm31n.tif”
(pixel size: 30 m x 30 m). For a color version of the figure, see
www.iste.co.uk/baghdadi/qgis1.zip
The Use of SAGA GIS Modules in QGIS 139
In Figure 4.34, we see the two river sources in red. The underlying raster is the
Strahler ordination raster pixel by pixel. Thus, each pixel has a value corresponding
to its Strahler stream order. The darkest pixels have an order of –3 and the lighter
pixels where the rivers begin have an order of 1. By definition, Strahler stream order
cannot be negative, it should start at 1. In fact, in this case, we must rely on rank and
not on value. If we reclassify the pixels to set –3 to 1, we obtain Table 4.4.
Raster Strahler order –3 –2 –1 0 1
“Real” Strahler order 1 2 3 4 5
Table 4.4.
Equivalence between Strahler stream
orders from raster and “real” Strahler orders
The results show that the rivers start at a “real” Strahler order of 5. We are
therefore in good accordance with the previously defined threshold. Because of this
shift, the first rivers have a hydrologically relevant Strahler order of 1.
In order to understand the sensitivity to Strahler’s threshold, we can redo the
extraction of the hydrographic network with a threshold of 8. We call the result
“channels8_sp_utm31n.shp”. We obtain the network as shown in Figure 4.35.
Figure 4.35. Comparison between a network extracted
with a threshold of 5 (green) and one with a threshold of 8 (yellow). For a color
version of the figure, see www.iste.co.uk/baghdadi/qgis1.zip
As might be expected, the network extracted with a threshold of 8 is less dense
than the one extracted with a threshold of 5. The definition of this threshold depends
on the region studied. It can be determined by comparing the result with
hydrographic networks of which the user is confident (topographic map, satellite
image, national database such as that of the IGN in France [IGN 14], etc.).
140 QGIS and Generic Tools
Many methods exist to extract river networks from DEMs. It would be possible
to compare them, like
S
chneider et al. [SCH 17] who propose a new approach based
not only on elevation data, but also on climatic and lithological data.
4.4. Interpolation using SAGA GIS
4.4.1. Principle of the interpolation
Spatial interpolation consists of reconstructing the values of a piece of spatial
data over a domain from a sample of values only available in a few locations. Many
methods of varying complexity exist. In this example, we will use an easy,
convenient and commonly used method. In practical terms, when we perform a
spatial interpolation we transform a shapefile of points into a raster. We will not
discuss here the advantages and disadvantages of the various methods. In fact, the
interpolation may be a geostatistics topic in itself.
We draw the attention of the reader to the possibly irrelevant nature of these
interpolations from a hydrogeological point of view on the scale of the basin studied.
This exercise should not be seen as an exercise in hydrogeology but only as an
initiation into spatial interpolation.
4.4.2. Interpolation of measures of water quality in the aquifers of the
Seine basin
4.4.2.1. Data
For this exercise, we have some measures of the quality of the groundwater of
the Seine basin (Figure 4.36). The Seine river is located in the Northern part of
France (48°N, 2°E).
Figure 4.36. Location of the Seine basin in the North of France
The Use of SAGA GIS Modules in QGIS 141
These data are stored in a shapefile named “groundwater_oct_2006.shp” and are
provided by the Agence de l’Eau Seine Normadie (Seine Normandy Water agency).
In this file, we can find data relating to the bicarbonate (HCO3 in mgC/L referred to
as HCO3 in the data), the pH and the temperature (°C). These variables were
measured in October 2006. We will now see how to transform these discrete data
into continuous data using interpolation. In practical terms, we will transform our
shapefile of points into rasters where each pixel will have a quality value. In this
case, the interpolation may be useful when we want to know the water quality at a
point where there are no measurements.
4.4.2.2. Data preparation
In this exercise, we will only focus on bicarbonate data interpolation. We want to
measure the quality of our interpolation in order to select the best method of
interpolation. We divide our sample of 239 measurements into two equal parts. The
first part will be used to interpolate and the second part will be used to assess the
quality of the interpolation.
In order to randomly select 50% of the points, we use the module “Random
selection” in the menu “QGIS geoalgorithms → Vector selection tools” of the
Processing Toolbox. In the new window (Figure 4.37), we set the layer from
which we want to select the points “groundwater_oct_2006.shp” and for the method
we select “Percentage of selected features”, which we set to 50%.
Figure 4.37. Selection of 50% of the measurement points
Once the points are selected we save this selection by right clicking on the layer
and selecting from the menu “Save as…”. Do not forget to check the box “Save only
selected features”. In the line “File name”, we name the new layer “groundwater_
oct_2006_validation.shp” and store it in our working directory. The new points layer
appears in QGIS.
142 QGIS and Generic Tools
We now select the symmetric group of these points. We will use these points to
perform the interpolation. To do this, we open the attribute table of the initial layer
(the previous selection should still be active) by right clicking on the layer and by
selecting the menu “Open Attribute Table”. The lines corresponding to the selected
points appear in blue. At the top of the window we select the menu “Invert
selection” and we obtain the symmetric selection of the previous one. As for the first
part, we save this new selection and we name it “groundwater_oct_2006_
interpolation.shp” (do not forget to check the box “Save only selected features”). We
now have two complementary data sets.
4.4.2.3. Implementation of the interpolation
We now interpolate the bicarbonate measurements (field “HCO3”) using the
SAGA GIS modules. Many interpolation methods are available. We will compare
three different methods: B-spline approximation, Inverse Distance Weighted
Interpolation (IDW) and Thin plate spline (global).
Let us start with the first method. In the menuSAGA GIS → Raster creation
tools”, we select the module “B-spline approximation”. We first select the points
layer we want to interpolate (“groundwater_oct_2006_interpolation.shp”). Then we
select the field to interpolate (“HCO3”) and we change the resolution to 500. The
wider the study area is, the higher this value should be. In the line “Grid”, we name
the result of the interpolation “HCO3_interpol_B-spline.tif” (Figure 4.38).
Figure 4.38. Setting of the interpolation using the B-spline method
The Use of SAGA GIS Modules in QGIS 143
The result shown in Figure 4.39 appears in the window. We can change its style
to better display it.
Figure 4.39. Interpolation of the bicarbonate in the Seine basin (the limits of the
basin are in orange) using the “B-spline approximation” method. For a color version
of the figure, see www.iste.co.uk/baghdadi/qgis1.zip
We now perform the same interpolation but using the “Inverse Distance
Weighted Interpolation” method. The corresponding module is named in the same
way. In the new window, we select the layer we want to interpolate
“groundwater_oct_2006_interpolation.shp” and the field to interpolate (“HCO3”).
We leave the method as the default “Inverse distance to a power” and its parameters
are set by default to 2 and 1. We set the “search range” to “no search radius
(global)” because our study area is wide enough. We can leave the default values for
the other parameters (Figure 4.40).
Figure 4.40. Settings of the interpolation using the “IDW” method
144 QGIS and Generic Tools
We name this new interpolation “HCO3_interpol_idw.tif”. The result should
appear in QGIS, as shown in Figure 4.41.
Figure 4.41. Interpolation of the bicarbonate in the Seine basin using
the “Inverse distance weighted” method. For a color version of the figure,
see www.iste.co.uk/baghdadi/qgis1.zip
To finish we do the same work using the “Thin plate spline (global)” method.
We use the module of the same name. In the module’s window, we always set the
layer we want to interpolate and the field to interpolate. We name the result
“HCO3_interpol_thin_plate.shp” (Figure 4.42).
Figure 4.42. Settings of the interpolation using the “Thin plate spline” method
The Use of SAGA GIS Modules in QGIS 145
We obtain the result as shown in Figure 4.43.
Figure 4.43. Interpolation of the bicarbonate in the Seine basin using the
“Thin plate spline (global)” method. For a color version of the figure, see
www.iste.co.uk/baghdadi/qgis1.zip
4.4.2.4. Interpolation assessment
We now have three different interpolations and we want to keep the best one. To
assess these interpolations, we will use the second data set, the one we designed for
the validation “groundwater_oct_2006_validation.shp”. The aim is to calculate for
each point of validation the difference between the real measurement and the
interpolated value.
We associate the corresponding interpolated values with the points of validation
using the SAGA GIS module named “Add raster values to points”. We find this
module in the “Processing Toolbox” in the SAGA GIS menu “Vector <-> raster”. In
the new window, we select the points of validation ““groundwater_oct_2006_
validation.shp”, we set the rasters of interpolation in the line “Grid” (their order will
be the same in the final shapefile of points), we select the method “Nearest
Neighbor” in order to only keep the corresponding pixel for each point and we name
the result “interpolation_validation_temp.shp” (Figure 4.44).
146 QGIS and Generic Tools
Figure 4.44. Interpolated data and measured data comparison
In the attribute table of the new layer, we can see three new fields. These fields
contain the interpolated values for each method. The order of these fields is the same
as the order of the selection of the grids when we set the “Add raster values to
points” module.
We can rename these fields in order to make the next steps easier. To do this, we
use the “Refactor fields” module of the “Processing Toolbox”. To rename a field,
we just double click on its name in the “name” column. We save this new layer with
the name “interpolation_validation.shp”.
We now create three new fields in the layer “interpolation_validation.shp”.
In these fields, we calculate the difference between each interpolated value and the
measured value. To do this, we open the attribute table of the layer and we open the
field calculator by clicking on the “Open field calculator” icon at the top of the
attribute window. We check the box “Create a new field” and we name it “d-thin”.
In this field, we calculate the difference between the measured value and the
interpolated value obtained by the “Thin plate spline” method for each point. In the
line “Output field type”, we select “Decimal number (real)” because this field will
contain real numbers. We set the “Precision” to 3 (we can choose another value). In
the “Expression panel”, we write the expression “HCO3” “thin. We can use the
panel under the “search” bar to enter the expression (Figure 4.45).
The Use of SAGA GIS Modules in QGIS 147
Figure 4.45. Calculation of differences between measurements
and interpolated values using the field calculator
After clicking on “OK”, the new field appears in the attribute table. We follow
the same steps to calculate the two remaining differences. We name these fields
“d_idw” and “d_bspline”. Once the calculations are done we have to save the layer.
We now have three new fields containing the differences between the measured
values and the interpolated values.
We assess the quality of the interpolation simply by calculating the mean error of
each difference. We use the “Basic statistics for numeric fields” from the
Processing Toolbox. We first set the layer we want to analyze “interpolation_
validation.shp”. Then we set the field we want to assess. We can begin with the
“d-thin” field. To finish we set the output file containing the statistics “stats_thin”
(Figure 4.46).
Figure 4.46. Calculation of the statistics for each field of
difference between observed and interpolated values
148 QGIS and Generic Tools
We do the same for the two remaining differences. We name the output files
“stats_idw” and “stats_bspline”, respectively. The results are stored in a html
document. We can open this document with a web browser such as Firefox 4. We
obtain the following mean errors –0.66, –0.72 and –13.72 for the “Thin plate
spline”, “idw” and “B-spline” methods, respectively. Finally, we can choose the first
method as the best one in our case. We must note that the result depends on the
random selection we did at the beginning of this exercise (section 4.4.2.2). As the
errors for the thin plate spline method and for the “idw” method are very close, they
may be inverted according to the random selection used at the beginning.
To finish, we must insist that the final result highly depends on the interpolation
method used. The user should properly define the problematics in order to choose
the most relevant method and its most relevant parameters. The most difficult point
is the definition of the method rather than its implementation.
4.5. Bibliography
[FAR 07] FARR T.G., ROSEN P.A., CARO E. et al., “The Shuttle Radar Topography Mission”,
Reviews of Geophysics, vol. 45, 2007.
[FEY 14] FEYISA G.L., MEILBY H., FENSHOLT R. et al., “Automated Water Extraction Index: a
new technique for surface water mapping using Landsat imagery”, Remote Sensing of
Environment, vol. 140, pp. 23–35, 2014.
[HOR 45] HORTON R.E., “Erosional development of streams and their drainage basins:
hydrophysical approach to quantitative morphology”, Bulletin of the Geological Society of
America, vol. 56, pp. 275–370, 1945.
[HUT 89] H
UTCHINSON M., “A new procedure for gridding elevation and stream line data
with automatic removal of spurious pits”, Journal of Hydrology, vol. 106, nos. 3–4,
pp. 211–232, 1989.
[IGN 14] IGN, Base de Données sur la Cartographie Thématique des Agences de l’eau et du
ministère chargé de l’environnement, Institut national de l’information géographique et
forestière, 2014.
[JAR 08] J
ARVIS A., REUTER H.I., NELSON A. et al., “Hole-filled SRTM for the globe
Version 4”, CGIAR-CSI SRTM 90m Database, available at:http://srtm.csi.cgiar.org, 2008.
[JEN 13] JENSEN J.R., Remote Sensing of the Environment: An Earth Resource Perspective,
Pearson, Harlow, 2013.
[OCA 84] O’CALLAHAM J.F., MARK D.M., “The extraction of drainage networks from digital
elevation data”, Computer Vision, Graphics, and Image Processing, vol. 28, pp. 323–344,
1984.
The Use of SAGA GIS Modules in QGIS 149
[OSE 16] OSE K., CORPETTI T., DEMAGISTRI L., “Multispectral Satellite Image Processing”, in
BAGHDADI N., ZRIBI M. (eds), Optical Remote Sensing of Land Surface: Techniques and
Methods, ISTE Press, London and Elsevier, Oxford, 2016.
[PLA 02] PLANCHON O., DARBOUX F., “A fast, simple and versatile algorithm to fill the
depressions of digital elevation models”, CATENA, vol. 46, nos. 2–3, pp. 159–176, 2002.
[SCH 17] SCHNEIDER A., JOST A., COULON C. et al., “Global-scale river network extraction
based on high-resolution topography and constrained by lithology, climate, slope, and
observed drainage density”, Geophysics Research Letters, vol. 44, pp. 2773–2781, 2017.
[SON 01] SONG C., WOODCOCK C.E., SETO K.C. et al., “Classification and Change Detection
Using Landsat TM Data: When and How to Correct Atmospheric Effects?”, Remote
Sensing of Environment, vol. 75, pp. 230–244, 2001.
[STR 57] STRAHLER A.N., “Quantitative analysis of watershed geomorphology”, Transactions
of the American Geophysical Union, vol. 38, no. 6, pp. 913–920, 1957.
[WAN 06] WANG L., LIU H., “An efficient method for identifying and filling surface
depressions in digital elevation models for hydrologic analysis and modeling”,
International Journal of Geographical Information Science, vol. 20, no. 2, pp. 193–213,
2006.
... The post-processing task was performed using a majority filter and sieve tools to reduce noise and isolated pixels [21]. The accuracy assessment was implemented to determine the correctness of the classification results. ...
Conference Paper
Full-text available
Land use and land cover (LULC) and climate change (CC) will determine the dominant effect of the hydrological processes on the watershed. The two phenomena may alter hydrological processes on the watershed. The impact may be observed as erosion, sedimentation, landslide, flood, or drought that more frequently occurs on significant magnitudes. The assessment of LULC change is a crucial step to managing our environment. In this context, the Landsat image is a well-suited satellite to analyse the LULC change already proved by many researchers worldwide. In this study, the Landsat images (dated from 1970 to 2020) were exploited as the primary input to calculate the LULC change in Mayang Watershed. The Mayang watershed (1,110.14 km²) covers about 33% of the Jember regency. This watershed subject to regular floods and drought during the last decades. This study use landsat 1 MSS, Landsat 5 TM, Landsat 7 ETM+, Landsat 8 OLI/TIRS captured from 1972 to 2020 as main input. The images data are processed using the procedure of image treatment using open-source image processing software. In this case, the well-known pixel-based classification algorithm (i.e., Gaussian maximum likelihood classification) applies to produce LULC maps of 1972, 1997, 2002, 2017, and 2020. The LULC change is analysed by comparing the area extent of eight LULC classes (i.e., built-up (pavement) areas; paddy field; heterogeneous agricultural land; Dense vegetation; sparse vegetation; barre land/sand/rock; shrubland; and water body. The results show that the pavement area change slightly increased from 1972 to 1997, and then exponentially increased from 1997 to 2020 by 7,5% per year. The rapid change in pavement areas shows how human activities have influenced the watershed during the last 30 years. This rapid change also affects significantly the area occupied for paddy fields and decreases proportionally the area occupied for heterogeneous agricultural land.
... The eight (8) land cover class, includes : (1) built-up area including pavement and urban area (PUA); (2) paddy field (PF); (3) heterogeneous agricultural land (HAL); (4) dense vegetation (DV); (5) sparse vegetation (SV); (6) barren land/sand/rock (BLS); (7) shrubland (SL); and (8) Open Water Bodies (OWB). The post-processing task was performed using a majority filter and sieve tools to reduce noise and isolated pixels [20]. The accuracy assessment was implemented to determine the correctness of the classification results. ...
Conference Paper
The Land Use and Land Cover (LULC) change can potentially propagate the hydrological alteration and cause severe hydro-meteorological disasters (such as landslide, flood or flash flood, or drought) that potentially occurred around the watershed areas. LULC change assessment in long time series is the primer step to evaluate and better manage the sustainability of natural resources. In this study, the Landsat images (dated from 1970 to 2020) were used as the primary input to calculate the LULC change in the Bedadung watershed. The Watershed (1002,85 km²) covers about 30% of the Jember regency area. The City of Jember is located in the middle of the Watershed. This study use Landsat 1 MSS, Landsat 5 TM, Landsat 7 ETM+, Landsat 8 OLI/TIRS captured from 1972 to 2020 as main input. The images data are processed using open-source image processing software. Furthermore, classification processes apply to produce LULC maps of 1972, 1997, 2002, 2017, and 2020. The LULC change is analysed by comparing the area extent occupied for eight LULC classes (i.e., built-up or pavement areas; paddy field; heterogeneous agricultural land; dense vegetation; sparse vegetation; barren land/sand/rock; shrubland; and water body. The results show that the change of pavement area slightly increased (by 3,63 % average) from 1972 to 1997 (25 years), and then increased significantly by 9,59% (average per year) from the period 1997 to 2020 (23 years). However, a very significant change was observed from 2017 to 2020, by 16,49% a year. The pavement area has increased significantly in the City of Jember during the last years and shows the rate of LULC change resulting from human-induced activities (i.e., residential use, industrial sites, road, and city infrastructures).
... A plethora of processing algorithms are implemented in QGIS for overlaying, translating, and analyzing geospatial data. QGIS also provides support for the execution of geospatial processing algorithms from other tools, such as GDAL (Ose, 2018), GRASS (Lacaze, Dudek, & Picard, 2018), and SAGA (Passy & Théry, 2018). Furthermore, processing tools are being developed for multiple research purposes, such as exploratory spatial analysis (Gil, Varoudis, Karimi, & Penn, 2015), evaluation of aquatic ecosystems (Nielsen, Bolding, Hu, & Trolle, 2017), and classification of aerial and satellite imagery (Nielsen et al., 2017). ...
Article
Full-text available
When QGIS 3.0 was released in 2018, it added support for 3D visualisation. At the same time, CityJSON has been developing as an easy‐to‐use JavaScript Object Notation (JSON) encoding for 3D city models using the CityGML 2.0 data model. Together, this opened the possibility to support semantic 3D city models in the popular open‐source GIS software for the first time. In order to add support for 3D city models in QGIS, we have developed a plugin that enables CityJSON datasets to be loaded. The plugin parses a CityJSON file and analyses its tree structure to identify all city objects. Then, the geometry and attributes of every city object are transformed into QGIS features and divided into layers according to user preferences. CityJSON parsing was proven to be straightforward and consistent when tested against several open datasets. One of the biggest challenges we faced, though, was mapping CityJSON’s hierarchical data structure to the relational model of QGIS. We undertook this issue by providing various methods on how geometries from the model are loaded as QGIS features. We intend to use the plugin for educational purposes in our university and we believe it can be proven a worthy tool for researchers and practitioners.
Article
Full-text available
QGIS is the most popular free geospatial software in the world. QGIS belongs to the Open-Source Geospatial Foundation (OSGeo). Among the main strengths of this Geographic Information Systems are: the incorporation of tools via plugins, and a community of users and developers in constant growth. Despite the importance on the use of QGIS on the scientific community, to date there are no systematic studies indicating how the acceptance of this software has evolved through time. Therefore, the objective of this research was to characterize the scientific production and extent where QGIS has been used as their main geospatial tool. We conducted a bibliometric analysis of documents published in Scopus from 2005 to 2020 (931 manuscripts). The annual rate of publications increase was 40.3%. We found strong and positive correlations regarding the number of contributing code programmers (r=0.66, p0.005); and the total income of the QGIS project (r=0.88, p0.001). Seventy-two percent of the publications were included in six fields of study, being Earth and Planetary Sciences the most representative. Italy was the country with larger scientific production, while the USA was the most influential country (being the first, regarding the number of citations). In terms of the countries, the larger number of papers found were from Portugal, Italy, Brazil, and France. The International Archives of the Photogrammetry Remote Sensing and Spatial Information Sciences - ISPRS Archives stands among journals with the largest number of publications (47). In terms of collaborative networks among countries, we found strong links between authors from Germany, Switzerland, Greece, and Spain. Author network analysis showed three solid networks in different fields of study. We observed a favorable trend in the acceptance of QGIS across the world and a widespread development of collaborative networks. The present paper allowed increase the knowledge of geographic information systems, especially the development of scientific production using QGIS.
Preprint
Full-text available
Structure-from-Motion Multi View Stereo (SfM-MVS) photogrammetry is a technique by which volumetric data can be derived from overlapping image sets, using changes of an objects position between images to determine its height and spatial structure. Whilst SfM-MVS has fast become a powerful tool for scientific research, its potential lies beyond the scientific setting, since it can aid in delivering information about habitat structure, biomass, landscape topography, spatial distribution of species in both two and three dimensions, and aid in mapping change over time – both actual and predicted. All of which are of strong relevance for the conservation community, whether from a practical management perspective or understanding and presenting data in new and novel ways from a policy perspective. For practitioners outside of academia wanting to use SfM-MVS there are technical barriers to its application. For example, there are many SfM-MVS software options, but knowing which to choose, or how to get the best results from the software can be difficult for the uninitiated. There are also free and open source software options (FOSS) for processing data through a SfM-MVS pipeline that could benefit those in conservation management and policy, especially in instances where there is limited funding (i.e. commonly within grassroots or community-based projects). This paper signposts the way for the conservation community to understand the choices and options for SfM-MVS implementation, its limitations, current best practice guidelines and introduces applicable FOSS options such as OpenDroneMap, MicMac, CloudCompare, QGIS and speciesgeocodeR. It will also highlight why and where this technology has the potential to become an asset for spatial, temporal and volumetric studies of landscape and conservation ecology.
Chapter
This chapter aims is to monitor the surface evolution of an artificial reservoir during two hydrological years. This monitoring makes it possible to estimate the dynamics and amplitude of the hydrological seasonal variations of this reservoir. This evolution will be compared with the vegetation status in the surrounding areas of the reservoir. The chapter uses QGIS software, version 2.18.3, establishing a chain of treatments to extract the water surface of the reservoir and assess its area. Then, the vegetation status is analyzed via a calculation of Vegetation index. Eventually, it combines both operations to obtain a spatio-temporal view of these phenomena. The chain of treatments is established via QGIS interface, allowing for a semi-automatic process during the different steps. The chapter develops an algorithm based on the AWEI index for the extraction of water surfaces and on the SAVI index for the characterization of vegetation.
Article
Full-text available
To improve the representation of surface and groundwater flows, global land surface models rely heavily on high-resolution digital elevation models (DEMs). River pixels are routinely defined as pixels with drainage areas that are greater than a critical drainage area (Acr). This parameter is usually uniform across the globe, and the dependence of drainage density on many environmental factors is often overlooked. Using the 15” HydroSHEDS DEM as an example, we propose the calibration of a spatially variable Acr as a function of slope, lithology, and climate, to match drainage densities from reference river networks at a 1:50,000 scale in France and Australia. Two variable Acr models with varying complexities were derived from the calibration, with satisfactory performances compared to the reference river networks. Intermittency assessment is also proposed. With these simple tools, river networks with natural heterogeneities at the 1:50,000 scale can be extracted from any DEM.
Article
Full-text available
The usual numerical methods for removing the depressions of a Digital Elevation Model (DEM) gradually fill the depressions and merge the embedded ones. These methods are complex to implement and need large computation time, particularly when the DEM contains a high proportion of random noise. A new method is presented here. It is innovative because, instead of gradually filling the depressions, it first inundates the surface with a thick layer of water and then removes the excess water. The algorithm is simple to understand and to implement, requiring only a few tens of code lines. It is much faster than usual algorithms. Moreover, this method is versatile: depressions can be replaced with a surface either strictly horizontal, or slightly sloping. The first option is used for the calculation of depression storage capacity and the second one for drainage network extraction. The method is fully detailed and a pseudo-code is provided. Its practical computation time, evaluated on generated fractal surfaces, is asymptotically proportional to N1.2 where N is the number of grid points. The theoretical computation time is asymptotically proportional to N1.5 in all cases, with the exception of some exotic ones with no practical interest. By contrast, existing methods have a computation time asymptotically proportional to N2. Applications are done for both generated and measured surfaces with 256 cells to 6.2 million cells.
Article
Full-text available
A morphological approach to the interpolation of regular grid digital elevation models (DEMs) from surface specific elevation data points and selected stream lines is described. The approach has given rise to a computationally efficient interpolation procedure which couples the minimization of a terrain specific roughness penalty with an automatic drainage enforcement algorithm. The drainage enforcement algorithm removes spurious sinks or pits yielding DEMs which may be used to advantage in hydrological process studies. The drainage enforcement algorithm has also been found to significantly increase the accuracy of DEMs interpolated from sparse, but well chosen, surface specific elevation data. Moreover, it facilitates the detection of errors in elevation data that would not be detected by more conventional statistical means and forms a sound physical basis for cartographic generalization.
Chapter
Having begun in the 1970s with the American Landsat program, the use of optical satellite images for civilian purposes has since experienced significant technological advancements. In the space of 10 years, the images provided by Earth observation satellites have gone from high to very high spatial resolution, from a decametric resolution to a submetric resolution. In addition, the new generation of satellites known as “agile” allow for the reduction of acquisition time above the same area, while providing a synoptic and multispectral view of the territory. Long reserved for scientific use, these data conquer new fields of application and are reaching a much wider audience, competing sometimes with aerial photography.
Article
The electromagnetic radiation (EMR) signals collected by satellites in the solar spectrum are modified by scattering and absorption by gases and aerosols while traveling through the atmosphere from the Earth's surface to the sensor. When and how to correct the atmospheric effects depend on the remote sensing and atmospheric data available, the information desired, and the analytical methods used to extract the information. In many applications involving classification and change detection, atmospheric correction is unnecessary as long as the training data and the data to be classified are in the same relative scale. In other circumstances, corrections are mandatory to put multitemporal data on the same radiometric scale in order to monitor terrestrial surfaces over time. A multitemporal dataset consisting of seven Landsat 5 Thematic Mapper (TM) images from 1988 to 1996 of the Pearl River Delta, Guangdong Province, China was used to compare seven absolute and one relative atmospheric correction algorithms with uncorrected raw data. Based on classification and change detection results, all corrections improved the data analysis. The best overall results are achieved using a new method which adds the effect of Rayleigh scattering to conventional dark object subtraction. Though this method may not lead to accurate surface reflectance, it best minimizes the difference in reflectances within a land cover class through time as measured with the Jeffries–Matusita distance. Contrary to expectations, the more complicated algorithms do not necessarily lead to improved performance of classification and change detection. Simple dark object subtraction, with or without the Rayleigh atmosphere correction, or relative atmospheric correction are recommended for classification and change detection applications.
Article
Quantitative geomorphic methods developed within the past few years provide means of measuring size and form properties of drainage basins. Two general classes of descriptive numbers are (1) linear scale measurements, whereby geometrically analogous units of topography can be compared as to size; and (2) dimensionless numbers, usually angles or ratios of length measures, whereby the shapes of analogous units can be compared irrespective of scale. Linear scale measurements include length of stream channels of given order, drainage density, constant of channel maintenance, basin perimeter, and relief. Surface and crosssectional areas of basins are length products. If two drainage basins are geometrically similar, all corresponding length dimensions will be in a fixed ratio. Dimensionless properties include stream order numbers, stream length and bifurcation ratios, junction angles, maximum valley-side slopes, mean slopes of watershed surfaces, channel gradients, relief ratios, and hypsometric curve properties and integrals. If geometrical similarity exists in two drainage basins, all corresponding dimensionless numbers will be identical, even though a vast size difference may exist. Dimensionless properties can be correlated with hydrologic and sediment-yield data stated as mass or volume rates of flow per unit area, independent of total area of watershed.
Article
The electromagnetic radiation (EMR) signals collected by satellites in the solar spectrum are modified by scattering and absorption by gases and aerosols while traveling through the atmosphere from the Earth's surface to the sensor. When and how to correct the atmospheric effects depend on the remote sensing and atmospheric data available, the information desired, and the analytical methods used to extract the information. In many applications involving classification and change detection, atmospheric correction is unnecessary as long as the training data and the data to be classified are in the same relative scale. In other circumstances, corrections are mandatory to put multitemporal data on the same radiometric scale in order to monitor terrestrial surfaces over time. A multitemporal dataset consisting of seven Landsat 5 Thematic Mapper (TM) images from 1988 to 1996 of the Pearl River Delta, Guangdong Province, China was used to compare seven absolute and one relative atmospheric correction algorithms with uncorrected raw data. Based on classification and change detection results, all corrections improved the data analysis. The best overall results are achieved using a new method which adds the effect of Rayleigh scattering to conventional dark object subtraction. Though this method may not lead to accurate surface reflectance, it best minimizes the difference in reflectances within a land cover class through time as measured with the Jeffries–Matusita distance. Contrary to expectations, the more complicated algorithms do not necessarily lead to improved performance of classification and change detection. Simple dark object subtraction, with or without the Rayleigh atmosphere correction, or relative atmospheric correction are recommended for classification and change detection applications.