// the find
osmcode/osmium-tool
Command line tool for working with OpenStreetMap data based on the Osmium library.
osmium-tool is the Swiss Army knife for OpenStreetMap data processing — filter, merge, extract, diff, export, and convert between OSM formats from the command line. It's built on libosmium and handles everything from planet-scale PBF files down to small city extracts. The target audience is anyone doing serious OSM data work: GIS engineers, map tile pipeline operators, researchers building on OSM data.
The command coverage is genuinely broad and well-thought-out: extract by polygon with three different completeness strategies (simple, complete-ways, smart), change set operations, and export to GeoJSON/PostgreSQL COPY format all in one binary. The export command's tag filtering via JSON config is particularly useful for turning raw OSM tag chaos into clean GeoJSON without a separate processing step. CI is properly set up across Linux, macOS, and Windows with clang-tidy in a separate workflow — the code quality bar is higher than most GIS tools. Man pages are first-class: one per subcommand, maintained in the repo, built automatically if pandoc is present.
The build dependency chain is genuinely annoying — you need libosmium, protozero, nlohmann-json, boost-program-options, expat, bz2, zlib, and optionally LZ4, and the packaged versions on many distros are too old, so you end up cloning multiple repos. No prebuilt binaries in releases, which means anyone not on a major Linux distro has real friction to just try it. The extract strategies documentation is thin on when to pick 'smart' vs 'complete-ways' — the difference matters for referential integrity of the output and you have to dig into the manual to understand the tradeoff. At 683 stars it's clearly a niche tool, which means Stack Overflow answers are sparse and you're mostly on the manual and the OSM wiki.