# 使用 Homebrew 安装 osmfilter

查看 osmfilter 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:osmfilter
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install osmfilter
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:osmfilter
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/osmfilter>
- **版本:** 0.9
- **来源摘要:** Command-line tool to filter OpenStreetMap files for specific tags
- **主页:** <https://wiki.openstreetmap.org/wiki/Osmfilter>
- **上游文档:** <https://wiki.openstreetmap.org/wiki/Osmfilter>
- **许可证:** AGPL-3.0-only
- **源码归档:** <https://gitlab.com/osm-c-tools/osmctools.git>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- osmconvert (cli)
- osmfilter (cli)
- osmupdate (cli)
- osmconvert (别名)
- osmfilter (别名)
- osmupdate (别名)

## 构建依赖

- autoconf
- automake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.9
- 本地数据: OK
- 上游仓库: https://wiki.openstreetmap.org/wiki/Osmfilter
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

osmfilter is one of the small osmctools command-line programs for processing OpenStreetMap data. It filters OSM objects by tags, object type, boolean expressions, and metadata, and it can also strip or modify tags and emit tag statistics.

### 项目历史

The public project identity is tied to the osmctools family, whose GitLab project describes a set of simple C tools used in the OpenStreetMap project. The OpenStreetMap wiki positions osmfilter alongside osmconvert and osmupdate, with osmconvert recommended for preparing the fast .o5m input format that osmfilter prefers.

Compared with larger frameworks such as Osmosis or Osmium, osmfilter kept a deliberately narrow Unix-tool shape: a single-purpose executable that reads an OSM file, applies tag and object predicates, and writes a reduced dataset.

### 采用历史

The tool circulated through OpenStreetMap-oriented documentation and distribution packaging rather than through a large standalone project. The OpenStreetMap wiki lists Debian osmctools and macOS Homebrew installation paths, while Unix manpage packaging records Markus Weber as the author and documents osmfilter together with osmconvert and osmupdate.

### 使用方式

Developers and mappers use osmfilter when they need a quick extraction from a planet or regional extract: roads, waterways, bus-route relations, address-related tags, or statistics about keys and values. The examples in the wiki show its common workflow: convert a PBF/XML source to .o5m, run a keep/drop expression, and write XML or .o5m output for another OSM pipeline stage.

### 为什么软件包爱好者会关心

osmfilter is interesting because it represents the compact C-tool branch of the OSM ecosystem. It trades framework breadth for speed, scriptability, and a tiny deployment footprint, making it a useful contrast with Java Osmosis and C++ Osmium.

### Related projects

- osmconvert handles format conversion and often prepares .o5m input for osmfilter. osmupdate handles update workflows. Osmium and Osmosis cover overlapping OSM processing tasks with broader architectures.

### 来源

- <https://formulae.brew.sh/formula/osmfilter>
- <https://gitlab.com/osm-c-tools/osmctools>
- <https://manpages.ubuntu.com/manpages/bionic/man1/osmfilter.1.html>
- <https://wiki.openstreetmap.org/wiki/Osmfilter>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** osmfilter
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Database and data packages](https://pkg.so/zh-hans/database-data-tools/) - Matched database, SQL, migration, or data-store metadata.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [osmium-tool](https://pkg.so/zh-hans/brew/osmium-tool/) - Shares pkgdb curated category or tags: cli, data, geospatial, openstreetmap.
- [osmcoastline](https://pkg.so/zh-hans/brew/osmcoastline/) - Shares pkgdb curated category or tags: cli, data, geospatial, openstreetmap.
- [osmosis](https://pkg.so/zh-hans/brew/osmosis/) - Shares pkgdb curated category or tags: cli, data, geospatial, openstreetmap.
- [libgeotiff](https://pkg.so/zh-hans/brew/libgeotiff/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [postgis](https://pkg.so/zh-hans/brew/postgis/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [pdal](https://pkg.so/zh-hans/brew/pdal/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [pmtiles](https://pkg.so/zh-hans/brew/pmtiles/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [mapnik](https://pkg.so/zh-hans/brew/mapnik/) - Shares pkgdb curated category or tags: cli, data, geospatial.

## Combined YAML source

View the package source record on GitHub. [combined/osmfilter.yml](https://github.com/mxcl/pkgdb/blob/main/combined/osmfilter.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
