SourceTermAnalysisSystem_vue/node_modules/@turf/point-to-polygon-distance
2026-05-15 10:22:44 +08:00
..
LICENSE 提交node_modules 2026-05-15 10:22:44 +08:00
package.json 提交node_modules 2026-05-15 10:22:44 +08:00
README.md 提交node_modules 2026-05-15 10:22:44 +08:00

@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