Fast and flexible C++ library for working with OpenStreetMap data.
C++ CMake Other
Clone or download
Failed to load latest commit information.
benchmarks Resolve some clang-tidy reports. Jul 9, 2018
cmake Make sure -stdlib=libc++ is only set on Mac when compiling with Clang May 7, 2018
doc Use https URL for Jun 14, 2018
examples Resolve some clang-tidy reports. Jul 9, 2018
include Do a static_cast to avoid compiler warnings. Jul 17, 2018
test Move test case SECTIONs into their own TEST_CASEs. Jul 16, 2018
.clang-tidy Disable the last clang-tidy warning we are seeing. Jul 10, 2018
.codecov.yml Generate coverage reports with May 4, 2017
.gitignore Ignore _build* directories Jul 13, 2017
.gitmodules Add submodule with osm-testdata repository. Mar 1, 2018
.travis.yml Travis: build with clang 6.0, remove clang 4.0 Apr 11, 2018 Use https links where possible. Jun 14, 2018 Add support for using the CRC32 implementation from the zlib library. Jul 9, 2018
CMakeLists.txt Correct way to disable clang-diagnostic warning in clang-tidy. Jul 9, 2018 Add instructions for bug reporting. Jan 29, 2018
EXTERNAL_LICENSES.txt Remove protozero from repository. Dec 19, 2017
LICENSE Rename license file so that Github finds it. Nov 3, 2017 Update some URLs. Use https where possible. Mar 7, 2018 Use https URL for Jun 14, 2018
appveyor.yml Fix the problem with "git submodule" in appveyor. Mar 15, 2018
build-appveyor.bat Check out submodule in appveyor builds. Mar 14, 2018
build-local.bat Change appveyor scripts to work without deprecated prebuilt libs. Feb 7, 2018
build-msys2.bat Check out submodule in appveyor builds. Mar 14, 2018
osmium.imp Mark dummy includes for IWYU. Aug 28, 2017


A fast and flexible C++ library for working with OpenStreetMap data.

Libosmium works on Linux, Mac OSX and Windows.

Travis Build Status Appveyor Build Status Coverage Status Packaging status

Please see the Libosmium manual for more details than this README can provide.


Because Libosmium uses many C++11 features you need a modern compiler and standard C++ library. Osmium needs at least GCC 4.8 or clang (LLVM) 3.4. (Some parts may work with older versions.)

Different parts of Libosmium (and the applications built on top of it) need different libraries. You DO NOT NEED to install all of them, just install those you need for your programs.

For details see the list of dependencies in the manual.

The following external (header-only) libraries are included in the libosmium repository:

Note that protozero was included in earlier versions of libosmium, but isn't any more.


  • benchmarks: Some benchmarks checking different parts of Libosmium.

  • cmake: CMake configuration scripts.

  • doc: Config for API reference documentation.

  • examples: Osmium example applications.

  • include: C/C++ include files. All of Libosmium is in those header files which are needed for building Osmium applications.

  • test: Tests (see below).


Osmium is a header-only library, so there is nothing to build for the library itself.

But there are some tests and examples that can be build. Libosmium uses cmake:

mkdir build
cd build
cmake ..

This will build the examples and tests. Call ctest to run the tests.

For more detals see the Building Libosmium chapter in the manual.


To download the osm-testdata submodule call:

git submodule update --init

This will enable additional tests.

See the Libosmium Manual for instructions.

Switching from the old Osmium

If you have been using the old version of Osmium at you might want to read about the changes needed.


Libosmium is available under the Boost Software License. See LICENSE.txt.


Libosmium was mainly written and is maintained by Jochen Topf ( See the git commit log for other authors.