pNormDistance
Description
calcualte the Minkowski p-norm distance between two features.
Parameters
Name | Type | Description |
---|---|---|
feature1 | UNCERTAIN | point feature |
feature2 | UNCERTAIN | point feature |
p | UNCERTAIN | p-norm 1=<p<=infinity 1: Manhattan distance 2: Euclidean distance |
Returns
- number
Installation
$ npm install @turf/distance-weight
import { pNormDistance } from "@turf/distance-weight";
const result = pNormDistance(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.pNormDistance(...);