https://github.com/pirxpilot/poly2geojson
Convert Osmosis polygon filter file to GeoJSON polygon.
https://github.com/pirxpilot/poly2geojson
Last synced: about 1 year ago
JSON representation
Convert Osmosis polygon filter file to GeoJSON polygon.
- Host: GitHub
- URL: https://github.com/pirxpilot/poly2geojson
- Owner: pirxpilot
- Created: 2017-01-18T02:26:22.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-02-09T10:21:01.000Z (over 2 years ago)
- Last Synced: 2024-04-16T00:26:08.338Z (over 2 years ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]
# poly2geojson
Convert [Osmosis polygon filter][poly-file] file to [GeoJSON polygon].
## Install
```sh
$ npm install --save poly2geojson
```
## Usage
```js
var split = require('split'); // or any other line splitting stream
var poly2geojson = require('poly2geojson');
fs.createReadStream('area.poly')
.pipe(split())
.pipe(poly2geojson())
.on('data', function(geojson) {
console.log(geojson); // GeoJSON polygon
});
```
## License
MIT © [Damian Krzeminski](https://pirxpilot.me)
[poly-file]: http://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format
[GeoJSON polygon]: http://geojson.org/geojson-spec.html#polygon
[npm-image]: https://img.shields.io/npm/v/poly2geojson
[npm-url]: https://npmjs.org/package/poly2geojson
[build-url]: https://github.com/pirxpilot/poly2geojson/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/poly2geojson/check.yaml?branch=main
[deps-image]: https://img.shields.io/librariesio/release/npm/poly2geojson
[deps-url]: https://libraries.io/npm/poly2geojson