Skip to main content
Version: Next

points

描述

¥Description

Creates a FeatureCollection from an Array of Point coordinates.

¥Creates a Point FeatureCollection from an Array of Point coordinates.

参数

¥Parameters

名称类型描述
coordinates数组<位置>点数组
properties?GeoJsonPropertiesTranslate these properties to each Feature (default )
options?对象可选参数(默认
options.bbox?BBoxBounding Box Array [west, south, east, north] associated with the FeatureCollection
options.id?IDIdentifier associated with the FeatureCollection

返回

¥Returns

FeatureCollection<> 点要素

¥FeatureCollection<Point> Point Feature

示例

¥Examples

var points = turf.points([
[-75, 39],
[-80, 45],
[-78, 50],
]);

//=points

安装

¥Installation

$ npm install @turf/helpers

import { points } from "@turf/helpers";
const result = points(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.points(...);