UNPKG

708 BMarkdownView Raw
1# geojson-flatten
2
3[![CircleCI](https://circleci.com/gh/tmcw/geojson-flatten/tree/master.svg?style=svg)](https://circleci.com/gh/tmcw/geojson-flatten/tree/master)
4
5Flatten MultiPoint, MultiPolygon, MultiLineString, and GeometryCollection
6geometries in [GeoJSON](http://geojson.org/) files into simple non-complex
7geometries.
8
9If a FeatureCollection is passed in, a FeatureCollection is returned. If a single Feature is passed in, an array of Features is returned.
10
11## install
12
13```
14npm install --save geojson-flatten
15```
16
17Or download `geojson-flatten.js` for non-[browserify](http://browserify.org/) usage.
18
19## example
20
21```js
22let flatten = require('geojson-flatten');
23
24flattened = flatten(geojsonObject);
25```