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 |
|
5 | Flatten MultiPoint, MultiPolygon, MultiLineString, and GeometryCollection
|
6 | geometries in [GeoJSON](http://geojson.org/) files into simple non-complex
|
7 | geometries.
|
8 |
|
9 | If 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 | ```
|
14 | npm install --save geojson-flatten
|
15 | ```
|
16 |
|
17 | Or download `geojson-flatten.js` for non-[browserify](http://browserify.org/) usage.
|
18 |
|
19 | ## example
|
20 |
|
21 | ```js
|
22 | let flatten = require('geojson-flatten');
|
23 |
|
24 | flattened = flatten(geojsonObject);
|
25 | ```
|