DuckDB for Spatial Data
A spatial database with no server, reading the file you already have.
DuckDB reads a GeoParquet file, a shapefile or a remote URL and runs spatial SQL over it with nothing to install and nothing to load first. That makes it the fastest way to answer a question about a dataset too big for a GeoDataFrame and too small to justify PostGIS. These guides cover the spatial extension, reading and writing every format worth using, joins and aggregations at a scale GeoPandas cannot reach, the CRS handling that has no safety net, and the four ways a query that should take seconds takes an hour.
Start here
The cornerstone guide — the whole workflow end to end. Everything after it goes deeper into one part of it.
Step 1 DuckDB Spatial Explained: A Spatial Database That Is Just a File duckdb spatial explained Begin the path →The full path, in order
20 guides: the concepts underneath the work, then each task, then the errors that task produces. Work down, or jump to the step you need.
- Columnar or Row Storage: Why DuckDB Is Fast on Wide Tables columnar row spatial storage 🧭 Concept
- How to Install and Load the DuckDB Spatial Extension install duckdb spatial ⚙️ How-To
- How to Read Shapefiles, GeoJSON and GeoParquet in DuckDB duckdb read spatial files ⚙️ How-To
- CRS in DuckDB: Why ST_Transform Moves Your Data to the Wrong Place duckdb crs projection 🧭 Concept
- How to Run a Spatial Join in DuckDB duckdb spatial join ⚙️ How-To
- How DuckDB Uses (and Does Not Use) a Spatial Index duckdb spatial index 🧭 Concept
- How to Aggregate Millions of Points into a Grid with DuckDB duckdb aggregate millions of points ⚙️ How-To
- How to Query Remote GeoParquet over HTTP with DuckDB duckdb remote geoparquet ⚙️ How-To
- How to Query Hive-Partitioned GeoParquet in DuckDB duckdb hive partitioned parquet ⚙️ How-To
- How to Move Data Between DuckDB and GeoPandas duckdb geopandas ⚙️ How-To
- DuckDB or PostGIS: Which One a Workflow Needs duckdb vs postgis 🧭 Concept
- DuckDB's Memory Model: Streaming, Spilling and Limits duckdb memory model 🧭 Concept
- How to Use DuckDB as the Engine in a GIS Pipeline duckdb gis pipeline ⚙️ How-To
- How to Benchmark DuckDB Against GeoPandas Honestly benchmark duckdb geopandas ⚙️ How-To
- Fixing a DuckDB Spatial Extension That Will Not Load duckdb spatial extension load error 🔧 Fix
- Fixing ST_Read Failures on Spatial Files in DuckDB duckdb st_read fails 🔧 Fix
- Fixing a DuckDB Spatial Join That Never Finishes duckdb spatial join slow 🔧 Fix
- Fixing DuckDB Out of Memory on a Large Spatial Query duckdb out of memory 🔧 Fix
- Fixing a Geometry Column Lost on Export from DuckDB duckdb geometry lost export 🔧 Fix
Topics this path covers
A path is a route; a topic is everything the site has on a subject. Open a topic to see the guides this path skips.