描述
接收一个要素或一组要素,将所有位置返回为 points。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| geojson | GeoJSON | 输入要素 |
返回值
FeatureCollection<point> 表示爆炸后输入要素的点
示例
javascript
var polygon = turf.polygon([
[
[-81, 41],
[-88, 36],
[-84, 31],
[-80, 33],
[-77, 39],
[-81, 41],
],
]);
var explode = turf.explode(polygon);安装
javascript
$ npm install @turf/explode
import { explode } from "@turf/explode";
const result = explode(...);javascript
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.explode(...);