← Back to all sparks
L

libosmium

DEVOPS
Velocity0.0

Fast C++ library for working with OpenStreetMap data

libosmium is a stable OSM parsing library whose main work now is shedding old dependencies

openstreetmapcpp-librarypbf-parsingdependency-removalmaintenance-cadencegeospatial
Current state
libosmium ships roughly once or twice a year and the release notes read accordingly: a handful of additions, a longer list of fixes, and a steady drumbeat of code cleanups. Recent cycles have been dominated by removing things — Google Sparsehash, the ancient Proj projection support, regex filters, and a series of long-deprecated classes. The library's core job of reading and writing OSM data has been stable long enough that most fixes now cluster around compression edge cases and PBF parsing tolerance.
Where it's heading
The direction is consolidation rather than expansion. C++14 became the floor in 2.21.0, CMake 3.10 in 2.23.0, and each release trims another external dependency or workaround for an obsolete compiler. What new surface does appear is narrow and pragmatic: one spare bit in a Location, a TagList comparison, a UTF-8 validity helper — small affordances for downstream tools like osmium-tool and osm2pgsql rather than new capability. The 2.23.1 revert is a useful signal that the maintainers treat diff and extract-update correctness as the property they will not trade for tidier ordering.
Prediction
Expect the deprecation-removal pattern to continue, with RapidJSON support the most likely next casualty given it was marked deprecated back in 2.19.0. Nothing in the entries suggests a change in scope; the next release will most plausibly be another small additions-plus-fixes cycle.

Recent moves

  1. 4mo ago

    libosmium 2.23.1 reverts an object-ordering change that broke extracts

    The notable item is a revert: ordering deleted objects after visible ones, introduced in 2.21.0 to fix diff merging, turned out to break updating of extracts. Alongside it, a UTF-8 validity helper and optional history-file support in CheckOrder — small additions aimed at the tools built on top of this library.

    View source ↗
  2. 6mo ago

    libosmium 2.23.0 fixes PBF and bzip2 edge cases, raises CMake floor

    The largest fix list in recent memory, covering concatenated bzip2 streams, single-varint tag encoding in PBFs, memory corruption in ChangesetDiscussionBuilder, and binary-mode PBF reads from stdin. Two small additions — a spare bit in Location and TagList comparison — are the kind of narrow affordance downstream tools ask for.

    View source ↗
  3. 1y ago

    libosmium 2.22.0 handles 64-bit relation IDs, drops regex filters

    RelationsMapIndex now handles 64-bit IDs, which the notes are careful to say changes nothing for real OSM data and exists for users injecting their own relations. The deprecated regex filter header is removed, continuing the dependency-and-deadwood trimming that defines this era of the library.

    View source ↗
  4. 1y ago

    libosmium 2.21.0 requires C++14, drops Sparsehash and Proj

    The clearest consolidation release in the window: C++14 becomes the minimum, and both Google Sparsehash and the long-broken Proj projection support are removed. The deleted-object ordering change shipped here to fix diff merging across extracts, and was reverted in 2.23.1 once it proved to break extract updates.

    View source ↗
  5. 2y ago

    libosmium 2.20.0 accepts fractional-second timestamps

    A small release: optional fractional seconds in OSM timestamps, posix_fadvise on FreeBSD, and slightly more forgiving PBF parsing. Nothing here changes how the library is used.

    View source ↗
  6. 3y ago

    libosmium 2.19.0 removes BoolVector and NWRIdSet, deprecates RapidJSON

    Three deprecated pieces of API come out and RapidJSON support is marked for eventual removal — the start of the trimming pattern that 2.21.0 and 2.22.0 continue. Downstream users of the removed classes need to act; everyone else sees a smaller library.

    View source ↗