"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("geolib"),t=function(t,e,i){var r=1609.34*i;return n.isPointWithinRadius(t,e,r)},e=function(t,e){return!(e.length<3)&&n.isPointInPolygon(t,e)},i=function(n){var t,e,i,r,o=null===(t=n.topHole)||void 0===t||null===(e=t.coordinates)||void 0===e?void 0:e[0],l=null===(i=n.topHole)||void 0===i||null===(r=i.coordinates)||void 0===r?void 0:r[1];return null==o||null==l?null:{latitude:o,longitude:l}};exports.getWellsInCircle=function(n,e,r,o){return n.filter((function(n){if(null!=o&&n.id===o)return!1;var l=i(n);return!!l&&t(l,e,r)}))},exports.getWellsInPolygon=function(n,t,r){if(t.length<3)return[];var o=t.map((function(n){return{latitude:n.latitude,longitude:n.longitude}}));return n.filter((function(n){if(null!=r&&n.id===r)return!1;var t=i(n);return!!t&&e(t,o)}))},exports.isPointInCircle=t,exports.isPointInPolygonArea=e;
//# sourceMappingURL=selection-geometry.js.map
