Spatial SQL with PostGIS and SedonaDB

Twenty-five lessons, written against a live PostGIS 3.6 cluster and a planet-scale OSM import. Every query on these pages is one you can run yourself.

The first 4 lessons are open. The rest continue in the app.

# Lesson
1 Prerequisites: Joins and Big O
2 Where Your SQL Runs
3 Geometry Is a Type, Not Two Numbers
4 Degrees Are Not Metres
5 Reading a Schema You Did Not Write Sign in to read
6 Filtering, Casting and NULL Discipline Sign in to read
7 Aggregation and the Spatial Aggregates Sign in to read
8 CTEs and the Shape of a Readable Query Sign in to read
9 Window Functions Over Spatial Measures Sign in to read
10 Predicates and the DE-9IM Family Sign in to read
11 The && Operator and What an Index Can Answer Sign in to read
12 ST_DWithin, ST_Distance and the KNN Operator Sign in to read
13 Spatial Joins and LATERAL Nearest-Neighbour Sign in to read
14 Constructors, Accessors and Editors Sign in to read
15 Simplification, Tolerance and Broken Topology Sign in to read
16 Invalid, Empty and NULL Are Three Different Things Sign in to read
17 Querying the Feature Store Sign in to read
18 Raw OSM Tags as jsonb Sign in to read
19 H3 Hex Binning, Server-Side Sign in to read
20 SedonaDB: When the Table Is a File Sign in to read
21 Choosing an Engine, and Porting a Query Sign in to read
22 Why Your Query Is Slow Sign in to read
23 From Query to Map Layer Sign in to read
24 Reading What the Assistant Wrote Sign in to read
25 What This Cluster Cannot Do Yet Sign in to read

Open the lessons in the app