A fast and flexible C++ library for working with OpenStreetMap data
The Osmium Library has extensive support for all types of OSM entities: nodes, ways, relations, and changesets. It allows reading from and writing to OSM files in XML and PBF formats, including change files and full history files. Osmium can store OSM data in memory and on disk in various formats and using various indexes. Its easy to use handler interface allows you to quickly write data filtering and conversion functions. Osmium can create WKT, WKB, OGR, GEOS and GeoJSON geometries for easy conversion into many GIS formats and it can assemble multipolygons from ways and relations.
The code is available from GitHub: github.com/osmcode/libosmium.
Current and past releases can be downloaded from GitHub.
The Osmium Library is available under the very liberal Boost Software License.
The "Old" Osmium
An old version of the Osmium library has been around for years, but it is now in maintainance mode, ie no new features will be added. You can find it at github.com/joto/osmium.