描述
计算两个要素之间的 Minkowski p-范数距离。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| feature1 | UNCERTAIN | 点要素 |
| feature2 | UNCERTAIN | 点要素 |
| p | UNCERTAIN | p-范数 1=<p<=infinity 1: 曼哈顿距离 2: 欧几里得距离 (默认 2) |
返回值
安装
javascript
$ npm install @turf/distance-weight
import { pNormDistance } from "@turf/distance-weight";
const result = pNormDistance(...);javascript
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.pNormDistance(...);