Book Image

Hands-On Geospatial Analysis with R and QGIS

By : Shammunul Islam, Brad Hamson
Book Image

Hands-On Geospatial Analysis with R and QGIS

By: Shammunul Islam, Brad Hamson

Overview of this book

Managing spatial data has always been challenging and it's getting more complex as the size of data increases. Spatial data is actually big data and you need different tools and techniques to work your way around to model and create different workflows. R and QGIS have powerful features that can make this job easier. This book is your companion for applying machine learning algorithms on GIS and remote sensing data. You’ll start by gaining an understanding of the nature of spatial data and installing R and QGIS. Then, you’ll learn how to use different R packages to import, export, and visualize data, before doing the same in QGIS. Screenshots are included to ease your understanding. Moving on, you’ll learn about different aspects of managing and analyzing spatial data, before diving into advanced topics. You’ll create powerful data visualizations using ggplot2, ggmap, raster, and other packages of R. You’ll learn how to use QGIS 3.2.2 to visualize and manage (create, edit, and format) spatial data. Different types of spatial analysis are also covered using R. Finally, you’ll work with landslide data from Bangladesh to create a landslide susceptibility map using different machine learning algorithms. By reading this book, you’ll transition from being a beginner to an intermediate user of GIS and remote sensing data in no time.
Table of Contents (12 chapters)
8
GRASS, Graphical Modelers, and Web Mapping

What this book covers

Chapter 1, Setting Up R and QGIS Environments for Geospatial Tasks, shows how to set up the R and QGIS environments necessary for this book. The basics of R programming are covered, and you are introduced to the interface of QGIS.

Chapter 2, Fundamentals of GIS Using R and QGIS, details the different ways that spatial data is handled by R and QGIS. You are introduced to the steps that need to be followed to set up different projection systems and re-project data in this software. Packages such as sp, maptools, rgeos, sf, ggplot2, ggmap, and tmap in R are covered, showing how spatial data can be imported, exported, and visualized with the R engine. This chapter also shows how to do the same tasks with QGIS, with the help of detailed descriptions and screenshots. You will learn how to visualize quantitative and qualitative data in both R and QGIS.

Chapter 3, Creating Geospatial Data, provides a detailed overview of how to create geospatial data. This chapter will shed light on how vector and raster data is stored and how you can create point data, line data, and polygon data. Using QGIS, you will also be introduced to the digitization of maps.

Chapter 4, Working with Geospatial Data, explains how to query data for information extraction, how to use different joins, how to dissolve polygons, how to use buffering, and more. R and QGIS are both used to accomplish these tasks.

Chapter 5, Remote Sensing Using R and QGIS, begins with the basics of RS. The steps required to load and visualize remote sensing in R and QGIS are followed by band arithmetic, stacking and unstacking raster images, and other basic operations with RS data.

Chapter 6, Point Pattern Analysis, starts with the basic terminology of point pattern process (PPP) such as points, events, marks, windows, the spatial point pattern, and the spatial point process. It then explains how to use R to create R objects. You are then introduced to the PPP analysis for spatial randomness checking using quadrat testing, G-function, K-function and L-function, and others.

Chapter 7, Spatial Analysis, introduces readers to testing and modeling autocorrelation, fitting generalized linear models, and geostatistics. Checking the spatial autocorrelation of data using Moran's I is covered here, followed by spatial regression and a generalized linear model. Spatial interpolation and the basics of geostatistics are also discussed here.

Chapter 8, GRASS, Graphical Modelers, and Web Mapping, focuses on some more open source software, GRASS GIS, which can be used with QGIS. The chapter explains how to set up GRASS GIS and perform GRASS operations. Automating tasks using the graphical modeler is also covered. You will also learn how to make web maps inside QGIS.

Chapter 9, Classification of Remote Sensing Images, covers the basics of remote sensing image classification using QGIS 3.2.2. Supervised classification using the SCP plugin of QGIS is used to show how you can classify landsat images.

Chapter 10, Landslide Susceptibility Mapping, is a case study-based chapter where you are introduced to the different steps needed to make landslide susceptibility maps. Using the historical data of landslide events in Bangladesh, this chapter provides a step-by-step guide to the process of creating a landslide susceptibility map. In doing so, R and QGIS are used together. Logistic regression and decision-tree-based algorithms are used to fit models, and the accuracy of those models are then computed.