2017-08-30 05:30:27 -04:00
|
|
|
# Libosmium
|
|
|
|
|
2020-11-17 16:59:06 -05:00
|
|
|
https://osmcode.org/libosmium
|
2017-08-30 05:30:27 -04:00
|
|
|
|
|
|
|
A fast and flexible C++ library for working with OpenStreetMap data.
|
|
|
|
|
2022-08-16 13:26:21 -04:00
|
|
|
Libosmium works on Linux, macOS and Windows.
|
2017-08-30 05:30:27 -04:00
|
|
|
|
2022-08-16 13:26:21 -04:00
|
|
|
[](https://github.com/osmcode/libosmium/actions)
|
2018-04-19 15:03:25 -04:00
|
|
|
[](https://repology.org/metapackage/libosmium)
|
2017-08-30 05:30:27 -04:00
|
|
|
|
2020-11-17 16:59:06 -05:00
|
|
|
Please see the [Libosmium manual](https://osmcode.org/libosmium/manual.html)
|
2017-08-30 05:30:27 -04:00
|
|
|
for more details than this README can provide.
|
|
|
|
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
2024-09-28 14:35:05 -04:00
|
|
|
You need a C++11 compiler and standard C++ library. Osmium needs at least GCC
|
|
|
|
4.8 or clang (LLVM) 3.4. (Some parts may work with older versions.)
|
2017-08-30 05:30:27 -04:00
|
|
|
|
|
|
|
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
|
2020-11-17 16:59:06 -05:00
|
|
|
dependencies](https://osmcode.org/libosmium/manual.html#dependencies) in the
|
2017-08-30 05:30:27 -04:00
|
|
|
manual.
|
|
|
|
|
|
|
|
The following external (header-only) libraries are included in the libosmium
|
|
|
|
repository:
|
|
|
|
* [gdalcpp](https://github.com/joto/gdalcpp)
|
|
|
|
|
2018-04-19 15:03:25 -04:00
|
|
|
Note that [protozero](https://github.com/mapbox/protozero) was included in
|
|
|
|
earlier versions of libosmium, but isn't any more.
|
|
|
|
|
2017-08-30 05:30:27 -04:00
|
|
|
|
|
|
|
## Directories
|
|
|
|
|
|
|
|
* 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).
|
|
|
|
|
|
|
|
|
|
|
|
## Building
|
|
|
|
|
|
|
|
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 ..
|
|
|
|
make
|
|
|
|
|
|
|
|
This will build the examples and tests. Call `ctest` to run the tests.
|
|
|
|
|
2020-11-17 16:59:06 -05:00
|
|
|
For more details see the
|
|
|
|
[Building Libosmium](https://osmcode.org/libosmium/manual.html#building-libosmium)
|
2017-08-30 05:30:27 -04:00
|
|
|
chapter in the manual.
|
|
|
|
|
|
|
|
|
|
|
|
## Testing
|
|
|
|
|
2018-04-19 15:03:25 -04:00
|
|
|
To download the `osm-testdata` submodule call:
|
|
|
|
|
|
|
|
```
|
|
|
|
git submodule update --init
|
|
|
|
```
|
|
|
|
|
|
|
|
This will enable additional tests.
|
|
|
|
|
2017-08-30 05:30:27 -04:00
|
|
|
See the
|
2020-11-17 16:59:06 -05:00
|
|
|
[Libosmium Manual](https://osmcode.org/libosmium/manual.html#running-tests)
|
2017-08-30 05:30:27 -04:00
|
|
|
for instructions.
|
|
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
2022-08-16 13:26:21 -04:00
|
|
|
Libosmium is available under the Boost Software License. See LICENSE.
|
2017-08-30 05:30:27 -04:00
|
|
|
|
|
|
|
|
|
|
|
## Authors
|
|
|
|
|
|
|
|
Libosmium was mainly written and is maintained by Jochen Topf
|
|
|
|
(jochen@topf.org). See the git commit log for other authors.
|
|
|
|
|