Skip to main content
Version: 7.3.0

multiPoint

描述

🌐 Description

基于坐标数组创建一个 Feature<MultiPoint>。属性可以选择性地添加。

🌐 Creates a Feature<MultiPoint> based on a coordinate array. Properties can be added optionally.

参数

🌐 Parameters

名称类型描述
coordinatesArray<Position>一系列位置
properties?GeoJsonProperties一个键值对对象,用作要添加的属性 (默认 {})
options?Object可选参数 (默认 {})
options.bbox?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(...);