DuckDB & analytic SQL
A spatial database with no server: querying GeoParquet, joining millions of rows, and where it beats a GeoDataFrame.
Everything on Spatial Workflow about duckdb & analytic sql, in the order that usually works: understand the idea, then run the task, then fix it when it goes wrong. 21 guides in total.
2 learning paths run through this topic — follow one if you would rather work through a route than pick a single guide.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
- DuckDB Spatial Explained: A Spatial Database That Is Just a File duckdb spatial explained
- Columnar or Row Storage: Why DuckDB Is Fast on Wide Tables columnar row spatial storage
- CRS in DuckDB: Why ST_Transform Moves Your Data to the Wrong Place duckdb crs projection
- How DuckDB Uses (and Does Not Use) a Spatial Index duckdb spatial index
- DuckDB or PostGIS: Which One a Workflow Needs duckdb vs postgis
- DuckDB's Memory Model: Streaming, Spilling and Limits duckdb memory model
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Install and Load the DuckDB Spatial Extension install duckdb spatial
- How to Read Shapefiles, GeoJSON and GeoParquet in DuckDB duckdb read spatial files
- How to Run a Spatial Join in DuckDB duckdb spatial join
- How to Aggregate Millions of Points into a Grid with DuckDB duckdb aggregate millions of points
- How to Query Remote GeoParquet over HTTP with DuckDB duckdb remote geoparquet
- How to Query Hive-Partitioned GeoParquet in DuckDB duckdb hive partitioned parquet
- How to Move Data Between DuckDB and GeoPandas duckdb geopandas
- How to Use DuckDB as the Engine in a GIS Pipeline duckdb gis pipeline
- How to Benchmark DuckDB Against GeoPandas Honestly benchmark duckdb geopandas
- How to Use H3 in DuckDB for Grid Aggregation at Scale duckdb h3 extension
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
- Fixing a DuckDB Spatial Extension That Will Not Load duckdb spatial extension load error
- Fixing ST_Read Failures on Spatial Files in DuckDB duckdb st_read fails
- Fixing a DuckDB Spatial Join That Never Finishes duckdb spatial join slow
- Fixing DuckDB Out of Memory on a Large Spatial Query duckdb out of memory
- Fixing a Geometry Column Lost on Export from DuckDB duckdb geometry lost export
Learning paths through this topic
A curated route rather than a list — the guides in the order that builds on itself.
Related topics
Subjects that keep coming up alongside this one, most overlap first.