Node.js bindings to Osmium
Provides bindings to the libosmium C++ library.
If you want top performance use libosmium directly in C++. These node-osmium
much slower than working in C++ directly. Consider
node-osmium only for small
extracts and prototyping. For large extracts or planet processing we recommend
leveraging the libosmium C++ API
instead of using node-osmium.
@springmeyer and @joto are maintaining node-osmium but not actively adding features. We will consider pull requests adding features only when they come with very solid tests, add very clear value to the bindings, and seem easy to maintain.
By default, binaries are provided and no external dependencies or compile is needed.
npm install osmium
We currently provide binaries for 64 bit OS X and 64 bit Linux. Running
npm install on other platforms will fall back to a source compile (see
Developing below for build details).
If you wish to develop on
node-osmium you can check out the code and then
git clone https://github.com/osmcode/node-osmium.gitcd node-osmiummake
make debug to build with debug information. Use
make coverage to build
with code coverage.
make VERBOSE=1 to output compiler calls used etc.
npm install mocha make test
-std=c++11(>= clang++ 3.4 || >= g++ 4.8)
See also the dependency information for the Osmium library.
Set dependencies up on Ubuntu Precise (12.04) like:
sudo apt-add-repository --yes ppa:chris-lea/node.jssudo apt-add-repository --yes ppa:ubuntu-toolchain-r/testsudo apt-get -y updatesudo apt-get -y install git gcc-4.8 g++-4.8 build-essential nodejssudo apt-get -y install libboost-dev zlib1g-dev libexpat1-dev libsparsehash-devexport CC=gcc-4.8export CXX=g++-4.8git clone https://github.com/scrosby/OSM-binary.gitcd OSM-binary/srcmake && sudo make install
Set dependencies up on OS X like:
git clone https://github.com/mapnik/mapnik-packaging.gitcd mapnik-packaging/osxexport CXX11=truesource MacOSX.sh./scripts/build_bzip2.sh./scripts/build_expat.sh./scripts/build_google_sparsetable.sh./scripts/build_boost.sh --with-test --with-program_options./scripts/build_protobuf.sh./scripts/build_osm-pbf.sh# NOTE: in the same terminal then run the build commands# Or from a different terminal re-run `source MacOSX.sh`
node-osmium is available under the Boost Software License. See LICENSE.txt for details.