multiPoint
描述
🌐 Description
基于坐标数组创建一个 Feature<MultiPoint>。属性可以选择性地添加。
🌐 Creates a Feature<MultiPoint> based on a coordinate array. Properties can be added optionally.
参数
🌐 Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| coordinates | 数组<Position> | 位置数组 |
| properties? | GeoJson属性 | 要作为属性添加的键值对对象 (默认 {}) |
| options? | 对象 | 可选参数 (默认 {}) |
| options.bbox? | 边界框 | 与要素关联的边界框数组 [西, 南, 东, 北] |
| options.id? | Id | 与要素关联的标识符 |
返回
🌐 Returns
Feature<MultiPoint, GeoJsonProperties> 一个多点要素
示例
🌐 Examples
var multiPt = turf.multiPoint([
[0, 0],
[10, 10],
]);
//=multiPt
安装
🌐 Installation
$ npm install @turf/helpers
import { multiPoint } from "@turf/helpers";
const result = multiPoint(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.multiPoint(...);