Atlaslog
Atlaslog / Turf.js / API reference / explode
Turf.js · API reference

explode

Quick answer

explode splits a MultiPolygon or MultiLineString into one feature per component and returns a FeatureCollection. It is the inverse of combine and is useful when you need per-part styling, identifiers or intersection tests. Inputs that are not multi geometries pass through as single-feature collections.

Last verified 2026-11-03 · Turf.js 7.x · Cite this page
turf.explode( geojson ) → FeatureCollection
Key points
Example
var parts = turf.explode(multiPolygon);
console.log(parts.features.length);

parts.features.forEach(function (f) {
  console.log(f.geometry.type, turf.area(f) / 1e6);
});
Notes
Runnable examplesChinese originalAll API references
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Cite this page

Atlaslog (2026). explode. https://www.jingweizhi.com/en/turf/api/explode.html (accessed 2026-11-03).