mws f9379005b7 feat:初始化 4 maanden geleden
..
dist f9379005b7 feat:初始化 4 maanden geleden
LICENSE f9379005b7 feat:初始化 4 maanden geleden
README.md f9379005b7 feat:初始化 4 maanden geleden
package.json f9379005b7 feat:初始化 4 maanden geleden

README.md

@turf/point-to-polygon-distance

pointToPolygonDistance

Calculates the distance from a point to the edges of a polygon or multi-polygon. Returns negative values for points inside the polygon. Handles polygons with holes and multi-polygons. A hole is treated as the exterior of the polygon.

Parameters

  • Throws Error If input geometries are invalid

Returns number Distance in meters (negative values for points inside the polygon)


This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.

Installation

Install this single module individually:

$ npm install @turf/point-to-polygon-distance

Or install the all-encompassing @turf/turf module that includes all modules as functions:

$ npm install @turf/turf