featureOf
描述
¥Description
Enforce expectations about types of 特性 inputs for Turf.Internally this uses geojsonType to judge geometry types.
¥Enforce expectations about types of Feature inputs for Turf. Internally this uses geojsonType to judge geometry types.
参数
¥Parameters
名称 | 类型 | 描述 |
---|---|---|
feature | 特性 | a feature with an expected geometry type |
type | string | 预期 GeoJSON 类型 |
name | string | 调用函数的名称 |
返回
¥Returns
void
安装
¥Installation
$ npm install @turf/invariant
import { featureOf } from "@turf/invariant";
const result = featureOf(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.featureOf(...);