point
描述
¥Description
¥Creates a Point Feature from a Position.
参数
¥Parameters
名称 | 类型 | 描述 |
---|---|---|
coordinates | 位置 | 经度、纬度位置(均以十进制度为单位) |
properties? | GeoJsonProperties | 一个键值对对象,用于添加为属性(默认为 {}) |
options? | 对象 | 可选参数(默认 {}) |
options.bbox? | BBox | 与要素关联的边界框数组 [西,南,东,北] |
options.id? | ID | 与特性关联的标识符 |
返回
¥Returns
特性<点, GeoJsonProperties>点要素
¥Feature<Point, GeoJsonProperties> a Point feature
示例
¥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(...);