Chapter 8. The Processing Toolbox

In this chapter, we will explore the structure of the QGIS Processing Toolbox and identify which algorithm providers are available and how to use these specialized algorithms. To accomplish these goals, we will ensure that the toolbox is properly configured, use a variety of specialized vector and spatial algorithms from the GRASS and SAGA libraries, perform hydrologic analyses using the TauDEM library, explore the basic tools of R, and work with LIDAR data using the LAStools and Fusion libraries. We will cover the following topics in this chapter:

  • Introduction to the toolbox
  • Configuring the toolbox
  • The structure of the toolbox
  • Performing spatial analyses using GRASS and SAGA
  • Performing a hydrologic analysis with TauDEM
  • Producing summary statistics of data using R
  • Exploring and manipulating LIDAR data with LAStools and Fusion

About the Processing Toolbox

The Processing Toolbox serves as a one-stop-shopping GUI for accessing algorithms from both native QGIS tools and many third-party providers. Historically, the algorithms from other geospatial packages were only accessible within the native software environment or through a command-line environment. Algorithms from the following providers are accessible using the toolbox:

  • QGIS geo-algorithms
  • GDAL/OGR
  • GRASS
  • SAGA
  • TauDEM
  • LAStools
  • Fusion
  • R
  • Orfeo Toolbox
  • Models
  • Scripts

We will not make use of all the algorithm providers or explore all the available algorithms in this chapter; however, the last two entries in the list offer additional options for creating reusable graphical models and running Python scripts, which are covered in Chapter 9, Automating Workflows with the Graphical Modeler, and Chapter 10, Creating QGIS Plugins with PyQGIS and Problem Solving, respectively.

Configuring the Processing Toolbox

In this section, we will ensure that the Processing Toolbox is correctly configured to access and execute the algorithms within the GRASS, SAGA, TauDEM, and LAStools libraries. Many of the required libraries are automatically installed, but configuring these tools will vary depending on your operating system and how you choose to install QGIS.

Tip

Finding support for your installation

To use some of the GRASS algorithms in this chapter, you will need to make sure that you properly install GRASS 7. If you've used the OSGeo installer, you can use the advanced installer option to add GRASS 7 to your installation; otherwise, you will need to manually install GRASS 7 and set the path directory in the Processing Toolbox.

In-depth instructions for configuring SAGA are provided in Chapter 5, Preparing Raster Data for Processing.

Instructions for configuring most third-party algorithms on different operating systems can be found on the QGIS website at http://docs.qgis.org/2.6/en/docs/user_manual/processing/3rdParty.html.

Support for installing LAStools on Windows, Mac OS X, and Linux can be found at http://rapidlasso.com/category/tutorials/.

Support for installing Fusion on Windows can be found here: http://forsys.cfr.washington.edu/fusion/fusionlatest.html.

To begin configuring the toolbox, we need to click on Options and configuration under Processing, which is illustrated in the following screenshot. Note that if you are using a Linux distribution, this configuration can be found by navigating to Processing | Options | Providers.

Configuring the Processing Toolbox

To get started, you need to make sure that each of the providers that you intend to use is activated, and depending on your operating system and installation approach, you may need to specify the necessary folders to run TauDEM, R, LAStools, and Fusion. The next screenshot illustrates that each of the algorithms are activated and the necessary folders are specified:

Configuring the Processing Toolbox

Once you click on OK, QGIS will update the list of algorithms accessible through the Processing Toolbox. The next section will provide you with an overview of the structure and organization of the toolbox interface.

Understanding the Processing Toolbox

In this section, we will explore the organization and establish a common language for describing the various components of the toolbox. Until this point, we haven't actually seen the interface itself. We've merely configured and possibly installed the required dependencies to make the toolbox function. To view the toolbox, you need to click on Toolbox under Processing, as illustrated in this screenshot:

Understanding the Processing Toolbox

The Processing Toolbox will appear on the right-hand side of the QGIS interface; however, by default, most algorithm providers are not visible. You need to click on the Simplified interface option visible in the next screenshot in the lower right-hand corner, which will then display the option to select the Advanced interface option:

Understanding the Processing Toolbox

After selecting the Advanced interface option, you will finally have access to the full list of algorithms that the toolbox provides, as illustrated in this screenshot:

Understanding the Processing Toolbox

Initially, you will only see a list of the various providers and a summary of the total algorithms available from each provider. When you click on the + icon next to any of the entries, the list expands to reveal subdirectories that group related tools. In addition to manually navigating these directories, there is a search box at the top of the toolbox. So, if you are already familiar with these third-party packages or are looking for a specific tool, this may be a more efficient way to access the algorithms of interest.

Tip

You can search algorithms by topic

Even if you aren't familiar with the algorithm providers, you can still use the search box to explore what tools are available from multiple providers. For example, if you are interested in finding different ways to visualize or explore topographic relationships, you could search for it by typing topographic in the textbox and discover that there are 10 tools from three different providers that relate to topography!

To open any algorithm of interest, you just need to double-click on the name and the algorithm dialog interface will open. It looks similar to other tools that we have already used in QGIS. For example, click on the + icon next to the GDAL/OGR entry, then [GDAL] Analysis, and double-click on Aspect. You will see the interface shown in the following screenshot:

Understanding the Processing Toolbox

Any algorithm that you select will present you with a similar algorithm dialog box, so it is worth exploring the functionality of the interface. Similar to other tools that we have already used, clicking on any inverted black triangle will reveal drop-down options that will allow us to select an option that is passed to the algorithm. The dialog boxes within the Processing Toolbox also provide two additional tabs that may provide additional information. The Log tab will record the history of any operations performed using the tool, which is often useful for debugging errors, and the Help tab provides a brief summary of the functionality and explanation of the various options presented in the interface. However, if we click on the Help tab for the Aspect tool, we are presented with the message: Sorry, no help is available for this algorithm. This is not an uncommon experience; so if the functionality or optional parameters are unclear, we need to visit the website of the algorithm provider.

Tip

You can explore the functionality of each of the algorithms that we are going to use in this section by going to the official website of each provider:

GRASS: http://grass.osgeo.org/

SAGA: http://www.saga-gis.org/en/index.html

TauDEM: http://hydrology.usu.edu/taudem/taudem5/

LAStools: http://rapidlasso.com/LAStools/

Fusion: http://forsys.cfr.washington.edu/fusion/FUSION_manual.pdf

The Processing Toolbox also provides one additional option for accessing the underlying algorithms, and that is through processing commander. To access this tool, click on Commander under Processing and you will be presented with an interface as shown in the following screenshot:

Understanding the Processing Toolbox

Notice that by typing grid in either the commander box or the search box, we are presented with a list of available algorithms. The primary difference between the two is that when a tool is selected in the commander drop-down list, it automatically opens. Therefore, once we develop a familiarity with the names of specific tools, the processing commander may increase workflow productivity.

Now that the QGIS Processing Toolbox is properly configured and we have a basic understanding of its overall functionality and organization, we can begin using it to utilize tools that weren't historically available within the QGIS environment. The intent with these exercises isn't to provide a comprehensive overview of all the providers or algorithms but to illustrate the power and flexibility that the toolbox brings to QGIS.

Using the Processing Toolbox

We will begin by using some of the GRASS algorithms and focusing primarily on tools that aren't available through default plugins or drop-down menus. For example, even though GRASS has the ability to calculate aspect, this functionality is already available in QGIS and it can be found by navigating to Raster | Terrain Analysis.

The original data used in this chapter can be obtained from these sources:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.3.208