# 使用 Homebrew 安装 osmfilter

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install osmfilter
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:osmfilter
- **软件包管理器:** Homebrew
- **版本:** 0.9
- **来源摘要:** Command-line tool to filter OpenStreetMap files for specific tags
- **主页:** <https://wiki.openstreetmap.org/wiki/Osmfilter>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.9
## 项目历史与用法

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


## 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
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
