Python bindings for libosmium, the data processing library for OSM data, with numpy interface
Project description
# npyosmium
Fork of [pyosmium](https://github.com/osmcode/pyosmium), including (only one for the time being) efficient numpy interface.
# pyosmium
Provides Python bindings for the [Libosmium](https://github.com/osmcode/libosmium) C++ library, a library for working with OpenStreetMap data in a fast and flexible manner.
[![Github Actions Build Status](https://github.com/agrenott/npyosmium/workflows/CI/badge.svg)](https://github.com/agrenott/nyosmium/actions?query=workflow%3ACI) [![PyPI version](https://badge.fury.io/py/npyosmium.svg)](https://badge.fury.io/py/npyosmium)
## Installation
npyosmium works with Python >= 3.8. Pypy is known to not work.
### Using Pip
The recommended way to install npyosmium is via pip:
pip install npyosmium
We provide binary wheels for Linux and Windows 64 for all actively maintained Python versions.
For other versions, a source wheel is provided. Make sure to install all external dependencies first. On Debian/Ubuntu-like systems, the following command installs all required packages:
- sudo apt-get install build-essential cmake libboost-dev
libexpat1-dev zlib1g-dev libbz2-dev
### Installing from source
#### Prerequisites
npyosmium has the following dependencies:
[libosmium](https://github.com/osmcode/libosmium) >= 2.16.0
[protozero](https://github.com/mapbox/protozero)
[cmake](https://cmake.org/)
[Pybind11](https://github.com/pybind/pybind11) >= 2.2
[expat](https://libexpat.github.io/)
[libz](https://www.zlib.net/)
[libbz2](https://www.sourceware.org/bzip2/)
[Boost](https://www.boost.org/) variant and iterator >= 1.41
[Python Requests](https://docs.python-requests.org/en/master/)
Python setuptools
a recent C++ compiler (Clang 3.4+, GCC 4.8+)
### Compiling from Source
Get the latest versions of libosmium, protozero and pybind11. It is recommended that you put them in a subdirectory contrib. You can also set custom locations with LIBOSMIUM_PREFIX, PROTOZERO_PREFIX and PYBIND11_PREFIX respectively.
` git clone --quiet --depth 1 https://github.com/osmcode/libosmium.git contrib/libosmium git clone --quiet --depth 1 https://github.com/mapbox/protozero.git contrib/protozero git clone --quiet https://github.com/pybind/pybind11.git contrib/pybind11 `
To use a custom boost installation, set BOOST_PREFIX.
To compile the bindings during development, you can use [build](https://pypa-build.readthedocs.io/en/stable/). On Debian/Ubuntu-like systems, install python3-build, then run:
python3 -m build -w
To compile and install the bindings, run
pip install [–user] .
## Examples
The example directory contains small examples on how to use the library. They are mostly ports of the examples in Libosmium and osmium-contrib.
## Testing
There is a small test suite in the test directory. This provides regression test for the python bindings, it is not meant to be a test suite for Libosmium.
You’ll need the Python pytest module. On Debian/Ubuntu install the package python3-pytest.
The suite can be run with:
pytest test
## Documentation
To build the documentation you need [Sphinx](http://sphinx-doc.org/) and the [autoprogram extension](https://pythonhosted.org/sphinxcontrib-autoprogram/) On Debian/Ubuntu install python-sphinx sphinxcontrib-autoprogram or python3-sphinx python3-sphinxcontrib.autoprogram.
First compile the bindings as described above and then run:
cd doc make html
For building the man pages for the tools run:
cd doc make man
## Bugs and Questions
If you find bugs or have feature requests, please report those in the [github issue tracker](https://github.com/agrenott/npyosmium/issues/).
For general questions about using pyosmium you can use the [OSM development mailing list](https://lists.openstreetmap.org/listinfo/dev) or ask on [OSM help](https://help.openstreetmap.org/).
## License
npyosmium is available under the BSD 2-Clause License. See LICENSE.TXT.
## Authors
Sarah Hoffmann (lonvia@denofr.de), Aurélien Grenotton (agrenott@gmail.com)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for npyosmium-3.6.3-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ce7955972947056b575fb3a43a0bf817c041234d78078217943b3e2fd15cfb9 |
|
MD5 | 15bd8d2ad4dad722e74feb5cb8030678 |
|
BLAKE2b-256 | 626f8cf04dd5a19ecf78cdd3857a421dffd9628d7c20ba098ab5dfe754218563 |
Hashes for npyosmium-3.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68c99ae95045a2b815d7a022b8b4d13d90cdb05042c3d3cca4cb4ef4e21914c8 |
|
MD5 | a584d91edbec4819f68893eb3521113f |
|
BLAKE2b-256 | 5ffdb6a3ba7eb8eefa0a7764be1bfc5e4239d93e89adca981f4a78abff164efc |
Hashes for npyosmium-3.6.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb3335371354c74f3ab9b270b836562bdaf5d272bea705bb5245e9038843bd5b |
|
MD5 | 4fe03e2b88a1de17229ed8f7dc0cb533 |
|
BLAKE2b-256 | a7751cc7d32a586c0b8c68c94f7b165e5c03471428b44794305ba1669ce37fb7 |
Hashes for npyosmium-3.6.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcded638e33bdc6efaf2a58bad0309742147c26308b9cf16ddb37d6882ccd79b |
|
MD5 | f150b6f1f8176962f20b88cd4a008b1a |
|
BLAKE2b-256 | 0a17f7063c6d26d7c3c44e118b1cc7a8eb2547e2a2e68f7ff0e3573ed3238e5f |
Hashes for npyosmium-3.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a2284aeb682a901f01d71c2f14566b197d5c99bc4d73e21855bc40a5033acfc |
|
MD5 | a102f3c8f956737573e889ae3ad06d02 |
|
BLAKE2b-256 | 8bfec68c79e6a6e651e57c985ab60a02f6b865ab9097ff98365306003164cae5 |
Hashes for npyosmium-3.6.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ddf59bc9141a37f1a818430b9d9f09dd510222b1aa5dd1b6e53a02807be3b5a |
|
MD5 | 789e5661add32c109727537d33c2a6eb |
|
BLAKE2b-256 | 828f1d98f13c074a63763f84bc9f2f7c9347f9d32ceba200cc1643054747a005 |
Hashes for npyosmium-3.6.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a632e25bc4571d7ce57fc07cb9dac8c99120af3e1e028f9c8bf8d05c4bcc21ca |
|
MD5 | b4de45326cdb65d21e4befbc9efbdc2b |
|
BLAKE2b-256 | 2dc39e47ce4e25cee0f32cddb7f920d6335a628f813e48d6973804b708be79fb |
Hashes for npyosmium-3.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0144eef18dca449a4d43970b8b73d8a18e4c86fff47916f668c9f754777db132 |
|
MD5 | 36bfd13a5198cea26d92be98b51cc682 |
|
BLAKE2b-256 | d7c11cf0419ecbe332981bc1d0bd93628ee67ddb95e2dd00bb8f9f09e8c50d63 |
Hashes for npyosmium-3.6.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df7a80e8935c2730ca8c568164cb73330df889813b0713b1317bf0fa35cb1421 |
|
MD5 | 2163854aaea0bcc65a0d2d930e1cfdc3 |
|
BLAKE2b-256 | 94f36350516407d74f12f9b1c8aba1e71eb1fb1815e5eff3c8db953641a204ec |
Hashes for npyosmium-3.6.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffb3d41a2f1dab48420ef6b63a4b5520f321e5b51751069c05b87b5b2184fe86 |
|
MD5 | 237a34a03b535f50b9241731dc48f100 |
|
BLAKE2b-256 | 567a6d5979e995896d2bdc3818d6d18f35c9756d35e5a865b349ad438561e51c |
Hashes for npyosmium-3.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f7855cd80b9181edc2fc16ad80b8e92da2ffc3ba6178a2cf90e1e630f066c0c |
|
MD5 | 2116024f23d2784920a38fd8e9469907 |
|
BLAKE2b-256 | 5fcfcc66f749c321d984356323e70f2ca075d58a1d81d1d98124ec3798e4f201 |
Hashes for npyosmium-3.6.3-cp39-cp39-macosx_14_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acb9102a155305bd93bf85371f77cfb080eae543435fcb935408687fc8249d8b |
|
MD5 | b8e7d9ac326a4d2b6319c3bf6b064430 |
|
BLAKE2b-256 | 23efbe1e284b002931d2be81d18b336e3a215ffa5756d2e585c66cf405bd2805 |
Hashes for npyosmium-3.6.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0e8a3f250fa57925b54bf3fba322e87ea4a5d6e2b695306bfce632c2d4064ed |
|
MD5 | c0fe76c294c92557e18ce2521f2581c2 |
|
BLAKE2b-256 | 21e6e20c472492f7b68529156f452db5ec388071e2d786cf7deebef57cc1fb8a |
Hashes for npyosmium-3.6.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f957a4b271b0ea62d2badf531cd380ee5567a32359e2e59043f5d2cbe7285b8c |
|
MD5 | 9a26cb126f936d2cf4a704f5e5c9628f |
|
BLAKE2b-256 | 51c2d49fe283dc600404ca4aba53ef54f8d40abf1e0a51fb2d13b8af8b4ae855 |
Hashes for npyosmium-3.6.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1160adab7544a78572536de455d977cdf0787e0ed3f4a48e5c1b9c25c2f0eaa7 |
|
MD5 | 8220b3950e45bbcd23df7cc8e6b02a48 |
|
BLAKE2b-256 | c83d106da2d1be2b72fca18c09d8eeb00c9f50aa3a15f12275c22a860dc7a052 |
Hashes for npyosmium-3.6.3-cp38-cp38-macosx_14_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0b7d6840d9f3d689335056dd5c0048440708ccb739312f9ce9ec81fb479428a |
|
MD5 | b4f3cc05255855fa4e064f94ff37c4dc |
|
BLAKE2b-256 | 090268f2cf83abf410dadd864d44d2bba491aa2977d49ab28db5a91eea377034 |
Hashes for npyosmium-3.6.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a3e01578625c5d922c52f4ff644023d0874f1efc49eec4b2aa3c17591057567 |
|
MD5 | 128048d075c39f7ee5a8b8d2fcfe41b5 |
|
BLAKE2b-256 | 0a5a8928cb7248ba2dfdfe3c79b3a7728de2ca8730b496169e215569d8c48d71 |