Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Osmium Command Line Tool

A multipurpose command line tool for working with OpenStreetMap data based on the Osmium library.

Official web site:

Github Build Status Appveyor Build status


You need a C++14 compliant compiler.

You also need the following libraries:

Libosmium (>= 2.16.0)
    Debian/Ubuntu: libosmium2-dev
    Fedora/CentOS: libosmium-devel

Protozero (>= 1.6.3)
    Debian/Ubuntu: libprotozero-dev
    Fedora/CentOS: protozero-devel

RapidJSON (>= 1.1)
    This is included in the osmium-tool repository, so you usually do
    not need to install this.
    Debian/Ubuntu: rapidjson-dev

boost-program-options (>= 1.55)
    Debian/Ubuntu: libboost-program-options-dev
    Fedora/CentOS: boost-devel
    openSUSE: boost-devel (use 'libboost_program_options-devel' for modern OS versions)

    Debian/Ubuntu: libbz2-dev
    Fedora/CentOS: bzip2-devel
    openSUSE: libbz2-devel

    Debian/Ubuntu: zlib1g-dev
    Fedora/CentOS: zlib-devel
    openSUSE: zlib-devel

LZ4 (optional)
    Debian/Ubuntu: liblz4-dev

    Only needed for LZ4 PBF compression.

    Debian/Ubuntu: libexpat1-dev
    Fedora/CentOS: expat-devel
    openSUSE: libexpat-devel

    Debian/Ubuntu: cmake
    Fedora/CentOS: cmake
    openSUSE: cmake

    (Needed to build documentation, optional)
    Debian/Ubuntu: pandoc
    Fedora/CentOS: pandoc
    openSUSE: pandoc

On Linux systems most of these libraries are available through your package manager, see the list above for the names of the packages. But make sure to check the versions. If the packaged version available is not new enough, you'll have to install from source. Most likely this is the case for Protozero and Libosmium.

On macOS many of the libraries above will be available through Homebrew.

When building the tool, CMake will automatically look for these libraries in the usual places on your system. In addition it will look for the Libosmium and Protozero libraries in the same directory where this Osmium repository is. So if you are building from the Git repository and want to use the newest Libosmium, Protozero, and Osmium, clone all of them into the same directory:

mkdir work
cd work
git clone
git clone
git clone


Osmium uses CMake for its builds. On Linux and macOS you can build as follows:

cd osmium-tool
mkdir build
cd build
cmake ..
ccmake .  ## optional: change CMake settings if needed

To set the build type call cmake with -DCMAKE_BUILD_TYPE=type. Possible values are empty, Debug, Release, RelWithDebInfo, MinSizeRel, and Dev. The default is RelWithDebInfo.

Please read the CMake documentation and get familiar with the cmake and ccmake tools which have many more options.

On Windows you can compile with the Visual Studio C++ compiler and nmake. The necessary dependencies can be installed with conda. See appveyor.yml for the necessary commands to compile osmium-tool.


See the Osmium Tool website and Osmium Tool Manual.

There are man pages in the 'man' directory. To build them you need 'pandoc'. If the pandoc command was found during the CMake config step, the manpages will be built automatically.


Call ctest in the build directory to run the tests after build.

More extensive tests of the libosmium I/O system can also be run. See test/io/ for instructions.


Copyright (C) 2013-2022 Jochen Topf (

This program is available under the GNU GENERAL PUBLIC LICENSE Version 3. See the file LICENSE.txt for the complete text of the license.


This program was written and is maintained by Jochen Topf (