Pbfhogg
| pbfhogg | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| License: | MIT or Apache-2.0 | |||||||||||||||||||
| Status: | Active | |||||||||||||||||||
| Language: | rust
| |||||||||||||||||||
| Website: | https://github.com/folknor/pbfhogg | |||||||||||||||||||
|
Fast reader, writer and transformer for OpenStreetMap PBF files, as a Rust library and CLI | ||||||||||||||||||||
| ||||||||||||||||||||
pbfhogg is a Rust library and command-line tool for reading, writing and transforming PBF files. It provides sequential, parallel and pipelined decoding, a writer with configurable compression (none, zlib, zstd), and a set of CLI commands that overlap with Osmium's use cases.
Every CLI command is designed to run over the full Planet.osm on a 32 GB machine with bounded memory. The CLI is cross-validated against osmium.
Features
- Read .osm.pbf files sequentially, in parallel, or via a three-stage pipelined decoder
- Write valid .osm.pbf files with dense node packing, delta encoding and configurable compression
- Blob-level indexdata (element type, ID range and spatial bounding box in the BlobHeader) for classifying blobs without decompression
- Per-blob tag-key index for skipping blobs that lack required tags
- Optional O_DIRECT I/O and io_uring writes on Linux
Commands
Get information about a file (inspect), convert and re-encode (cat, repack, sort, renumber), merge and apply OsmChange files (apply-changes, merge-changes), extract a geographical area (extract), extract by keys or tags (tags-filter, getid, getparents), extract from history files for a point in time (time-filter), diff two files (diff), embed node coordinates in ways (add-locations-to-ways), and build a reverse geocoding index (build-geocode-index).