explode
Description
Takes a feature or set of features and returns all positions as points.
Parameters
Name | Type | Description |
---|---|---|
geojson | GeoJSON | input features |
Returns
FeatureCollection<point> points representing the exploded input features
Examples
var polygon = turf.polygon([
[
[-81, 41],
[-88, 36],
[-84, 31],
[-80, 33],
[-77, 39],
[-81, 41],
],
]);
var explode = turf.explode(polygon);
Installation
$ npm install @turf/explode
import { explode } from "@turf/explode";
const result = explode(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.explode(...);