DuckDB 🪵

DuckDB Spatial Database

Open Beta
.duckdb · application/vnd.duckdb

DuckDB is an embedded analytical database its CWI Amsterdam authors call "SQLite for analytics": a single `.duckdb` file, columnar storage, a vectorized engine, and the `ST_*` spatial function set via the spatial extension. Our exporter writes the selected OSM area into a `.duckdb` container where each map layer becomes its own table. To set expectations honestly: geometry is stored as WKT TEXT in a `geom_wkt` column rather than a native GEOMETRY type — to get real geometry you simply call `ST_GeomFromText(geom_wkt)` after `LOAD spatial`. Coordinates stay in WGS84 (EPSG:4326); spatial indexes and Hilbert sorting are not created — those are left to you.

Export DuckDB now ✨ Open Beta — free, no limits

Key Features

Single `.duckdb` file — one table per map layer (polygons, lines, points, roads)
Geometry in a `geom_wkt` (WKT) column, read via `ST_GeomFromText` after `LOAD spatial`
OSM attributes preserved as separate columns; export metadata in a `_metadata` table
Coordinates in WGS84 (EPSG:4326), up to 500,000 features per layer
Opens via the `duckdb file.duckdb` CLI or `import duckdb` in Python/R

What Program Opens DuckDB Files

The following programs and applications can open, edit, and work with DuckDB Spatial Database (.duckdb) files exported from OSM2CDR:

💻DuckDB CLI 💻Python (pip install duckdb) 📐R (install.packages duckdb) 💻DBeaver 💻JupyterLab

Format specifications

Who Uses DuckDB Maps

🏗
Ad-hoc spatial analytics in Jupyter without spinning up a PostgreSQL/PostGIS server
💻
ETL pipelines: read, join and aggregate OSM data in plain SQL with zero infrastructure
📊
dbt models and notebook-driven workflows where `.duckdb` is a portable team artifact
🎨
Prototyping queries before migrating to Snowflake/BigQuery

How to Export DuckDB

1
Select area
Draw a rectangle or polygon on the interactive map at osm2cdr
2
Choose DuckDB
Select DuckDB Spatial Database from the list of 127 available export formats
3
Export
Click Export and receive your .duckdb file in 1-5 minutes
4
Download
Download the ready DuckDB file and open it in DuckDB CLI

Popular maps in DuckDB

Free

Get DuckDB Spatial Database map exports

Download professional DuckDB maps from OpenStreetMap. Instant generation, any area.

Free / export
Export DuckDB now →

Frequently Asked Questions

Is geometry stored as a native GEOMETRY type?
How does DuckDB differ from SQLite/GeoPackage?
Are spatial indexes created?
What projection is the data in?

Related Formats

Related Articles