Skip to main content
Version: 7.1.0

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(...);