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
1
Section 1: Getting Started with Geospatial Analytics
6
Section 2: SQL for Spatial Analytics

Landscape Change Monitoring System

Let’s explore the Landscape Change Monitoring System (LCMS) Data Explorer (https://apps.fs.usda.gov/lcms-viewer/), shown in Figure 8.25. You can download data from different time periods and observe any changes. The latest data available here was for 2020. Although we can select specific dates from EarthExplorer, the concepts required to process and prepare for introducing spatial concepts in writing SQL queries would be beyond the scope of this book. For example, the workflow I would use professionally involves built-in QGIS raster functions or Python coding.

Figure 8.25 – LCMS Data Explorer (Puerto Rico)

Figure 8.25 – LCMS Data Explorer (Puerto Rico)

For importing raster data and exploring raster data, we can learn about a few SQL functions, but first, we need to locate the data and download it to our local computer. Download the years of interest available by scrolling in the lower-left panel. I selected 2017 and 2020 to explore how land use might...