dissolve
Quick answer
dissolve merges adjacent polygons that share a property value into one outline, returning a FeatureCollection grouped by propertyName. It tests real adjacency rather than bounding-box overlap, so gaps between neighbours survive. Pass an array of field names for compound grouping.
turf.dissolve( featureCollection , options ) → FeatureCollection
Key points
- options.propertyName selects one field or an array of grouping fields.
- Output features keep the shared property value with merged geometry.
- Non-adjacent members remain separate features in the collection.
Example
var merged = turf.dissolve(districts, { propertyName: 'city' });
console.log(merged.features.length);
console.log(merged.features[0].geometry.type);
Notes
- Polygons that meet at a single point are not dissolved together.
- Invalid or self-intersecting rings produce incomplete merged outlines.
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Atlaslog (2026). dissolve. https://www.jingweizhi.com/en/turf/api/dissolve.html (accessed 2026-11-03).