turf-flatten
Turf flatten module
turf.flatten(input)
flattens any GeoJSON to a FeatureCollection using geojson-flatten.
Parameters
parameter | type | description |
---|---|---|
input |
geojson | any valid GeoJSON with multi-geometry Features |
Example
var geometry = "type": "MultiPolygon" "coordinates": 1020 20 1030 20 1030 30 1020 30 1020 20 1000 00 1010 00 1010 10 1000 10 1000 00 1002 02 1008 02 1008 08 1002 08 1002 02 ; var flattened = turf; //=flattened
Returns flattened
, a flattened FeatureCollection
Installation
Requires nodejs.
$ npm install turf-flatten
Tests
$ npm test