Book Image

Geospatial Analysis with SQL

By : Bonny P McClain
Book Image

Geospatial Analysis with SQL

By: Bonny P McClain

Overview of this book

Geospatial analysis is industry agnostic and a powerful tool for answering location questions. Combined with the power of SQL, developers and analysts worldwide rely on database integration to solve real-world spatial problems. This book introduces skills to help you detect and quantify patterns in datasets through data exploration, visualization, data engineering, and the application of analysis and spatial techniques. You will begin by exploring the fundamentals of geospatial analysis where you’ll learn about the importance of geospatial analysis and how location information enhances data exploration. Walter Tobler’s second law of geography states, “the phenomenon external to a geographic area of interest affects what goes on inside.” This quote will be the framework of the geospatial questions we will explore. You’ll then observe the framework of geospatial analysis using SQL while learning to create spatial databases and SQL queries and functions. By the end of this book, you will have an expanded toolbox of analytic skills such as PostGIS and QGIS to explore data questions and analysis of spatial information.
Table of Contents (13 chapters)
Free Chapter
Section 1: Getting Started with Geospatial Analytics
Section 2: SQL for Spatial Analytics

Using SQL Functions – Spatial and Non-Spatial

Beginning with a data question is the most efficient process for writing SQL queries. This may be a problem you are trying to solve or perhaps a null hypothesis. Once we have an articulated question, we will be tasked with locating data. The final steps are to analyze the problem and communicate the results.

I would argue that this is particularly relevant when learning how to write efficient SQL queries. There is a natural cadence and syntax that differs from writing a code snippet in, say, Python or R.

The datasets we are exploring are from the Amazon rainforest in Brazil. Mining activities in the Amazon rainforest are a known provocation for deforestation and the associated impact of toxic pollution on surrounding communities. Mining activities also require dense road networks for transportation and infrastructure to support industrial mining, which impacts the growth of surrounding vegetation, pollution run-off, and habitats...