Skip to main content
Version: Next

explode

描述

¥Description

Takes a feature or set of features and returns all positions as points.

参数

¥Parameters

名称类型描述
geojsonGeoJSON输入要素

返回

¥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(...);