Read OpenStreetMap data from OSM XML and PBF files
Maintainer(s):
jake-low
Compatibility Matrix
This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 |
|---|---|---|---|---|---|
| Linux AMD64 | |||||
| Linux ARM64 | |||||
| macOS AMD64 | |||||
| macOS ARM64 | |||||
| Windows AMD64 | |||||
| Windows ARM64 | |||||
| WebAssembly |
Installing and Loading
INSTALL osmium FROM community;
LOAD osmium;
Example
LOAD osmium;
SELECT id, tags['name'] AS name, geometry
FROM 'example.osm.pbf'
WHERE kind = 'node' AND tags['place'] = 'city';
About osmium
The osmium extension adds support for reading OpenStreetMap data from OSM XML and PBF files via libosmium. It supports constructing Geometries (Point, LineString, Polygon, etc) from OSM elements, which makes it easy to transform OSM data into formats like GeoJSON and GeoParquet.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| osmium_read | table | NULL | NULL |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
| name | description | input_type | scope | aliases |
|---|---|---|---|---|
| osmium_index_path | File path for file-backed index types (e.g. dense_file_array) | VARCHAR | GLOBAL | [] |
| osmium_index_type | Node location index type (flex_mem, dense_file_array, dense_mem_array, sparse_mem_array, etc.) | VARCHAR | GLOBAL | [] |