explode
描述
🌐 Description
获取一个特性或一组特性,并返回所有位置作为点。
🌐 Takes a feature or set of features and returns all positions as points.
参数
🌐 Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| geojson | GeoJSON | 输入特性 |
返回
🌐 Returns
FeatureCollection<point> 表示爆炸输入特性的点
示例
🌐 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(...);