# @turf/distance-weight ## pNormDistance calcualte the Minkowski p-norm distance between two features. ### Parameters * `feature1` **[Feature][1]<[Point][2]>** point feature * `feature2` **[Feature][1]<[Point][2]>** point feature * `p` p-norm 1=\
** FeatureCollection. * `options` **[Object][5]?** option object. * `options.threshold` **[number][3]** If the distance between neighbor and target features is greater than threshold, the weight of that neighbor is 0. (optional, default `10000`) * `options.p` **[number][3]** Minkowski p-norm distance parameter. 1: Manhattan distance. 2: Euclidean distance. 1=\
>** distance weight matrix. [1]: https://tools.ietf.org/html/rfc7946#section-3.2 [2]: https://tools.ietf.org/html/rfc7946#section-3.1.2 [3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number [4]: https://tools.ietf.org/html/rfc7946#section-3.3 [5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean [7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array --- This module is part of the [Turfjs project](https://turfjs.org/), an open source module collection dedicated to geographic algorithms. It is maintained in the [Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create PRs and issues. ### Installation Install this single module individually: ```sh $ npm install @turf/distance-weight ``` Or install the all-encompassing @turf/turf module that includes all modules as functions: ```sh $ npm install @turf/turf ```