An open API service indexing awesome lists of open source software.

https://github.com/tmcw/geojson-flatten

flatten multipart geometries and geometrycollections in geojson
https://github.com/tmcw/geojson-flatten

Last synced: over 1 year ago
JSON representation

flatten multipart geometries and geometrycollections in geojson

Awesome Lists containing this project

README

          

# geojson-flatten

Flatten MultiPoint, MultiPolygon, MultiLineString, and GeometryCollection
geometries in [GeoJSON](http://geojson.org/) files into simple non-complex
geometries.

If a FeatureCollection is passed in, a FeatureCollection is returned. If a single Feature is passed in, an array of Features is returned.

## install

```
npm install --save geojson-flatten
```

Or download `geojson-flatten.js` for non-[browserify](http://browserify.org/) usage.

## example

```js
let flatten = require('geojson-flatten');

flattened = flatten(geojsonObject);
```