# osmium

> Node.js bindings to Osmium

Latest version **0.5.7** (published 2018-07-02) · BSL-1.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install osmium
pnpm add osmium
yarn add osmium
bun add osmium
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.5.7 |
| Published | 2018-07-02 |
| First published | 2013-12-09 |
| Weekly downloads | 0 |
| License | BSL-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 213.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 140 |
| Author | Dane Springmeyer |
| Maintainers | aaronlidman, joto, mapsam, rclark, springmeyer |
| Keywords | openstreetmap, osmium, osm, pbf, changeset |

## Links

- npm: https://www.npmjs.com/package/osmium
- Repository: https://github.com/osmcode/node-osmium
- Homepage: http://osmcode.org/node-osmium
- Issues: https://github.com/osmcode/node-osmium/issues
- npm.io page: https://npm.io/package/osmium

## Dependencies (2)

- [nan](https://npm.io/package/nan.md) ^2.10.0
- [node-pre-gyp](https://npm.io/package/node-pre-gyp.md) ^0.10.2

## Recent versions

- 0.5.7 (latest) — 2018-07-02
- 0.5.6 — 2017-08-10
- 0.5.5 — 2017-08-09
- 0.5.4 — 2016-11-21
- 0.5.3 — 2016-09-19
- 0.5.2 — 2016-07-28
- 0.5.1 — 2016-07-22
- 0.5.0 — 2016-04-04
- 0.4.5 — 2016-02-10
- 0.4.4 — 2015-11-10
- 0.4.3 — 2015-11-10
- 0.4.2 — 2015-09-01
- 0.4.0 — 2015-08-19
- 0.3.0 — 2014-11-05
- 0.2.1 — 2014-10-11
- … 5 more at https://npm.io/package/osmium/versions

## README

# node-osmium

Flexible Javascript library for working with OpenStreetMap data.

Provides bindings to the [libosmium](https://github.com/osmcode/libosmium)
C++ library.

[![NPM](https://nodei.co/npm/osmium.png?downloads=true&downloadRank=true)](https://nodei.co/npm/osmium/)
[![Build Status](https://secure.travis-ci.org/osmcode/node-osmium.png)](http://travis-ci.org/osmcode/node-osmium)
[![Coverage Status](https://coveralls.io/repos/osmcode/node-osmium/badge.svg?branch=coverage)](https://coveralls.io/r/osmcode/node-osmium?branch=coverage)
[![Dependencies](https://david-dm.org/osmcode/node-osmium.png)](https://david-dm.org/osmcode/node-osmium)


## Should you use node-osmium?

If you want top performance use libosmium directly in C++. These node-osmium
bindings, due to the expense of passing objects from C++ to Javascript, are
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](https://github.com/osmcode/libosmium)
instead of using node-osmium.


## Is node-osmium actively developed?

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


## Depends

 - Node.js v4.x, v6.x, v8.x
 - Mocha (http://mochajs.org/, for tests)
 - Compiler that supports `-std=c++11` (>= clang++ 3.6 || >= g++ 4.8)
 - [libosmium](https://github.com/osmcode/libosmium) >= 2.10.3
   (Debian/Ubuntu: libosmium2-dev)
 - [protozero](https://github.com/mapbox/protozero) >= 1.5.1
   (Debian/Ubuntu: libprotozero-dev)
 - [Utfcpp](http://utfcpp.sourceforge.net/)
   This is included in the libosmium repository and might or might not
   have been installed with it. See the libosmium README.
   (Debian/Ubuntu: libutfcpp-dev)
 - [Boost](http://www.boost.org/) >= 1.55 with development headers
   (Debian/Ubuntu: libboost-dev)
 - [zlib](http://www.zlib.net/)
   (Debian/Ubuntu: zlib1g-dev)
 - [expat](http://expat.sourceforge.net/)
   Debian/Ubuntu: libexpat1-dev

If you have problems compiling, install the dependencies for libosmium first
and make sure it works. Then you should be able to get node-osmium to compile.


## Installing

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

Just do:

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


## Usage

See [the tutorial](doc/tutorial.md) for an introduction. There are some demo
applications in the 'demo' directory. See the [README.md](demo/README.md)
there. You can also have a look at the tests in the `test` directory.


## Developing

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

```shell
git clone https://github.com/osmcode/node-osmium.git
cd node-osmium
make
```

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.


## Testing

    npm install mocha
    make test


## License

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


## Contact

Please open bug reports on https://github.com/osmcode/node-osmium/issues. You
can ask questions on the
[OSM developer mailing list](https://lists.openstreetmap.org/listinfo/dev)
or on [OFTC net IRC channel #osm-dev](https://wiki.openstreetmap.org/wiki/Irc).


## Authors

 - Dane Springmeyer (dane@mapbox.com)
 - Jochen Topf (jochen@topf.org)

---
_Source: https://npm.io/package/osmium · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
