Dissolves a FeatureCollection of Polygon features.
npm install @turf/dissolveDissolves a FeatureCollection of [Polygon][1] features, filtered by an optional property name:value.
Note that [MultiPolygon][2] features within the collection are not supported
* fc [FeatureCollection][3]<[Polygon][1]>
* options [Object][4] Optional parameters (optional, default {})
* options.propertyName [string][5]? features with the same propertyName value will be dissolved.
* featureCollection [FeatureCollection][3]<[Polygon][1]> input feature collection to be dissolved
``javascript
var features = turf.featureCollection([
turf.polygon([[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]], {combine: 'yes'}),
turf.polygon([[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]], {combine: 'yes'}),
turf.polygon([[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]], {combine: 'no'}),
]);
var dissolved = turf.dissolve(features, {propertyName: 'combine'});
//addToMap
var addToMap = [features, dissolved]
`
Returns [FeatureCollection][3]<[Polygon][1]> a FeatureCollection containing the dissolved polygons
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.7
[3]: https://tools.ietf.org/html/rfc7946#section-3.3
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
---
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Install this single module individually:
`sh`
$ npm install @turf/dissolve
Or install the all-encompassing @turf/turf module that includes all modules as functions:
`sh``
$ npm install @turf/turf