You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the existing multi-polygon.geojson didn't catch this issue because it only happens with polygons. Multi-polygons are correctly re-signed on line 56 with the call to booleanPointInPolygon.
Hello,
The pointToPolygonDistance function return positive value for a point in polygon with an hole:
How to reproduce :
Use this file in https://turf-sandbox.netlify.app/
turfSandbox_scipt_pointToPolygonDistance.txt
Fix:
I think that the issue is on line 72 of file https://github.com/Turfjs/turf/blob/master/packages/turf-point-to-polygon-distance/index.ts
return Math.min(smallestInteriorDistance, Math.abs(exteriorDistance));
should be replaced by
return Math.max(smallestInteriorDistance*-1, exteriorDistance);
The text was updated successfully, but these errors were encountered: