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

Spatial databases

Geospatial data is vast and often resides in databases or data warehouses. Data stored in a filesystem is only accessible through your local computer and is limited to the speed and efficiency of your work space. Collecting and analyzing geographic information within storage systems of relationally structured data increases efficiency.

Spatial databases are optimized for storing and retrieving your data. Data stored in databases are accessed through client software. The client is a computer or hostname (where the database is located).

Next, the server listens for requests on a port. There are a variety of ports, but with PostgreSQL, the default is 5432—but more on that later. The final pieces of information are about security and accessibility. You will select a username and password to access the database. Now, the client has all it needs to access the database. The data within a database is formatted as tables and resides with the host either locally...