# pelias-openstreetmap-polygons

> Extract administrative polygons from openstreetmap data

Latest version **0.1.0** (published 2015-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install pelias-openstreetmap-polygons
pnpm add pelias-openstreetmap-polygons
yarn add pelias-openstreetmap-polygons
bun add pelias-openstreetmap-polygons
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-02-20 |
| First published | 2015-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Mapzen |
| Maintainers | dianashk |
| Keywords | osm, boundary, area, admin_level, administrative, openstreetmap |

## Links

- npm: https://www.npmjs.com/package/pelias-openstreetmap-polygons
- Repository: https://github.com/pelias/openstreetmap-polygons
- Issues: https://github.com/pelias/openstreetmap-polygons/issues
- npm.io page: https://npm.io/package/pelias-openstreetmap-polygons

## Dependencies (8)

- [async](https://npm.io/package/async.md) ^0.9.0
- [osmium](https://npm.io/package/osmium.md) ^0.3.0
- [winston](https://npm.io/package/winston.md) ^0.9.0
- [microtime](https://npm.io/package/microtime.md) ^1.2.0
- [wellknown](https://npm.io/package/wellknown.md) ^0.3.1
- [JSONStream](https://npm.io/package/JSONStream.md) ^0.10.0
- [pelias-config](https://npm.io/package/pelias-config.md) ^0.*.*
- [geojson-stream](https://npm.io/package/geojson-stream.md) 0.0.0

## Recent versions

- 0.1.0 (latest) — 2015-02-20
- 0.0.3 — 2015-02-17
- 0.0.2 — 2015-02-12

## README

# openstreetmap-polygons

This module extracts administrative boundary polygons from openstreetmap data files.
It's currently using [node-osmium](https://github.com/osmcode/node-osmium) to do most of the work, and simply filtering
the generated polygons using tags.

[![NPM](https://nodei.co/npm/pelias-openstreetmap-polygons.png)](https://nodei.co/npm/pelias-openstreetmap-polygons/)

Note: you will need `node` and `npm` installed first.

The easiest way to install `node.js` is with [nave.sh](https://github.com/isaacs/nave) by executing `[sudo] ./nave.sh usemain stable`


## Installation

```bash
$ npm install pelias-openstreetmap-polygons
```

## Usage

There is config.json in the project's etc directory. You can define the following parameters.

```javascript
    {
        "inputFile": "path/to/input/file",
        "outputDir": "path/to/output/directory"
    }
```

Once config is to your liking, run as follows.

```bash
$ npm start
```

### Notes

Osmium parser has been separated into a child process because it doesn't respect
node's event loop.

## Running Unit Tests

```bash
$ npm test
```


### Continuous Integration

[![Build Status](https://travis-ci.org/pelias/openstreetmap-polygons.svg?branch=master)](https://travis-ci.org/pelias/openstreetmap-polygons)

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