Skip to main content
Version: Next

pNormDistance

Description

calcualte the Minkowski p-norm distance between two features.

Parameters

NameTypeDescription
feature1UNCERTAINpoint feature
feature2UNCERTAINpoint feature
pUNCERTAINp-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(...);