macOS
brew install osm2pgsqllocal Homebrew formula metadata
sudo port install osm2pgsqlMacPorts ports tree · gis/osm2pgsql/Portfile · 来源: api.github.com
安装
brew install osm2pgsqllocal Homebrew formula metadata
sudo port install osm2pgsqlMacPorts ports tree · gis/osm2pgsql/Portfile · 来源: api.github.com
sudo apt install osm2pgsqlDebian stable package indexes · osm2pgsql · 来源: deb.debian.org
sudo dnf install osm2pgsqlFedora Rawhide package metadata · osm2pgsql · 来源: dl.fedoraproject.org
nix profile install nixpkgs#osm2pgsqlnixpkgs package indexes · pkgs/by-name/os/osm2pgsql/package.nix · 来源: api.github.com
sudo pacman -S osm2pgsqlArch Linux sync databases · osm2pgsql · 来源: geo.mirror.pkgbuild.com
概览
OpenStreetMap data to PostgreSQL converter
历史
osm2pgsql is one of the central OpenStreetMap data-ingestion tools. It imports OSM data into PostgreSQL/PostGIS, where renderers, geocoders, analysis jobs, and custom SQL pipelines can work with planet-scale map data.
The osm2pgsql project began in 2006, started by Jon Burgess and written in C, making it nearly as old as OpenStreetMap itself. In 2007, after OSM moved to API 0.5 and added relations, osm2pgsql gained multipolygon relation support and multiple projection support.
In 2008, osm2pgsql added support for OSM change files. From 2009, the main OpenStreetMap map was regenerated from minutely changes using a toolchain that imported data with osm2pgsql into PostgreSQL/PostGIS and rendered tiles with Mapnik.
The project kept following OSM's growth. In 2011, it switched to 64-bit IDs as the OSM node count passed one billion, and Kai Krueger took over maintainership from Jon Burgess. In 2012, the flat-file persistent node cache for slim mode reduced disk usage and improved import/update performance.
A long modernization arc followed: parsing moved to libosmium in 2015, geometry generation moved to libosmium in 2017, LuaJIT support arrived in 2018, version 1.0 in 2019 removed old-style multipolygon processing, and the flex output introduced in 2020 made custom output-table design a first-class workflow.
The 2022 experimental `osm2pgsql-gen` command brought generalization into the project. In 2023, a JSONB-based middle database format made it possible to store all OSM data including tags, attributes, and relation-member information. In 2024, Nominatim switched to flex output, the old gazetteer output was removed, and osm2pgsql 2.0 shipped.
osm2pgsql became deeply embedded because it solved the hard practical problem of keeping PostgreSQL/PostGIS databases synchronized with OSM data at rendering scale. The project history explicitly ties it to the OpenStreetMap tile toolchain and to Nominatim, the geocoder powering search on openstreetmap.org and many other map sites.
The GitHub repository passed 1,000 stars in 2021 according to the project's own history page. The Homebrew formula and package-manager metadata show distribution through Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE-family packaging.
The manual describes osm2pgsql as a specialized ETL tool for OSM data. Users usually feed it regional extracts or planet files, tune memory and disk behavior, choose pgsql or flex output, and then connect downstream software for rendering, serving, geocoding, or analysis.
The manual also warns that whole-planet imports can run for hours or days and recommends trial runs on small extracts. That operational reality is part of osm2pgsql's identity: it is not just a converter, but a tool whose schema, cache, update, and style choices determine the shape and cost of an OSM database.
osm2pgsql is package-nerd gold because it sits at the junction of C++, libosmium, Lua/LuaJIT, PostgreSQL, PostGIS, and large public datasets. Small version changes can affect import speed, schema output, multipolygon behavior, replication workflows, and downstream projects such as Nominatim or map renderers.
Its history also mirrors the OpenStreetMap ecosystem's scaling story: from early XML imports, through minutely updates and 64-bit IDs, into flexible Lua-defined outputs and JSONB-backed middle storage.
安全态势
broad file, network, media, or database tool signal. generalized runtime or code generation signal.
yellow 风险 · 中 置信度 · runtime
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
osm2pgsql | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
osm2pgsql-expire | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
osm2pgsql-replication | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:osm2pgsql |
|---|---|
| 版本 | 2.3.1 |
| 软件包管理器 | Homebrew |
| 主页 | https://osm2pgsql.org |
| 仓库 | https://github.com/osm2pgsql-dev/osm2pgsql |
| 最后更新 | 2026-07-05T16:19:51Z |
| Pulse | updated |
| Bottle | 未记录 |
| 服务 | 未声明 |
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
osm2pgsql 2.1.1+ds-1
OpenStreetMap data to PostgreSQL converter
sudo apt install osm2pgsqlosm2pgsql
nix profile install nixpkgs#osm2pgsqlosm2pgsql 1.11.0+ds-1
OpenStreetMap data to PostgreSQL converter
sudo apt install osm2pgsqlosm2pgsql 2.3.1-2.fc45
Import map data from OpenStreetMap to a PostgreSQL database
sudo dnf install osm2pgsqlosm2pgsql 2.3.1-1
tool for loading OpenStreetMap data into a PostgreSQL / PostGIS database
sudo pacman -S osm2pgsqlosm2pgsql
sudo port install osm2pgsql来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.