{"repo":"jake-low/duckdb-osmium","free":true,"listed":false,"github":"https://github.com/jake-low/duckdb-osmium","clone":"git clone https://github.com/jake-low/duckdb-osmium.git","description":"DuckDB extension for reading OpenStreetMap PBF files using libosmium","language":"C++","stars":26,"topics":["duckdb","openstreetmap"],"license":"MIT","category":"data-pipelines","readme_excerpt":"duckdb-osmium An extension for duckdb that allows reading OpenStreetMap data in OSM XML and OSM PBF formats using libosmium. DuckDB's first-party spatial extension can also read OSM PBF files using the ST ReadOSM() function. However, this method returns rows in OSM's native data model (Nodes, Ways, and Relations). duckdb-osmium , in contrast, uses libosmium to reconstruct geometries for OSM elements and returns data including a geometry column containing Points, LineStrings, or Polygons/MultiPolygons. This extension supports predicate pushdown (so elements that don't match the WHERE clause won't be processed) and projection pushdown (so that if you don't SELECT the geometry column in your query, geometry construction is skipped internally). Installation Run this in a DuckDB shell to install the extension: This downloads the compiled extension from the DuckDB Community Extensions repository. Examples Get the OSM IDs, names, and Point geometries of all place=city nodes: Copy the OSM type, OSM ID, tags, and Polygon geometries of all building= areas to a GeoJSON file: Calculate the total length of roads, grouped by surface tag: Schema The following columns are available: - kind - the constructed type; one of node , line , area , or relation (see next section) - type - the original OSM type; one of node , way , or relation - id - the OSM ID (unique among elements of the same type; for a globally unique key you want (type, id) ) - tags - the element's tags, as a MAP(VARCHAR, VARCHA","default_branch":null,"files":null,"tree":[],"storefront":"/r/jake-low","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jake-low/duckdb-osmium/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}