# osm2pgsql-dev/osm2pgsql

Import OpenStreetMap data into a PostgreSQL/PostGIS database

Repository: https://github.com/osm2pgsql-dev/osm2pgsql
Canonical: https://ross.abutalabs.com/products/osm2pgsql
Homepage: https://osm2pgsql.org
Language: C++
License: GPL-2.0
License Family: copyleft
Topics: postgis, nominatim, osm2pgsql, openstreetmap, postgresql
Last push: 2026-07-24T16:09:16+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 68, longevity 100
- inputs: {"age_days": 5968, "days_push": 40, "days_rel": 59, "gap_med": 99.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1680, forks 481 (observed 2026-08-28T04:05:21.462784+00:00)

## What it is
osm2pgsql is a command-line ETL tool that imports OpenStreetMap data in OSM, PBF, and O5M formats into a PostgreSQL/PostGIS database. It supports flexible Lua-configured table layouts, incremental updates from change files and replication diffs, and scales from small extracts to full planet imports.

## Use cases
- import openstreetmap data into postgresql
- load osm pbf files into postgis
- set up a database for rendering map tiles
- keep an osm database up to date with replication diffs
- run a nominatim geocoder backend
- do geospatial analysis on osm data with postgis
- create a poi map from openstreetmap data
- export osm data to gis formats

## When to choose
- you need OSM data in PostgreSQL/PostGIS for rendering, geocoding, or analysis
- you want configurable table layouts via Lua scripting
- you need incremental updates from OSM change files
- you need to scale from a city extract to a full planet import

## When to avoid
- you need a general-purpose ETL tool for non-OSM data
- you want a GUI-based import tool
- your target database is not PostgreSQL/PostGIS
- you only need to view OSM data without a database

## Facets
- artifact type: cli-tool
- maturity: stable
- function: etl, database, geospatial
- domain: databases, developer-tools
- platform: windows, cli, cross-platform
- tags: openstreetmap, postgis, postgresql, osm-pbf, map-rendering, nominatim, geocoding, data-import, replication, geospatial, maps, linux, macos

## Member repositories
- osm2pgsql-dev/osm2pgsql (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:21.462784+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:41:28.807847+00:00, confidence not recorded.
  - readme: https://github.com/osm2pgsql-dev/osm2pgsql (fetched 2026-08-28T04:05:21.462784+00:00, sha b79455408e64)
  - homepage: https://osm2pgsql.org (fetched 2026-08-29T11:14:49.371874+00:00, sha 3d59cda4d41b)
  - site_page: https://osm2pgsql.org/about (fetched 2026-08-29T11:14:49.381404+00:00, sha a01820560284)
  - site_page: https://osm2pgsql.org/about/features (fetched 2026-08-29T11:14:49.383421+00:00, sha df1d77360391)
  - site_page: https://osm2pgsql.org/about/history (fetched 2026-08-29T11:14:49.386244+00:00, sha 188a663940c0)
  - site_page: https://osm2pgsql.org/about/users (fetched 2026-08-29T11:14:49.388877+00:00, sha 0cfcccb24e12)
  - site_page: https://osm2pgsql.org/about/road-map.html (fetched 2026-08-29T11:14:49.391142+00:00, sha 68eeeea40266)
  - site_page: https://osm2pgsql.org/doc/install.html (fetched 2026-08-29T11:14:49.394754+00:00, sha bdaad262318e)
  - site_page: https://osm2pgsql.org/doc (fetched 2026-08-29T11:14:49.393120+00:00, sha 7ea199f69b7b)
  - site_page: https://osm2pgsql.org/doc/faq.html (fetched 2026-08-29T11:14:49.396181+00:00, sha 03a6d5e1796a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
