Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Geospatial Analysis with SQL

You're reading from   Geospatial Analysis with SQL A hands-on guide to performing geospatial analysis by unlocking the syntax of spatial SQL

Arrow left icon
Product type Paperback
Published in Oct 2023
Publisher Packt
ISBN-13 9781835083147
Length 234 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Bonny P McClain Bonny P McClain
Author Profile Icon Bonny P McClain
Bonny P McClain
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Section 1: Getting Started with Geospatial Analytics
2. Chapter 1: Introducing the Fundamentals of Geospatial Analytics FREE CHAPTER 3. Chapter 2: Conceptual Framework for SQL Spatial Data Science – Geometry Versus Geography 4. Chapter 3: Analyzing and Understanding Spatial Algorithms 5. Chapter 4: An Overview of Spatial Statistics 6. Section 2: SQL for Spatial Analytics
7. Chapter 5: Using SQL Functions – Spatial and Non-Spatial 8. Chapter 6: Building SQL Queries Visually in a Graphical Query Builder 9. Chapter 7: Exploring PostGIS for Geographic Analysis 10. Chapter 8: Integrating SQL with QGIS 11. Index 12. Other Books You May Enjoy

Importing additional data – power plants

For example, if we want to look at the location of Power_Plants in Puerto Rico, we can upload the data and select the data from Puerto Rico, as seen in Figure 7.13:

Figure 7.13 – Public power plants in Puerto Rico

Figure 7.13 – Public power plants in Puerto Rico

Click on the layers icon at the top right-hand corner of the canvas and explore the options for basemaps that are available in pgAdmin:

SELECT * FROM public."Power_Plants"
WHERE statename = 'Puerto Rico'
ORDER BY id ASC

There are also times when the basemap should fade into the background to highlight another feature, such as when we look at the change in waterways after weather events, as shown in Figure 7.14 (2019) and Figure 7.15 (2022):

SELECT * FROM public.pr_multipolygons_2019
WHERE "natural" = 'water'
ORDER BY id ASC LIMIT 100000
…..
Figure 7.14 – A 2019 representation of a natural multipolygon, n=362

Figure 7.14 – A 2019 representation of a natural multipolygon...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime