Skip to content
Fast and flexible Javascript library for working with OpenStreetMap data.
C++ JavaScript Makefile Shell Python Batchfile
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
demo Fix issue with data not being flushed. Oct 29, 2015
doc Update member representation docs Apr 29, 2016
lib Add GeoJSON support for areas. Oct 29, 2015
scripts ensure the coverage build is build debug Mar 30, 2016
test avoid abort on invalid put to new Osmium.Buffer Nov 24, 2015
.gitignore Add to gitignore Sep 1, 2015
.npmignore npmignore lib/binding Nov 10, 2015
.travis.yml whoops, actually build for node v4/5 [republish binary] Mar 31, 2016 Use absolute paths to includes in YouCompleteMe configuration. Mar 29, 2015 bump to v0.5.0 [publish binary] Mar 31, 2016
LICENSE.txt initial work Dec 9, 2013
Makefile ensure the coverage build is build debug Mar 30, 2016
appveyor.yml target node v4 for windows builds Apr 4, 2016
binding.gyp add -DNOMINMAX to attempt to solve #74 Apr 4, 2016 pin mason Mar 30, 2016
build-local-test.bat Windows: full path to dependent libs Apr 3, 2015
common.gypi stop stripping binaries on linux May 4, 2015


Fast and flexible Javascript library for working with OpenStreetMap data.

Provides bindings to the libosmium C++ library.


Build Status Build status Coverage Status Dependencies



By default, binaries are provided and no external dependencies or compile is needed.

Just do:

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).


See the tutorial for an introduction. There are some demo applications in the 'demo' directory. See the there. You can also have a look at the tests in the test directory.


If you wish to develop on node-osmium you can check out the code and then build like:

git clone
cd node-osmium

Use make debug to build with debug information. Use make coverage to build with code coverage.

Use make VERBOSE=1 to output compiler calls used etc.


npm install mocha
make test

Source build dependencies

  • Compiler that supports -std=c++11 (>= clang++ 3.2 || >= g++ 4.8)
  • Boost >= 1.46 with development headers
  • OSM-Binary
  • Protocol buffers
  • zlib

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.js
sudo apt-add-repository --yes ppa:ubuntu-toolchain-r/test
sudo apt-get -y update
sudo apt-get -y install git gcc-4.8 g++-4.8 build-essential nodejs
sudo apt-get -y install libboost-dev zlib1g-dev protobuf-compiler
sudo apt-get -y install libprotobuf-lite7 libprotobuf-dev libexpat1-dev
sudo apt-get -y install libsparsehash-dev
export CC=gcc-4.8
export CXX=g++-4.8
git clone
cd OSM-binary/src
make && sudo make install

Set dependencies up on OS X like:

git clone
cd mapnik-packaging/osx
export CXX11=true
./scripts/ --with-test --with-program_options
# NOTE: in the same terminal then run the build commands
# Or from a different terminal re-run `source`


node-osmium is available under the Boost Software License. See LICENSE.txt for details.


Please open bug reports on You can ask questions on the OSM developer mailing list or on OFTC net IRC channel #osm-dev.


Something went wrong with that request. Please try again.