# feature
Wraps a GeoJSON Geometry in a GeoJSON Feature.
在GeoJSONFeature
中包裹GeoJSON几何图形。
> npm install @turf/helpers
参数
参数 | 类型 | 描述 |
---|---|---|
geometry | Geometry | input geometry |
properties | Object | an Object of key-value pairs to add as properties |
options | Object | 可选参数:见下文 |
options选项
属性 | 类型 | 默认值 | 描述 |
---|---|---|---|
bbox | (Array) | Bounding Box Array | |
id | (string|number) | Identifier associated with the Feature |
返回
Feature - a GeoJSON Feature
示例
var geometry = {
"type": "Point",
"coordinates": [110, 50]
};
var feature = turf.feature(geometry);
//=feature