point
描述
🌐 Description
🌐 Creates a Point Feature from a Position.
参数
🌐 Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| coordinates | 位置 | 经度、纬度位置(均为十进制度) |
| properties? | GeoJsonProperties | 一个键值对对象,用作要添加的属性 (默认 {}) |
| options? | Object | 可选参数 (默认 {}) |
| options.bbox? | BBox | 与要素相关的边界框数组 [西, 南, 东, 北] |
| options.id? | Id | 与功能相关的标识符 |
返回
🌐 Returns
Feature<Point, GeoJsonProperties> 点要素
示例
🌐 Examples
var point = turf.point([-75.343, 39.984]);
//=point
安装
🌐 Installation
$ npm install @turf/helpers
import { point } from "@turf/helpers";
const result = point(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.point(...);