Command line tool for working with OpenStreetMap data based on the Osmium library.
C++ CMake C Makefile Batchfile Shell Python
Latest commit 234b1cb Feb 15, 2017 @joto joto Add -pthread compiler and linker options.
This should fix a problem where some linker versions will not link
binaries correctly when the --as-needed option is used.
Permalink
Failed to load latest commit information.
cmake Add -pthread compiler and linker options. Feb 15, 2017
extract-example-config Autodetect polygon file types from file name suffix. Jan 16, 2017
include/rapidjson Update rapidjson to version 1.1.0. Sep 6, 2016
man Consistently use --with-history/-H option. Feb 8, 2017
scripts Add script that converts a config file from osm-history-splitter format. Jan 15, 2017
src Add -pthread compiler and linker options. Feb 15, 2017
test Add -pthread compiler and linker options. Feb 15, 2017
zsh_completion Fix zsh command line completion for some commands. Feb 8, 2017
.gitattributes Do not allow git to change line endings for test files Oct 9, 2015
.gitignore fix windows builds Sep 12, 2016
.travis.yml Update travis config: Also build with GCC 6 and XCode 8. Nov 20, 2016
.ycm_extra_conf.py Add include directories to YCM config. Aug 25, 2016
CHANGELOG.md Release v1.5.1 Jan 19, 2017
CMakeLists.txt Remove compile option setting Windows version. Feb 15, 2017
CONTRIBUTING.md Add CONTRIBUTING.md. Aug 8, 2016
LICENSE-rapidjson.txt Remove license thats not applicable from LICENSE-rapidjson.txt. Jul 8, 2015
LICENSE.txt First commit Nov 27, 2013
Makefile Improved README. Feb 7, 2016
README.md Update libosmium version required in README. Jan 18, 2017
appveyor.yml Windows: Use newer CMaker, force CMAKE_CONFIGURATION_TYPES, determine… Sep 13, 2016
build-appveyor.bat Windows: Use newer CMaker, force CMAKE_CONFIGURATION_TYPES, determine… Sep 13, 2016
build-local.bat Windows: Use newer CMaker, force CMAKE_CONFIGURATION_TYPES, determine… Sep 13, 2016
fix-formatting.sh Remove 'format' target, use fix-formatting.sh script instead. Mar 31, 2015
iwyu.imp More fiddling with include files. Sep 7, 2016
osmium-wrapper.in Fix wrapper script so it works with quoted arguments. Sep 10, 2016

README.md

Osmium Command Line Tool

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

Official web site: http://osmcode.org/osmium-tool/

Build Status Build Status

Prerequisites

You need a C++11 compliant compiler. GCC 4.8 and later as well as clang 3.6 and later are known to work. It also works on modern Visual Studio C++ compilers.

You also need the following libraries:

Libosmium (>= 2.11.0)
    http://osmcode.org/libosmium
    Debian/Ubuntu: libosmium2-dev

Protozero (>= 1.4.5)
    This is included in the libosmium repository and might or might not
    have been installed with it. See the libosmium README.
    https://github.com/mapbox/protozero
    Debian/Ubuntu: protozero
    Fedora: protozero-devel

Utfcpp
    This is included in the libosmium repository and might or might not
    have been installed with it. See the libosmium README.
    http://utfcpp.sourceforge.net/
    Debian/Ubuntu: libutfcpp-dev
    openSUSE: utfcpp
    Fedora: utf8cpp-devel

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

boost-program-options (>= 1.55)
    http://www.boost.org/doc/libs/1_55_0/doc/html/program_options.html
    Debian/Ubuntu: libboost-program-options-dev

boost-crc
    http://www.boost.org/doc/libs/1_55_0/libs/crc/
    Debian/Ubuntu: libboost-dev

bz2lib
    http://www.bzip.org/
    Debian/Ubuntu: libbz2-dev
    Fedora: bzip2-devel
    CentOS: bzip2-devel

zlib
    http://www.zlib.net/
    Debian/Ubuntu: zlib1g-dev
    openSUSE: zlib-devel
    Fedora: zlib-devel
    CentOS: zlib-devel

Expat
    http://expat.sourceforge.net/
    Debian/Ubuntu: libexpat1-dev
    openSUSE: libexpat-devel
    Fedora: expat-devel
    CentOS: expat-devel

cmake
    http://www.cmake.org/
    Debian/Ubuntu: cmake
    openSUSE: cmake
    Fedora: cmake

Pandoc
    (Needed to build documentation, optional)
    http://johnmacfarlane.net/pandoc/
    Debian/Ubuntu: pandoc
    openSUSE: pandoc
    Fedora: pandoc

Building

Osmium uses CMake for its builds. For Unix/Linux systems a simple Makefile wrapper is provided to make the build even easier. Just type make to compile. Results will be in the build directory.

Or you can go the long route explicitly calling CMake as follows:

mkdir build
cd build
cmake ..
make

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.

Documentation

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.

Tests

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/Makefile.in for instructions.

License

Copyright (C) 2013-2017 Jochen Topf (jochen@topf.org)

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

Authors

This program was written and is maintained by Jochen Topf (jochen@topf.org).