Code Monkey home page Code Monkey logo

pyosmium's Introduction

pyosmium

Provides Python bindings for the Libosmium C++ library, a library for working with OpenStreetMap data in a fast and flexible manner.

Travis Build Status Appveyor Build Status

Dependencies

Python >= 2.7 is supported but a version >= 3.3 is strongly recommended.

Other requirements are:

You have to compile with the same compiler version that Python is compiled with on your system, otherwise it might not work.

Debian/Ubuntu

On Debian/Ubuntu systems all required dependencies can be installed with:

sudo apt-get install build-essentials libboost-python-dev \
                     libexpat1-dev zlib1g-dev libbz2-dev

Homebrew (OS X)

On OS x Boost.Python needs to be installed with brew install boost-python or brew install boost-python --with-python3 depending on which Python version you want to use. You can also (re)install both.

Installation

Using Pip

The recommended way to install pyosmium is via pip:

pip install osmium

There are also experimental binary wheels for Windows available.

Compiling from Source

When compiling from source, you need to get the latest libosmium version first. It is recommended to put it next to the pyosmium source. The setup script uses per default either a globally installed libosmium or looks for the source in ../libosmium. You can set a custom location with LIBOSMIUM_PREFIX.

To use a custom boost installation, set BOOST_PREFIX.

To compile the bindings, run

python setup.py build

To compile and install the bindings, run

python setup.py install --user

to install only for your user, or

python setup.py install

to install globally.

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 nose module. On Debian/Ubuntu install the package python-nose. For Python2 mock is required as well (package python-mock).

The suite can be run with:

cd test
python run_tests.py

Documentation

To build the documentation you need Sphinx and the autoprogram extension 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.

For general questions about using pyosmium you can use the OSM development mailing list or ask on OSM help.

License

Pyosmium is available under the BSD 2-Clause License. See LICENSE.TXT.

Authors

Sarah Hoffmann ([email protected])

pyosmium's People

Contributors

lonvia avatar joto avatar sebastic avatar saerdnaer avatar cjmayo avatar mennotammens avatar daniel-j-h avatar nyurik avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.