node-red-contrib-tak-registration 0.16.0 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@turf/along/README.md +3 -1
- package/node_modules/@turf/along/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/along/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/along/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/along/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/along/dist/esm/index.js +2 -2
- package/node_modules/@turf/along/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/along/package.json +12 -12
- package/node_modules/@turf/angle/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/angle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/angle/dist/esm/index.js +2 -2
- package/node_modules/@turf/angle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/angle/package.json +16 -16
- package/node_modules/@turf/area/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/area/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/area/dist/esm/index.js +2 -2
- package/node_modules/@turf/area/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/area/package.json +10 -10
- package/node_modules/@turf/bbox/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bbox/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox/dist/esm/index.js +2 -2
- package/node_modules/@turf/bbox/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox/package.json +9 -9
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-clip/dist/esm/index.js +2 -2
- package/node_modules/@turf/bbox-clip/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox-clip/package.json +11 -11
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/bbox-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox-polygon/package.json +8 -8
- package/node_modules/@turf/bearing/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bearing/dist/esm/index.js +2 -2
- package/node_modules/@turf/bearing/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bearing/package.json +11 -11
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bezier-spline/dist/esm/index.js +2 -2
- package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bezier-spline/package.json +10 -10
- package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-clockwise/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-clockwise/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-clockwise/package.json +10 -10
- package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-concave/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-concave/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-concave/package.json +10 -10
- package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-contains/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-contains/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-contains/package.json +13 -13
- package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-crosses/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-crosses/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-crosses/package.json +13 -13
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-disjoint/package.json +12 -12
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-equal/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-equal/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-equal/package.json +11 -11
- package/node_modules/@turf/boolean-intersects/README.md +1 -1
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-intersects/package.json +10 -10
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-overlap/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-overlap/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-overlap/package.json +13 -13
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-parallel/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-parallel/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-parallel/package.json +12 -12
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/package.json +9 -9
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-point-on-line/package.json +11 -11
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-touches/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-touches/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-touches/package.json +12 -12
- package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-valid/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-valid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-valid/package.json +17 -17
- package/node_modules/@turf/boolean-within/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-within/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-within/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-within/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-within/package.json +13 -13
- package/node_modules/@turf/buffer/README.md +3 -3
- package/node_modules/@turf/buffer/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/buffer/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/buffer/dist/esm/index.js +2 -2
- package/node_modules/@turf/buffer/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/buffer/package.json +13 -13
- package/node_modules/@turf/center/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center/dist/esm/index.js +2 -2
- package/node_modules/@turf/center/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center/package.json +13 -13
- package/node_modules/@turf/center-mean/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center-mean/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-mean/dist/esm/index.js +2 -2
- package/node_modules/@turf/center-mean/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-mean/package.json +14 -14
- package/node_modules/@turf/center-median/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center-median/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-median/dist/esm/index.js +2 -2
- package/node_modules/@turf/center-median/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-median/package.json +17 -17
- package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-of-mass/dist/esm/index.js +2 -2
- package/node_modules/@turf/center-of-mass/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-of-mass/package.json +14 -14
- package/node_modules/@turf/centroid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/centroid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/centroid/dist/esm/index.js +2 -2
- package/node_modules/@turf/centroid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/centroid/package.json +11 -11
- package/node_modules/@turf/circle/README.md +13 -13
- package/node_modules/@turf/circle/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/circle/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/circle/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/circle/dist/esm/index.js +2 -2
- package/node_modules/@turf/circle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/circle/package.json +11 -11
- package/node_modules/@turf/clean-coords/dist/cjs/index.cjs +33 -49
- package/node_modules/@turf/clean-coords/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clean-coords/dist/esm/index.js +33 -49
- package/node_modules/@turf/clean-coords/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clean-coords/package.json +15 -12
- package/node_modules/@turf/clone/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/clone/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clone/dist/esm/index.js +2 -2
- package/node_modules/@turf/clone/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clone/package.json +9 -9
- package/node_modules/@turf/clusters/package.json +9 -9
- package/node_modules/@turf/clusters-dbscan/README.md +2 -2
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs +3 -8
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js +4 -9
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters-dbscan/package.json +15 -15
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.js +2 -2
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters-kmeans/package.json +15 -15
- package/node_modules/@turf/collect/dist/cjs/index.cjs +3 -8
- package/node_modules/@turf/collect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/collect/dist/esm/index.js +3 -8
- package/node_modules/@turf/collect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/collect/package.json +11 -11
- package/node_modules/@turf/combine/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/combine/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/combine/dist/esm/index.js +2 -2
- package/node_modules/@turf/combine/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/combine/package.json +9 -9
- package/node_modules/@turf/concave/README.md +2 -2
- package/node_modules/@turf/concave/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/concave/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/concave/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/concave/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/concave/dist/esm/index.js +2 -2
- package/node_modules/@turf/concave/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/concave/package.json +14 -14
- package/node_modules/@turf/convex/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/convex/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/convex/dist/esm/index.js +2 -2
- package/node_modules/@turf/convex/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/convex/package.json +11 -11
- package/node_modules/@turf/destination/README.md +2 -2
- package/node_modules/@turf/destination/dist/cjs/index.cjs +5 -2
- package/node_modules/@turf/destination/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/destination/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/destination/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/destination/dist/esm/index.js +5 -2
- package/node_modules/@turf/destination/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/destination/package.json +14 -11
- package/node_modules/@turf/difference/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/difference/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/difference/dist/esm/index.js +2 -2
- package/node_modules/@turf/difference/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/difference/package.json +11 -11
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/dissolve/dist/esm/index.js +2 -2
- package/node_modules/@turf/dissolve/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/dissolve/package.json +12 -12
- package/node_modules/@turf/distance/README.md +2 -2
- package/node_modules/@turf/distance/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/distance/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/distance/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/distance/dist/esm/index.js +2 -2
- package/node_modules/@turf/distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/distance/package.json +10 -10
- package/node_modules/@turf/distance-weight/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/distance-weight/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/distance-weight/dist/esm/index.js +2 -2
- package/node_modules/@turf/distance-weight/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/distance-weight/package.json +12 -12
- package/node_modules/@turf/ellipse/README.md +2 -2
- package/node_modules/@turf/ellipse/dist/cjs/index.cjs +62 -39
- package/node_modules/@turf/ellipse/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/ellipse/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/ellipse/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/ellipse/dist/esm/index.js +64 -41
- package/node_modules/@turf/ellipse/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/ellipse/package.json +21 -18
- package/node_modules/@turf/envelope/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/envelope/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/envelope/dist/esm/index.js +2 -2
- package/node_modules/@turf/envelope/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/envelope/package.json +10 -10
- package/node_modules/@turf/explode/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/explode/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/explode/dist/esm/index.js +2 -2
- package/node_modules/@turf/explode/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/explode/package.json +10 -10
- package/node_modules/@turf/flatten/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/flatten/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flatten/dist/esm/index.js +2 -2
- package/node_modules/@turf/flatten/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/flatten/package.json +10 -10
- package/node_modules/@turf/flip/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/flip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flip/dist/esm/index.js +2 -2
- package/node_modules/@turf/flip/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/flip/package.json +11 -11
- package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js +2 -2
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/geojson-rbush/package.json +12 -12
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/great-circle/dist/esm/index.js +3 -3
- package/node_modules/@turf/great-circle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/great-circle/package.json +10 -10
- package/node_modules/@turf/helpers/README.md +1 -1
- package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/helpers/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/helpers/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/helpers/package.json +7 -7
- package/node_modules/@turf/hex-grid/README.md +7 -5
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/hex-grid/dist/cjs/index.d.cts +4 -4
- package/node_modules/@turf/hex-grid/dist/esm/index.d.ts +4 -4
- package/node_modules/@turf/hex-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/hex-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/hex-grid/package.json +14 -14
- package/node_modules/@turf/interpolate/README.md +7 -5
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/interpolate/dist/esm/index.js +2 -2
- package/node_modules/@turf/interpolate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/interpolate/package.json +19 -19
- package/node_modules/@turf/intersect/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/intersect/dist/esm/index.js +2 -2
- package/node_modules/@turf/intersect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/intersect/package.json +11 -11
- package/node_modules/@turf/invariant/package.json +8 -8
- package/node_modules/@turf/isobands/README.md +1 -1
- package/node_modules/@turf/isobands/dist/cjs/index.cjs +313 -9
- package/node_modules/@turf/isobands/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/isobands/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/isobands/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/isobands/dist/esm/index.js +313 -9
- package/node_modules/@turf/isobands/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isobands/package.json +22 -22
- package/node_modules/@turf/isolines/README.md +1 -1
- package/node_modules/@turf/isolines/dist/cjs/index.cjs +192 -7
- package/node_modules/@turf/isolines/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/isolines/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/isolines/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/isolines/dist/esm/index.js +192 -7
- package/node_modules/@turf/isolines/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isolines/package.json +19 -19
- package/node_modules/@turf/kinks/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/kinks/dist/esm/index.js +2 -2
- package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/kinks/package.json +10 -10
- package/node_modules/@turf/length/README.md +2 -2
- package/node_modules/@turf/length/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/length/dist/esm/index.js +2 -2
- package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/length/package.json +11 -11
- package/node_modules/@turf/line-arc/README.md +2 -2
- package/node_modules/@turf/line-arc/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/line-arc/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-arc/package.json +12 -12
- package/node_modules/@turf/line-chunk/README.md +2 -2
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-chunk/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-chunk/package.json +12 -12
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-intersect/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-intersect/package.json +10 -10
- package/node_modules/@turf/line-offset/README.md +2 -2
- package/node_modules/@turf/line-offset/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-offset/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-offset/package.json +11 -11
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-overlap/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-overlap/package.json +15 -15
- package/node_modules/@turf/line-segment/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-segment/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-segment/package.json +11 -11
- package/node_modules/@turf/line-slice/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-slice/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-slice/package.json +11 -11
- package/node_modules/@turf/line-slice-along/README.md +2 -2
- package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-slice-along/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-slice-along/package.json +12 -12
- package/node_modules/@turf/line-split/README.md +4 -1
- package/node_modules/@turf/line-split/dist/cjs/index.cjs +2 -7
- package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-split/dist/esm/index.js +2 -7
- package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-split/package.json +16 -17
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-to-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-to-polygon/package.json +12 -12
- package/node_modules/@turf/mask/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/mask/dist/esm/index.js +2 -2
- package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/mask/package.json +10 -10
- package/node_modules/@turf/meta/package.json +7 -7
- package/node_modules/@turf/midpoint/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/midpoint/dist/esm/index.js +2 -2
- package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/midpoint/package.json +11 -11
- package/node_modules/@turf/moran-index/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/moran-index/dist/esm/index.js +2 -2
- package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/moran-index/package.json +11 -11
- package/node_modules/@turf/nearest-neighbor-analysis/README.md +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
- package/node_modules/@turf/nearest-point/README.md +2 -2
- package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +6 -7
- package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +6 -7
- package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -2
- package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point/package.json +12 -12
- package/node_modules/@turf/nearest-point-on-line/README.md +6 -2
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +45 -52
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +5 -1
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +5 -1
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +45 -52
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point-on-line/package.json +20 -15
- package/node_modules/@turf/nearest-point-to-line/README.md +2 -2
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js +2 -2
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
- package/node_modules/@turf/planepoint/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/planepoint/dist/esm/index.js +2 -2
- package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/planepoint/package.json +9 -9
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-grid/package.json +14 -14
- package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-on-feature/dist/esm/index.js +2 -2
- package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-on-feature/package.json +15 -15
- package/node_modules/@turf/point-to-line-distance/README.md +5 -4
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +1 -2
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +1 -2
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +2 -2
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-to-line-distance/package.json +18 -18
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +3 -3
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-to-polygon-distance/package.json +14 -14
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/points-within-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/points-within-polygon/package.json +10 -10
- package/node_modules/@turf/polygon-smooth/README.md +1 -1
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/polygon-smooth/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-smooth/package.json +11 -11
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-tangents/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-tangents/package.json +14 -14
- package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-to-line/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-to-line/package.json +10 -10
- package/node_modules/@turf/polygonize/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygonize/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygonize/package.json +13 -13
- package/node_modules/@turf/projection/package.json +12 -12
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/quadrat-analysis/dist/esm/index.js +2 -2
- package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/quadrat-analysis/package.json +18 -18
- package/node_modules/@turf/random/package.json +9 -9
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rectangle-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rectangle-grid/package.json +13 -13
- package/node_modules/@turf/rewind/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rewind/dist/esm/index.js +2 -2
- package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rewind/package.json +13 -13
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/esm/index.js +2 -2
- package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-bearing/package.json +11 -11
- package/node_modules/@turf/rhumb-destination/README.md +2 -2
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/rhumb-destination/dist/esm/index.js +2 -2
- package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-destination/package.json +11 -11
- package/node_modules/@turf/rhumb-distance/README.md +8 -9
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +2 -3
- package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +2 -3
- package/node_modules/@turf/rhumb-distance/dist/esm/index.js +2 -2
- package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-distance/package.json +11 -11
- package/node_modules/@turf/sample/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/sample/dist/esm/index.js +2 -2
- package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/sample/package.json +8 -8
- package/node_modules/@turf/sector/README.md +2 -2
- package/node_modules/@turf/sector/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/sector/dist/esm/index.js +2 -2
- package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/sector/package.json +14 -14
- package/node_modules/@turf/shortest-path/README.md +5 -3
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +10 -14
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/shortest-path/dist/esm/index.js +10 -14
- package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/shortest-path/package.json +20 -19
- package/node_modules/@turf/simplify/README.md +13 -13
- package/node_modules/@turf/simplify/dist/cjs/index.cjs +6 -3
- package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/simplify/dist/cjs/index.d.cts +11 -12
- package/node_modules/@turf/simplify/dist/esm/index.d.ts +11 -12
- package/node_modules/@turf/simplify/dist/esm/index.js +6 -3
- package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/simplify/package.json +13 -13
- package/node_modules/@turf/square/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/square/dist/esm/index.js +2 -2
- package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/square/package.json +9 -9
- package/node_modules/@turf/square-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/square-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/square-grid/package.json +12 -12
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +2 -2
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
- package/node_modules/@turf/tag/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tag/dist/esm/index.js +2 -2
- package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tag/package.json +11 -11
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tesselate/dist/esm/index.js +2 -2
- package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tesselate/package.json +8 -8
- package/node_modules/@turf/tin/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tin/dist/esm/index.js +2 -2
- package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tin/package.json +8 -8
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-rotate/dist/esm/index.js +2 -2
- package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-rotate/package.json +17 -17
- package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-scale/dist/esm/index.js +2 -2
- package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-scale/package.json +21 -21
- package/node_modules/@turf/transform-translate/README.md +8 -3
- package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +4 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +4 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.js +2 -2
- package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-translate/package.json +14 -14
- package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/triangle-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/triangle-grid/package.json +13 -13
- package/node_modules/@turf/truncate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/truncate/dist/esm/index.js +2 -2
- package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/truncate/package.json +10 -10
- package/node_modules/@turf/turf/package.json +125 -125
- package/node_modules/@turf/turf/turf.min.js +2 -11
- package/node_modules/@turf/union/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/union/dist/esm/index.js +2 -2
- package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/union/package.json +11 -11
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/unkink-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/unkink-polygon/package.json +13 -13
- package/node_modules/@turf/voronoi/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/voronoi/dist/esm/index.js +2 -2
- package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/voronoi/package.json +12 -12
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert/strict.d.ts +105 -2
- package/node_modules/@types/node/assert.d.ts +162 -101
- package/node_modules/@types/node/async_hooks.d.ts +26 -6
- package/node_modules/@types/node/buffer.buffer.d.ts +9 -0
- package/node_modules/@types/node/buffer.d.ts +15 -7
- package/node_modules/@types/node/child_process.d.ts +91 -164
- package/node_modules/@types/node/cluster.d.ts +19 -20
- package/node_modules/@types/node/console.d.ts +19 -18
- package/node_modules/@types/node/crypto.d.ts +1264 -356
- package/node_modules/@types/node/dgram.d.ts +10 -9
- package/node_modules/@types/node/diagnostics_channel.d.ts +18 -15
- package/node_modules/@types/node/dns/promises.d.ts +36 -9
- package/node_modules/@types/node/dns.d.ts +95 -37
- package/node_modules/@types/node/domain.d.ts +1 -1
- package/node_modules/@types/node/events.d.ts +81 -36
- package/node_modules/@types/node/fs/promises.d.ts +104 -59
- package/node_modules/@types/node/fs.d.ts +414 -137
- package/node_modules/@types/node/globals.d.ts +149 -350
- package/node_modules/@types/node/globals.typedarray.d.ts +20 -0
- package/node_modules/@types/node/http.d.ts +191 -37
- package/node_modules/@types/node/http2.d.ts +266 -67
- package/node_modules/@types/node/https.d.ts +97 -63
- package/node_modules/@types/node/index.d.ts +16 -7
- package/node_modules/@types/node/inspector.d.ts +206 -3931
- package/node_modules/@types/node/inspector.generated.d.ts +4233 -0
- package/node_modules/@types/node/module.d.ts +153 -31
- package/node_modules/@types/node/net.d.ts +36 -17
- package/node_modules/@types/node/os.d.ts +22 -10
- package/node_modules/@types/node/package.json +14 -84
- package/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/node/perf_hooks.d.ts +30 -18
- package/node_modules/@types/node/process.d.ts +40 -34
- package/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/node/readline/promises.d.ts +1 -2
- package/node_modules/@types/node/readline.d.ts +13 -13
- package/node_modules/@types/node/repl.d.ts +25 -17
- package/node_modules/@types/node/sea.d.ts +10 -1
- package/node_modules/@types/node/sqlite.d.ts +438 -9
- package/node_modules/@types/node/stream/consumers.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +13 -54
- package/node_modules/@types/node/stream.d.ts +68 -47
- package/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/node_modules/@types/node/test.d.ts +2034 -1975
- package/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/node/timers.d.ts +1 -3
- package/node_modules/@types/node/tls.d.ts +124 -114
- package/node_modules/@types/node/trace_events.d.ts +6 -6
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +17 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +18 -7
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
- package/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/node/url.d.ts +119 -34
- package/node_modules/@types/node/util.d.ts +46 -305
- package/node_modules/@types/node/v8.d.ts +100 -37
- package/node_modules/@types/node/vm.d.ts +299 -110
- package/node_modules/@types/node/wasi.d.ts +23 -2
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +225 -75
- package/node_modules/@types/node/zlib.d.ts +44 -33
- package/node_modules/axios/CHANGELOG.md +410 -288
- package/node_modules/axios/README.md +156 -51
- package/node_modules/axios/dist/axios.js +471 -330
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +407 -265
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +407 -265
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +723 -305
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +16 -5
- package/node_modules/axios/index.d.ts +17 -4
- package/node_modules/axios/lib/adapters/adapters.js +89 -42
- package/node_modules/axios/lib/adapters/fetch.js +221 -162
- package/node_modules/axios/lib/adapters/http.js +242 -42
- package/node_modules/axios/lib/adapters/xhr.js +11 -8
- package/node_modules/axios/lib/core/Axios.js +0 -2
- package/node_modules/axios/lib/core/AxiosError.js +10 -3
- package/node_modules/axios/lib/core/InterceptorManager.js +1 -1
- package/node_modules/axios/lib/core/dispatchRequest.js +1 -1
- package/node_modules/axios/lib/core/mergeConfig.js +4 -4
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +6 -0
- package/node_modules/axios/lib/helpers/bind.js +7 -0
- package/node_modules/axios/lib/helpers/buildURL.js +1 -3
- package/node_modules/axios/lib/helpers/cookies.js +24 -13
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
- package/node_modules/axios/lib/utils.js +5 -3
- package/node_modules/axios/package.json +26 -15
- package/node_modules/bignumber.js/CHANGELOG.md +6 -1
- package/node_modules/bignumber.js/README.md +5 -4
- package/node_modules/bignumber.js/bignumber.js +2 -2
- package/node_modules/bignumber.js/bignumber.mjs +2 -2
- package/node_modules/bignumber.js/package.json +1 -1
- package/node_modules/fast-xml-parser/CHANGELOG.md +9 -0
- package/node_modules/fast-xml-parser/README.md +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.d.cts +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
- package/node_modules/fast-xml-parser/package.json +1 -1
- package/node_modules/fast-xml-parser/src/fxp.d.ts +2 -2
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +1 -1
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +4 -4
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +297 -287
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +24 -12
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +4 -4
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/form-data/CHANGELOG.md +60 -2
- package/node_modules/form-data/README.md +4 -4
- package/node_modules/form-data/lib/form_data.js +2 -2
- package/node_modules/form-data/package.json +4 -4
- package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.min.js +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.json +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +2 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/undici-types/agent.d.ts +12 -11
- package/node_modules/undici-types/api.d.ts +24 -24
- package/node_modules/undici-types/balanced-pool.d.ts +11 -11
- package/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +18 -18
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/node_modules/undici-types/dispatcher.d.ts +119 -99
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +66 -54
- package/node_modules/undici-types/eventsource.d.ts +9 -4
- package/node_modules/undici-types/fetch.d.ts +18 -16
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +56 -47
- package/node_modules/undici-types/interceptors.d.ts +30 -8
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +21 -20
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +14 -12
- package/node_modules/undici-types/proxy-agent.d.ts +5 -4
- package/node_modules/undici-types/readable.d.ts +18 -15
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +142 -29
- package/node_modules/undici-types/websocket.d.ts +38 -2
- package/node_modules/uuid/README.md +8 -19
- package/node_modules/uuid/dist/{esm-browser/uuid-bin.js → uuid-bin.js} +1 -1
- package/node_modules/uuid/dist/{esm-browser/v4.js → v4.js} +7 -4
- package/node_modules/uuid/{dist/esm → dist-node}/md5.js +1 -1
- package/node_modules/uuid/dist-node/native.js +2 -0
- package/node_modules/uuid/{dist/esm → dist-node}/rng.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/sha1.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/uuid-bin.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/v4.js +7 -4
- package/node_modules/uuid/package.json +28 -41
- package/package.json +7 -7
- package/tak-registration.bak +557 -0
- package/tak-registration.js +19 -19
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/marchingsquares/.eslintrc.json +0 -81
- package/node_modules/marchingsquares/Changelog.md +0 -81
- package/node_modules/marchingsquares/LICENSE.md +0 -37
- package/node_modules/marchingsquares/README.md +0 -312
- package/node_modules/marchingsquares/VERSION +0 -1
- package/node_modules/marchingsquares/agpl-3.0.txt +0 -661
- package/node_modules/marchingsquares/dist/marchingsquares-esm.js +0 -3410
- package/node_modules/marchingsquares/dist/marchingsquares-isobands.js +0 -2513
- package/node_modules/marchingsquares/dist/marchingsquares-isobands.min.js +0 -9
- package/node_modules/marchingsquares/dist/marchingsquares-isocontours.js +0 -1209
- package/node_modules/marchingsquares/dist/marchingsquares-isocontours.min.js +0 -9
- package/node_modules/marchingsquares/dist/marchingsquares-isolines.js +0 -1209
- package/node_modules/marchingsquares/dist/marchingsquares-isolines.min.js +0 -9
- package/node_modules/marchingsquares/dist/marchingsquares.js +0 -3424
- package/node_modules/marchingsquares/dist/marchingsquares.min.js +0 -9
- package/node_modules/marchingsquares/examples/contour/index.html +0 -117
- package/node_modules/marchingsquares/examples/editor/draw-lines.js +0 -60
- package/node_modules/marchingsquares/examples/editor/index.html +0 -39
- package/node_modules/marchingsquares/examples/editor/script.js +0 -110
- package/node_modules/marchingsquares/examples/editor/styles.css +0 -37
- package/node_modules/marchingsquares/examples/require/app.js +0 -9
- package/node_modules/marchingsquares/examples/require/index.html +0 -14
- package/node_modules/marchingsquares/examples/require/main.js +0 -98
- package/node_modules/marchingsquares/examples/require/require.js +0 -5
- package/node_modules/marchingsquares/examples/simple/index.html +0 -115
- package/node_modules/marchingsquares/examples/vienna/index.html +0 -229
- package/node_modules/marchingsquares/examples/vienna/vienna_basin.png +0 -0
- package/node_modules/marchingsquares/examples/vienna/vienna_data.js +0 -514
- package/node_modules/marchingsquares/package.json +0 -47
- package/node_modules/marchingsquares/rollup.config.js +0 -122
- package/node_modules/marchingsquares/rollup.config.test.js +0 -14
- package/node_modules/marchingsquares/src/interpolation.js +0 -84
- package/node_modules/marchingsquares/src/isobands.js +0 -1883
- package/node_modules/marchingsquares/src/isolines.js +0 -638
- package/node_modules/marchingsquares/src/main.js +0 -4
- package/node_modules/marchingsquares/src/options.js +0 -80
- package/node_modules/marchingsquares/src/polygons.js +0 -531
- package/node_modules/marchingsquares/src/quadtree.js +0 -228
- package/node_modules/marchingsquares/test/data/in/isoBands-example-case.json +0 -14
- package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-0_3.json +0 -12
- package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-3_5.json +0 -12
- package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-5_7.json +0 -12
- package/node_modules/marchingsquares/test/data/in/isoBands-minimal.json +0 -8
- package/node_modules/marchingsquares/test/data/in/isoBands-simple.json +0 -9
- package/node_modules/marchingsquares/test/data/in/isoLines-example-case.json +0 -13
- package/node_modules/marchingsquares/test/data/in/isoLines-simple.json +0 -8
- package/node_modules/marchingsquares/test/data/out/isoBands-example-case.json +0 -72
- package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-0_3.json +0 -9
- package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-3_5.json +0 -36
- package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-5_7.json +0 -8
- package/node_modules/marchingsquares/test/data/out/isoBands-minimal.json +0 -10
- package/node_modules/marchingsquares/test/data/out/isoBands-simple.json +0 -25
- package/node_modules/marchingsquares/test/data/out/isoLines-example-case.json +0 -481
- package/node_modules/marchingsquares/test/data/out/isoLines-simple.json +0 -8
- package/node_modules/marchingsquares/test/test.js +0 -152
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/uuid/dist/cjs/index.d.ts +0 -15
- package/node_modules/uuid/dist/cjs/index.js +0 -31
- package/node_modules/uuid/dist/cjs/max.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/max.js +0 -3
- package/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/md5.js +0 -13
- package/node_modules/uuid/dist/cjs/native.d.ts +0 -6
- package/node_modules/uuid/dist/cjs/native.js +0 -4
- package/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/nil.js +0 -3
- package/node_modules/uuid/dist/cjs/package.json +0 -1
- package/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/parse.js +0 -11
- package/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/regex.js +0 -3
- package/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/rng.js +0 -13
- package/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/sha1.js +0 -13
- package/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/cjs/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs/types.d.ts +0 -21
- package/node_modules/uuid/dist/cjs/types.js +0 -2
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
- package/node_modules/uuid/dist/cjs/v1.js +0 -87
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v3.js +0 -14
- package/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
- package/node_modules/uuid/dist/cjs/v35.js +0 -41
- package/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v4.js +0 -29
- package/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v5.js +0 -14
- package/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v6.js +0 -19
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v7.js +0 -69
- package/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/validate.js +0 -7
- package/node_modules/uuid/dist/cjs/version.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/version.js +0 -10
- package/node_modules/uuid/dist/cjs-browser/index.js +0 -31
- package/node_modules/uuid/dist/cjs-browser/max.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
- package/node_modules/uuid/dist/cjs-browser/native.js +0 -4
- package/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/package.json +0 -1
- package/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
- package/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs-browser/types.js +0 -2
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v35.js +0 -41
- package/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
- package/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v6.js +0 -19
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
- package/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
- package/node_modules/uuid/dist/cjs-browser/version.js +0 -10
- package/node_modules/uuid/dist/esm/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm/md5.d.ts +0 -4
- package/node_modules/uuid/dist/esm/native.d.ts +0 -6
- package/node_modules/uuid/dist/esm/native.js +0 -2
- package/node_modules/uuid/dist/esm/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm/version.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
- /package/node_modules/uuid/dist/{cjs-browser/index.d.ts → index.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/index.js → index.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/max.d.ts → max.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/max.js → max.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/md5.d.ts → md5.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/md5.js → md5.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/native.d.ts → native.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/native.js → native.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/nil.d.ts → nil.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/nil.js → nil.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/parse.d.ts → parse.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/parse.js → parse.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/regex.d.ts → regex.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/regex.js → regex.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/rng.d.ts → rng.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/rng.js → rng.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/sha1.d.ts → sha1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/sha1.js → sha1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/stringify.d.ts → stringify.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/stringify.js → stringify.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/types.d.ts → types.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/types.js → types.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/uuid-bin.d.ts → uuid-bin.d.ts} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v1.d.ts → v1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v1.js → v1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v1ToV6.d.ts → v1ToV6.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v1ToV6.js → v1ToV6.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v3.d.ts → v3.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v3.js → v3.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v35.d.ts → v35.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v35.js → v35.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v4.d.ts → v4.d.ts} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v5.d.ts → v5.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v5.js → v5.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v6.d.ts → v6.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v6.js → v6.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v6ToV1.d.ts → v6ToV1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v6ToV1.js → v6ToV1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v7.d.ts → v7.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v7.js → v7.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/validate.d.ts → validate.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/validate.js → validate.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/version.d.ts → version.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/version.js → version.js} +0 -0
- /package/node_modules/uuid/{dist/esm → dist-node}/bin/uuid +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/index.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/max.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/nil.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/parse.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/regex.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/stringify.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/types.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1ToV6.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v3.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v35.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v5.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6ToV1.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v7.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/validate.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/version.js +0 -0
|
@@ -21,9 +21,9 @@ function booleanConcave(polygon) {
|
|
|
21
21
|
}
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
|
-
var
|
|
24
|
+
var index_default = booleanConcave;
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.booleanConcave = booleanConcave; exports.default =
|
|
28
|
+
exports.booleanConcave = booleanConcave; exports.default = index_default;
|
|
29
29
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-concave/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,4CAAwB;AAcxB,SAAS,cAAA,CAAe,OAAA,EAAqC;AAE3D,EAAA,MAAM,OAAA,EAAS,gCAAA,OAAe,CAAA,CAAE,WAAA;AAChC,EAAA,GAAA,CAAI,MAAA,CAAO,CAAC,CAAA,CAAE,OAAA,GAAU,CAAA,EAAG;AACzB,IAAA,OAAO,KAAA;AAAA,EACT;AAEA,EAAA,IAAI,KAAA,EAAO,KAAA;AACX,EAAA,MAAM,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,CAAE,OAAA,EAAS,CAAA;AAC7B,EAAA,IAAA,CAAA,IAAS,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,CAAA,EAAG,CAAA,EAAA,EAAK;AAC1B,IAAA,MAAM,IAAA,EAAM,MAAA,CAAO,CAAC,CAAA,CAAA,CAAG,EAAA,EAAI,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAC,EAAA,E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M,IAAA,EAAM,IAAA,EAAM,GAAA;AACxC,IAAA,GAAA,CAAI,EAAA,IAAM,CAAA,EAAG;AACX,MAAA,KAAA,EAAO,cAAA,EAAgB,CAAA;AAAA,IACzB,EAAA,KAAA,GAAA,CAAW,KAAA,IAAS,cAAA,EAAgB,CAAA,EAAG;AACrC,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF;AACA,EAAA,OAAO,KAAA;AACT;AAGA,IAAO,cAAA,EAAQ,cAAA;ADhBf;AACE;AACA;AACF,yEAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-concave/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Polygon } from \"geojson\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Takes a polygon and return true or false as to whether it is concave or not.\n *\n * @function\n * @param {Feature<Polygon>} polygon to be evaluated\n * @returns {boolean} true/false\n * @example\n * var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n *\n * turf.booleanConcave(convexPolygon)\n * //=false\n */\nfunction booleanConcave(polygon: Feature<Polygon> | Polygon) {\n // Taken from https://stackoverflow.com/a/1881201 & https://stackoverflow.com/a/25304159\n const coords = getGeom(polygon).coordinates;\n if (coords[0].length <= 4) {\n return false;\n }\n\n let sign = false;\n const n = coords[0].length - 1;\n for (let i = 0; i < n; i++) {\n const dx1 = coords[0][(i + 2) % n][0] - coords[0][(i + 1) % n][0];\n const dy1 = coords[0][(i + 2) % n][1] - coords[0][(i + 1) % n][1];\n const dx2 = coords[0][i][0] - coords[0][(i + 1) % n][0];\n const dy2 = coords[0][i][1] - coords[0][(i + 1) % n][1];\n const zcrossproduct = dx1 * dy2 - dy1 * dx2;\n if (i === 0) {\n sign = zcrossproduct > 0;\n } else if (sign !== zcrossproduct > 0) {\n return true;\n }\n }\n return false;\n}\n\nexport { booleanConcave };\nexport default booleanConcave;\n"]}
|
|
@@ -21,9 +21,9 @@ function booleanConcave(polygon) {
|
|
|
21
21
|
}
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
|
-
var
|
|
24
|
+
var index_default = booleanConcave;
|
|
25
25
|
export {
|
|
26
26
|
booleanConcave,
|
|
27
|
-
|
|
27
|
+
index_default as default
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Polygon } from \"geojson\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Takes a polygon and return true or false as to whether it is concave or not.\n *\n * @function\n * @param {Feature<Polygon>} polygon to be evaluated\n * @returns {boolean} true/false\n * @example\n * var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n *\n * turf.booleanConcave(convexPolygon)\n * //=false\n */\nfunction booleanConcave(polygon: Feature<Polygon> | Polygon) {\n // Taken from https://stackoverflow.com/a/1881201 & https://stackoverflow.com/a/25304159\n const coords = getGeom(polygon).coordinates;\n if (coords[0].length <= 4) {\n return false;\n }\n\n let sign = false;\n const n = coords[0].length - 1;\n for (let i = 0; i < n; i++) {\n const dx1 = coords[0][(i + 2) % n][0] - coords[0][(i + 1) % n][0];\n const dy1 = coords[0][(i + 2) % n][1] - coords[0][(i + 1) % n][1];\n const dx2 = coords[0][i][0] - coords[0][(i + 1) % n][0];\n const dy2 = coords[0][i][1] - coords[0][(i + 1) % n][1];\n const zcrossproduct = dx1 * dy2 - dy1 * dx2;\n if (i === 0) {\n sign = zcrossproduct > 0;\n } else if (sign !== zcrossproduct > 0) {\n return true;\n }\n }\n return false;\n}\n\nexport { booleanConcave };\nexport default booleanConcave;\n"],"mappings":";AACA,SAAS,eAAe;AAcxB,SAAS,eAAe,SAAqC;AAE3D,QAAM,SAAS,QAAQ,OAAO,EAAE;AAChC,MAAI,OAAO,CAAC,EAAE,UAAU,GAAG;AACzB,WAAO;AAAA,EACT;AAEA,MAAI,OAAO;AACX,QAAM,IAAI,OAAO,CAAC,EAAE,SAAS;AAC7B,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AAC1B,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,gBAAgB,MAAM,MAAM,MAAM;AACxC,QAAI,MAAM,GAAG;AACX,aAAO,gBAAgB;AAAA,IACzB,WAAW,SAAS,gBAAgB,GAAG;AACrC,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAGA,IAAO
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Polygon } from \"geojson\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Takes a polygon and return true or false as to whether it is concave or not.\n *\n * @function\n * @param {Feature<Polygon>} polygon to be evaluated\n * @returns {boolean} true/false\n * @example\n * var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n *\n * turf.booleanConcave(convexPolygon)\n * //=false\n */\nfunction booleanConcave(polygon: Feature<Polygon> | Polygon) {\n // Taken from https://stackoverflow.com/a/1881201 & https://stackoverflow.com/a/25304159\n const coords = getGeom(polygon).coordinates;\n if (coords[0].length <= 4) {\n return false;\n }\n\n let sign = false;\n const n = coords[0].length - 1;\n for (let i = 0; i < n; i++) {\n const dx1 = coords[0][(i + 2) % n][0] - coords[0][(i + 1) % n][0];\n const dy1 = coords[0][(i + 2) % n][1] - coords[0][(i + 1) % n][1];\n const dx2 = coords[0][i][0] - coords[0][(i + 1) % n][0];\n const dy2 = coords[0][i][1] - coords[0][(i + 1) % n][1];\n const zcrossproduct = dx1 * dy2 - dy1 * dx2;\n if (i === 0) {\n sign = zcrossproduct > 0;\n } else if (sign !== zcrossproduct > 0) {\n return true;\n }\n }\n return false;\n}\n\nexport { booleanConcave };\nexport default booleanConcave;\n"],"mappings":";AACA,SAAS,eAAe;AAcxB,SAAS,eAAe,SAAqC;AAE3D,QAAM,SAAS,QAAQ,OAAO,EAAE;AAChC,MAAI,OAAO,CAAC,EAAE,UAAU,GAAG;AACzB,WAAO;AAAA,EACT;AAEA,MAAI,OAAO;AACX,QAAM,IAAI,OAAO,CAAC,EAAE,SAAS;AAC7B,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AAC1B,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AAChE,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;AACtD,UAAM,gBAAgB,MAAM,MAAM,MAAM;AACxC,QAAI,MAAM,GAAG;AACX,aAAO,gBAAgB;AAAA,IACzB,WAAW,SAAS,gBAAgB,GAAG;AACrC,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAGA,IAAO,gBAAQ;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/boolean-concave",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"description": "Takes a polygon and return true or false as to whether it is concave or not.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rowan Winsemius <@rowanwins>"
|
|
@@ -56,21 +56,21 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/benchmark": "^2.1.5",
|
|
59
|
-
"@types/tape": "^
|
|
59
|
+
"@types/tape": "^5.8.1",
|
|
60
60
|
"benchmark": "^2.1.4",
|
|
61
|
-
"glob": "^
|
|
61
|
+
"glob": "^11.0.2",
|
|
62
62
|
"load-json-file": "^7.0.1",
|
|
63
63
|
"npm-run-all": "^4.1.5",
|
|
64
64
|
"tape": "^5.9.0",
|
|
65
|
-
"tsup": "^8.
|
|
66
|
-
"tsx": "^4.19.
|
|
67
|
-
"typescript": "^5.
|
|
65
|
+
"tsup": "^8.4.0",
|
|
66
|
+
"tsx": "^4.19.4",
|
|
67
|
+
"typescript": "^5.8.3"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@turf/helpers": "
|
|
71
|
-
"@turf/invariant": "
|
|
70
|
+
"@turf/helpers": "7.3.0",
|
|
71
|
+
"@turf/invariant": "7.3.0",
|
|
72
72
|
"@types/geojson": "^7946.0.10",
|
|
73
73
|
"tslib": "^2.8.1"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
|
|
76
76
|
}
|
|
@@ -197,7 +197,7 @@ function compareCoords(pair1, pair2) {
|
|
|
197
197
|
function getMidpoint(pair1, pair2) {
|
|
198
198
|
return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];
|
|
199
199
|
}
|
|
200
|
-
var
|
|
200
|
+
var index_default = booleanContains;
|
|
201
201
|
|
|
202
202
|
|
|
203
203
|
|
|
@@ -212,5 +212,5 @@ var turf_boolean_contains_default = booleanContains;
|
|
|
212
212
|
|
|
213
213
|
|
|
214
214
|
|
|
215
|
-
exports.booleanContains = booleanContains; exports.compareCoords = compareCoords; exports.default =
|
|
215
|
+
exports.booleanContains = booleanContains; exports.compareCoords = compareCoords; exports.default = index_default; exports.doBBoxOverlap = doBBoxOverlap; exports.getMidpoint = getMidpoint; exports.isLineInPoly = isLineInPoly; exports.isLineOnLine = isLineOnLine; exports.isMultiPointInMultiPoint = isMultiPointInMultiPoint; exports.isMultiPointInPoly = isMultiPointInPoly; exports.isMultiPointOnLine = isMultiPointOnLine; exports.isPointInMultiPoint = isPointInMultiPoint; exports.isPolyInPoly = isPolyInPoly; exports.isPolygonInMultiPolygon = isPolygonInMultiPolygon;
|
|
216
216
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-contains/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACUA,kCAAiC;AACjC,uEAAsC;AACtC,iEAAoD;AACpD,4CAAwB;AAmBxB,SAAS,eAAA,CACP,QAAA,EACA,QAAA,EACA;AACA,EAAA,MAAM,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC9B,EAAA,MAAM,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC9B,EAAA,MAAM,MAAA,EAAQ,KAAA,CAAM,IAAA;AACpB,EAAA,MAAM,MAAA,EAAQ,KAAA,CAAM,IAAA;AACpB,EAAA,MAAM,QAAA,EAAU,KAAA,CAAM,WAAA;AACtB,EAAA,MAAM,QAAA,EAAU,KAAA,CAAM,WAAA;AAEtB,EAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,IACb,KAAK,OAAA;AACH,MAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,QACb,KAAK,OAAA;AACH,UAAA,OAAO,aAAA,CAAc,OAAA,EAAS,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A,CAAI,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AACvB,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,GAAA,CAAI,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AACvB,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,GAAA,CAAI,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AACvB,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,OAAO,IAAA;AACT;AAUA,SAAS,aAAA,CAAc,KAAA,EAAiB,KAAA,EAAiB;AACvD,EAAA,OAAO,KAAA,CAAM,CAAC,EAAA,IAAM,KAAA,CAAM,CAAC,EAAA,GAAK,KAAA,CAAM,CAAC,EAAA,IAAM,KAAA,CAAM,CAAC,CAAA;AACtD;AAEA,SAAS,WAAA,CAAY,KAAA,EAAiB,KAAA,EAAiB;AACrD,EAAA,OAAO,CAAA,CAAE,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAA,EAAK,CAAA,EAAA,CAAI,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA;AAC9D;AAiBA,IAAO,8BAAA,EAAQ,eAAA;AD1Ff;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wkBAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-contains/dist/cjs/index.cjs","sourcesContent":[null,"import {\n BBox,\n Feature,\n Geometry,\n LineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { bbox as calcBbox } from \"@turf/bbox\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { booleanPointOnLine as isPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n) {\n const geom1 = getGeom(feature1);\n const geom2 = getGeom(feature2);\n const type1 = geom1.type;\n const type2 = geom2.type;\n const coords1 = geom1.coordinates;\n const coords2 = geom2.coordinates;\n\n switch (type1) {\n case \"Point\":\n switch (type2) {\n case \"Point\":\n return compareCoords(coords1, coords2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPoint\":\n switch (type2) {\n case \"Point\":\n return isPointInMultiPoint(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInMultiPoint(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"Point\":\n return isPointOnLine(geom2, geom1, { ignoreEndVertices: true });\n case \"LineString\":\n return isLineOnLine(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointOnLine(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"Point\":\n return booleanPointInPolygon(geom2, geom1, { ignoreBoundary: true });\n case \"LineString\":\n return isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return isPolyInPoly(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPolygon\":\n switch (type2) {\n case \"Polygon\":\n return isPolygonInMultiPolygon(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction isPolygonInMultiPolygon(multiPolygon: MultiPolygon, polygon: Polygon) {\n return multiPolygon.coordinates.some((coords) =>\n isPolyInPoly({ type: \"Polygon\", coordinates: coords }, polygon)\n );\n}\n\nfunction isPointInMultiPoint(multiPoint: MultiPoint, pt: Point) {\n let i;\n let output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], pt.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\n\nfunction isMultiPointInMultiPoint(\n multiPoint1: MultiPoint,\n multiPoint2: MultiPoint\n) {\n for (const coord2 of multiPoint2.coordinates) {\n let matchFound = false;\n for (const coord1 of multiPoint1.coordinates) {\n if (compareCoords(coord2, coord1)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\n\nfunction isMultiPointOnLine(lineString: LineString, multiPoint: MultiPoint) {\n let haveFoundInteriorPoint = false;\n for (const coord of multiPoint.coordinates) {\n if (isPointOnLine(coord, lineString, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!isPointOnLine(coord, lineString)) {\n return false;\n }\n }\n if (haveFoundInteriorPoint) {\n return true;\n }\n return false;\n}\n\nfunction isMultiPointInPoly(polygon: Polygon, multiPoint: MultiPoint) {\n for (const coord of multiPoint.coordinates) {\n if (!booleanPointInPolygon(coord, polygon, { ignoreBoundary: true })) {\n return false;\n }\n }\n return true;\n}\n\nfunction isLineOnLine(lineString1: LineString, lineString2: LineString) {\n let haveFoundInteriorPoint = false;\n for (const coords of lineString2.coordinates) {\n if (\n isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: true,\n })\n ) {\n haveFoundInteriorPoint = true;\n }\n if (\n !isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: false,\n })\n ) {\n return false;\n }\n }\n return haveFoundInteriorPoint;\n}\n\nfunction isLineInPoly(polygon: Polygon, linestring: LineString) {\n let output = false;\n let i = 0;\n\n const polyBbox = calcBbox(polygon);\n const lineBbox = calcBbox(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n for (i; i < linestring.coordinates.length - 1; i++) {\n const midPoint = getMidpoint(\n linestring.coordinates[i],\n linestring.coordinates[i + 1]\n );\n if (\n booleanPointInPolygon({ type: \"Point\", coordinates: midPoint }, polygon, {\n ignoreBoundary: true,\n })\n ) {\n output = true;\n break;\n }\n }\n return output;\n}\n\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(\n feature1: Feature<Polygon> | Polygon,\n feature2: Feature<Polygon> | Polygon\n) {\n // Handle Nulls\n if (feature1.type === \"Feature\" && feature1.geometry === null) {\n return false;\n }\n if (feature2.type === \"Feature\" && feature2.geometry === null) {\n return false;\n }\n\n const poly1Bbox = calcBbox(feature1);\n const poly2Bbox = calcBbox(feature2);\n if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n return false;\n }\n\n const coords = getGeom(feature2).coordinates;\n for (const ring of coords) {\n for (const coord of ring) {\n if (!booleanPointInPolygon(coord, feature1)) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction doBBoxOverlap(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] > bbox2[0]) {\n return false;\n }\n if (bbox1[2] < bbox2[2]) {\n return false;\n }\n if (bbox1[1] > bbox2[1]) {\n return false;\n }\n if (bbox1[3] < bbox2[3]) {\n return false;\n }\n return true;\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1: number[], pair2: number[]) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nfunction getMidpoint(pair1: number[], pair2: number[]) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\n\nexport {\n booleanContains,\n isPolygonInMultiPolygon,\n isPointInMultiPoint,\n isMultiPointInMultiPoint,\n isMultiPointOnLine,\n isMultiPointInPoly,\n isLineOnLine,\n isLineInPoly,\n isPolyInPoly,\n doBBoxOverlap,\n compareCoords,\n getMidpoint,\n};\n\nexport default booleanContains;\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-contains/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACUA,kCAAiC;AACjC,uEAAsC;AACtC,iEAAoD;AACpD,4CAAwB;AAmBxB,SAAS,eAAA,CACP,QAAA,EACA,QAAA,EACA;AACA,EAAA,MAAM,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC9B,EAAA,MAAM,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC9B,EAAA,MAAM,MAAA,EAAQ,KAAA,CAAM,IAAA;AACpB,EAAA,MAAM,MAAA,EAAQ,KAAA,CAAM,IAAA;AACpB,EAAA,MAAM,QAAA,EAAU,KAAA,CAAM,WAAA;AACtB,EAAA,MAAM,QAAA,EAAU,KAAA,CAAM,WAAA;AAEtB,EAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,IACb,KAAK,OAAA;AACH,MAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,QACb,KAAK,OAAA;AACH,UAAA,OAAO,aAAA,CAAc,OAAA,EAAS,OAAO,CAAA;AAAA,QACvC,OAAA;AACE,UAAA,MAAM,IAAI,KAAA,CAAM,YAAA,EAAc,MAAA,EAAQ,yBAAyB,CAAA;AAAA,MACnE;AAAA,IACF,KAAK,YAAA;AAC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C,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AACvB,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,GAAA,CAAI,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AACvB,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,OAAO,IAAA;AACT;AAUA,SAAS,aAAA,CAAc,KAAA,EAAiB,KAAA,EAAiB;AACvD,EAAA,OAAO,KAAA,CAAM,CAAC,EAAA,IAAM,KAAA,CAAM,CAAC,EAAA,GAAK,KAAA,CAAM,CAAC,EAAA,IAAM,KAAA,CAAM,CAAC,CAAA;AACtD;AAEA,SAAS,WAAA,CAAY,KAAA,EAAiB,KAAA,EAAiB;AACrD,EAAA,OAAO,CAAA,CAAE,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAA,EAAK,CAAA,EAAA,CAAI,KAAA,CAAM,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA;AAC9D;AAiBA,IAAO,cAAA,EAAQ,eAAA;AD1Ff;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wjBAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-contains/dist/cjs/index.cjs","sourcesContent":[null,"import {\n BBox,\n Feature,\n Geometry,\n LineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { bbox as calcBbox } from \"@turf/bbox\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { booleanPointOnLine as isPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n) {\n const geom1 = getGeom(feature1);\n const geom2 = getGeom(feature2);\n const type1 = geom1.type;\n const type2 = geom2.type;\n const coords1 = geom1.coordinates;\n const coords2 = geom2.coordinates;\n\n switch (type1) {\n case \"Point\":\n switch (type2) {\n case \"Point\":\n return compareCoords(coords1, coords2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPoint\":\n switch (type2) {\n case \"Point\":\n return isPointInMultiPoint(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInMultiPoint(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"Point\":\n return isPointOnLine(geom2, geom1, { ignoreEndVertices: true });\n case \"LineString\":\n return isLineOnLine(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointOnLine(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"Point\":\n return booleanPointInPolygon(geom2, geom1, { ignoreBoundary: true });\n case \"LineString\":\n return isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return isPolyInPoly(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPolygon\":\n switch (type2) {\n case \"Polygon\":\n return isPolygonInMultiPolygon(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction isPolygonInMultiPolygon(multiPolygon: MultiPolygon, polygon: Polygon) {\n return multiPolygon.coordinates.some((coords) =>\n isPolyInPoly({ type: \"Polygon\", coordinates: coords }, polygon)\n );\n}\n\nfunction isPointInMultiPoint(multiPoint: MultiPoint, pt: Point) {\n let i;\n let output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], pt.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\n\nfunction isMultiPointInMultiPoint(\n multiPoint1: MultiPoint,\n multiPoint2: MultiPoint\n) {\n for (const coord2 of multiPoint2.coordinates) {\n let matchFound = false;\n for (const coord1 of multiPoint1.coordinates) {\n if (compareCoords(coord2, coord1)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\n\nfunction isMultiPointOnLine(lineString: LineString, multiPoint: MultiPoint) {\n let haveFoundInteriorPoint = false;\n for (const coord of multiPoint.coordinates) {\n if (isPointOnLine(coord, lineString, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!isPointOnLine(coord, lineString)) {\n return false;\n }\n }\n if (haveFoundInteriorPoint) {\n return true;\n }\n return false;\n}\n\nfunction isMultiPointInPoly(polygon: Polygon, multiPoint: MultiPoint) {\n for (const coord of multiPoint.coordinates) {\n if (!booleanPointInPolygon(coord, polygon, { ignoreBoundary: true })) {\n return false;\n }\n }\n return true;\n}\n\nfunction isLineOnLine(lineString1: LineString, lineString2: LineString) {\n let haveFoundInteriorPoint = false;\n for (const coords of lineString2.coordinates) {\n if (\n isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: true,\n })\n ) {\n haveFoundInteriorPoint = true;\n }\n if (\n !isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: false,\n })\n ) {\n return false;\n }\n }\n return haveFoundInteriorPoint;\n}\n\nfunction isLineInPoly(polygon: Polygon, linestring: LineString) {\n let output = false;\n let i = 0;\n\n const polyBbox = calcBbox(polygon);\n const lineBbox = calcBbox(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n for (i; i < linestring.coordinates.length - 1; i++) {\n const midPoint = getMidpoint(\n linestring.coordinates[i],\n linestring.coordinates[i + 1]\n );\n if (\n booleanPointInPolygon({ type: \"Point\", coordinates: midPoint }, polygon, {\n ignoreBoundary: true,\n })\n ) {\n output = true;\n break;\n }\n }\n return output;\n}\n\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(\n feature1: Feature<Polygon> | Polygon,\n feature2: Feature<Polygon> | Polygon\n) {\n // Handle Nulls\n if (feature1.type === \"Feature\" && feature1.geometry === null) {\n return false;\n }\n if (feature2.type === \"Feature\" && feature2.geometry === null) {\n return false;\n }\n\n const poly1Bbox = calcBbox(feature1);\n const poly2Bbox = calcBbox(feature2);\n if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n return false;\n }\n\n const coords = getGeom(feature2).coordinates;\n for (const ring of coords) {\n for (const coord of ring) {\n if (!booleanPointInPolygon(coord, feature1)) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction doBBoxOverlap(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] > bbox2[0]) {\n return false;\n }\n if (bbox1[2] < bbox2[2]) {\n return false;\n }\n if (bbox1[1] > bbox2[1]) {\n return false;\n }\n if (bbox1[3] < bbox2[3]) {\n return false;\n }\n return true;\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1: number[], pair2: number[]) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nfunction getMidpoint(pair1: number[], pair2: number[]) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\n\nexport {\n booleanContains,\n isPolygonInMultiPolygon,\n isPointInMultiPoint,\n isMultiPointInMultiPoint,\n isMultiPointOnLine,\n isMultiPointInPoly,\n isLineOnLine,\n isLineInPoly,\n isPolyInPoly,\n doBBoxOverlap,\n compareCoords,\n getMidpoint,\n};\n\nexport default booleanContains;\n"]}
|
|
@@ -197,11 +197,11 @@ function compareCoords(pair1, pair2) {
|
|
|
197
197
|
function getMidpoint(pair1, pair2) {
|
|
198
198
|
return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];
|
|
199
199
|
}
|
|
200
|
-
var
|
|
200
|
+
var index_default = booleanContains;
|
|
201
201
|
export {
|
|
202
202
|
booleanContains,
|
|
203
203
|
compareCoords,
|
|
204
|
-
|
|
204
|
+
index_default as default,
|
|
205
205
|
doBBoxOverlap,
|
|
206
206
|
getMidpoint,
|
|
207
207
|
isLineInPoly,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n Feature,\n Geometry,\n LineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { bbox as calcBbox } from \"@turf/bbox\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { booleanPointOnLine as isPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n) {\n const geom1 = getGeom(feature1);\n const geom2 = getGeom(feature2);\n const type1 = geom1.type;\n const type2 = geom2.type;\n const coords1 = geom1.coordinates;\n const coords2 = geom2.coordinates;\n\n switch (type1) {\n case \"Point\":\n switch (type2) {\n case \"Point\":\n return compareCoords(coords1, coords2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPoint\":\n switch (type2) {\n case \"Point\":\n return isPointInMultiPoint(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInMultiPoint(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"Point\":\n return isPointOnLine(geom2, geom1, { ignoreEndVertices: true });\n case \"LineString\":\n return isLineOnLine(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointOnLine(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"Point\":\n return booleanPointInPolygon(geom2, geom1, { ignoreBoundary: true });\n case \"LineString\":\n return isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return isPolyInPoly(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPolygon\":\n switch (type2) {\n case \"Polygon\":\n return isPolygonInMultiPolygon(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction isPolygonInMultiPolygon(multiPolygon: MultiPolygon, polygon: Polygon) {\n return multiPolygon.coordinates.some((coords) =>\n isPolyInPoly({ type: \"Polygon\", coordinates: coords }, polygon)\n );\n}\n\nfunction isPointInMultiPoint(multiPoint: MultiPoint, pt: Point) {\n let i;\n let output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], pt.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\n\nfunction isMultiPointInMultiPoint(\n multiPoint1: MultiPoint,\n multiPoint2: MultiPoint\n) {\n for (const coord2 of multiPoint2.coordinates) {\n let matchFound = false;\n for (const coord1 of multiPoint1.coordinates) {\n if (compareCoords(coord2, coord1)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\n\nfunction isMultiPointOnLine(lineString: LineString, multiPoint: MultiPoint) {\n let haveFoundInteriorPoint = false;\n for (const coord of multiPoint.coordinates) {\n if (isPointOnLine(coord, lineString, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!isPointOnLine(coord, lineString)) {\n return false;\n }\n }\n if (haveFoundInteriorPoint) {\n return true;\n }\n return false;\n}\n\nfunction isMultiPointInPoly(polygon: Polygon, multiPoint: MultiPoint) {\n for (const coord of multiPoint.coordinates) {\n if (!booleanPointInPolygon(coord, polygon, { ignoreBoundary: true })) {\n return false;\n }\n }\n return true;\n}\n\nfunction isLineOnLine(lineString1: LineString, lineString2: LineString) {\n let haveFoundInteriorPoint = false;\n for (const coords of lineString2.coordinates) {\n if (\n isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: true,\n })\n ) {\n haveFoundInteriorPoint = true;\n }\n if (\n !isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: false,\n })\n ) {\n return false;\n }\n }\n return haveFoundInteriorPoint;\n}\n\nfunction isLineInPoly(polygon: Polygon, linestring: LineString) {\n let output = false;\n let i = 0;\n\n const polyBbox = calcBbox(polygon);\n const lineBbox = calcBbox(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n for (i; i < linestring.coordinates.length - 1; i++) {\n const midPoint = getMidpoint(\n linestring.coordinates[i],\n linestring.coordinates[i + 1]\n );\n if (\n booleanPointInPolygon({ type: \"Point\", coordinates: midPoint }, polygon, {\n ignoreBoundary: true,\n })\n ) {\n output = true;\n break;\n }\n }\n return output;\n}\n\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(\n feature1: Feature<Polygon> | Polygon,\n feature2: Feature<Polygon> | Polygon\n) {\n // Handle Nulls\n if (feature1.type === \"Feature\" && feature1.geometry === null) {\n return false;\n }\n if (feature2.type === \"Feature\" && feature2.geometry === null) {\n return false;\n }\n\n const poly1Bbox = calcBbox(feature1);\n const poly2Bbox = calcBbox(feature2);\n if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n return false;\n }\n\n const coords = getGeom(feature2).coordinates;\n for (const ring of coords) {\n for (const coord of ring) {\n if (!booleanPointInPolygon(coord, feature1)) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction doBBoxOverlap(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] > bbox2[0]) {\n return false;\n }\n if (bbox1[2] < bbox2[2]) {\n return false;\n }\n if (bbox1[1] > bbox2[1]) {\n return false;\n }\n if (bbox1[3] < bbox2[3]) {\n return false;\n }\n return true;\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1: number[], pair2: number[]) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nfunction getMidpoint(pair1: number[], pair2: number[]) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\n\nexport {\n booleanContains,\n isPolygonInMultiPolygon,\n isPointInMultiPoint,\n isMultiPointInMultiPoint,\n isMultiPointOnLine,\n isMultiPointInPoly,\n isLineOnLine,\n isLineInPoly,\n isPolyInPoly,\n doBBoxOverlap,\n compareCoords,\n getMidpoint,\n};\n\nexport default booleanContains;\n"],"mappings":";AAUA,SAAS,QAAQ,gBAAgB;AACjC,SAAS,6BAA6B;AACtC,SAAS,sBAAsB,qBAAqB;AACpD,SAAS,eAAe;AAmBxB,SAAS,gBACP,UACA,UACA;AACA,QAAM,QAAQ,QAAQ,QAAQ;AAC9B,QAAM,QAAQ,QAAQ,QAAQ;AAC9B,QAAM,QAAQ,MAAM;AACpB,QAAM,QAAQ,MAAM;AACpB,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,MAAM;AAEtB,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,cAAc,SAAS,OAAO;AAAA,QACvC;AACE,gBAAM,IAAI,MAAM,cAAc,QAAQ,yBAAyB;AAAA,MACnE;AAAA,IACF,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,oBAAoB,OAAO,KAAK;AAAA,QACzC,KAAK;AACH,iBAAO,yBAAyB,OAAO,KAAK;AAAA,QAC9C;AACE,gBAAM,IAAI,MAAM,cAAc,QAAQ,yBAAyB;AAAA,MACnE;AAAA,IACF,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,cAAc,OAAO,OAAO,EAAE,mBAAmB,KAAK,CAAC;AAAA,QAChE,KAAK;AACH,iBAAO,aAAa,OAAO,KAAK;AAAA,QAClC,KAAK;AACH,iBAAO,mBAAmB,OAAO,KAAK;AAAA,QACxC;AACE,gBAAM,IAAI,MAAM,cAAc,QAAQ,yBAAyB;AAAA,MACnE;AAAA,IACF,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,sBAAsB,OAAO,OAAO,EAAE,gBAAgB,KAAK,CAAC;AAAA,QACrE,KAAK;AACH,iBAAO,aAA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AS,aAAa,SAAS,aAAa,MAAM;AAC7D,WAAO;AAAA,EACT;AACA,MAAI,SAAS,SAAS,aAAa,SAAS,aAAa,MAAM;AAC7D,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,SAAS,QAAQ;AACnC,QAAM,YAAY,SAAS,QAAQ;AACnC,MAAI,CAAC,cAAc,WAAW,SAAS,GAAG;AACxC,WAAO;AAAA,EACT;AAEA,QAAM,SAAS,QAAQ,QAAQ,EAAE;AACjC,aAAW,QAAQ,QAAQ;AACzB,eAAW,SAAS,MAAM;AACxB,UAAI,CAAC,sBAAsB,OAAO,QAAQ,GAAG;AAC3C,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,cAAc,OAAa,OAAa;AAC/C,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,MAAI,MAAM,CAAC,IAAI,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAUA,SAAS,cAAc,OAAiB,OAAiB;AACvD,SAAO,MAAM,CAAC,MAAM,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,MAAM,CAAC;AACtD;AAEA,SAAS,YAAY,OAAiB,OAAiB;AACrD,SAAO,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC;AAC9D;AAiBA,IAAO,gCAAQ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n Feature,\n Geometry,\n LineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { bbox as calcBbox } from \"@turf/bbox\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { booleanPointOnLine as isPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n) {\n const geom1 = getGeom(feature1);\n const geom2 = getGeom(feature2);\n const type1 = geom1.type;\n const type2 = geom2.type;\n const coords1 = geom1.coordinates;\n const coords2 = geom2.coordinates;\n\n switch (type1) {\n case \"Point\":\n switch (type2) {\n case \"Point\":\n return compareCoords(coords1, coords2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPoint\":\n switch (type2) {\n case \"Point\":\n return isPointInMultiPoint(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInMultiPoint(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"Point\":\n return isPointOnLine(geom2, geom1, { ignoreEndVertices: true });\n case \"LineString\":\n return isLineOnLine(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointOnLine(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"Point\":\n return booleanPointInPolygon(geom2, geom1, { ignoreBoundary: true });\n case \"LineString\":\n return isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return isPolyInPoly(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPolygon\":\n switch (type2) {\n case \"Polygon\":\n return isPolygonInMultiPolygon(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction isPolygonInMultiPolygon(multiPolygon: MultiPolygon, polygon: Polygon) {\n return multiPolygon.coordinates.some((coords) =>\n isPolyInPoly({ type: \"Polygon\", coordinates: coords }, polygon)\n );\n}\n\nfunction isPointInMultiPoint(multiPoint: MultiPoint, pt: Point) {\n let i;\n let output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], pt.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\n\nfunction isMultiPointInMultiPoint(\n multiPoint1: MultiPoint,\n multiPoint2: MultiPoint\n) {\n for (const coord2 of multiPoint2.coordinates) {\n let matchFound = false;\n for (const coord1 of multiPoint1.coordinates) {\n if (compareCoords(coord2, coord1)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\n\nfunction isMultiPointOnLine(lineString: LineString, multiPoint: MultiPoint) {\n let haveFoundInteriorPoint = false;\n for (const coord of multiPoint.coordinates) {\n if (isPointOnLine(coord, lineString, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!isPointOnLine(coord, lineString)) {\n return false;\n }\n }\n if (haveFoundInteriorPoint) {\n return true;\n }\n return false;\n}\n\nfunction isMultiPointInPoly(polygon: Polygon, multiPoint: MultiPoint) {\n for (const coord of multiPoint.coordinates) {\n if (!booleanPointInPolygon(coord, polygon, { ignoreBoundary: true })) {\n return false;\n }\n }\n return true;\n}\n\nfunction isLineOnLine(lineString1: LineString, lineString2: LineString) {\n let haveFoundInteriorPoint = false;\n for (const coords of lineString2.coordinates) {\n if (\n isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: true,\n })\n ) {\n haveFoundInteriorPoint = true;\n }\n if (\n !isPointOnLine({ type: \"Point\", coordinates: coords }, lineString1, {\n ignoreEndVertices: false,\n })\n ) {\n return false;\n }\n }\n return haveFoundInteriorPoint;\n}\n\nfunction isLineInPoly(polygon: Polygon, linestring: LineString) {\n let output = false;\n let i = 0;\n\n const polyBbox = calcBbox(polygon);\n const lineBbox = calcBbox(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n for (i; i < linestring.coordinates.length - 1; i++) {\n const midPoint = getMidpoint(\n linestring.coordinates[i],\n linestring.coordinates[i + 1]\n );\n if (\n booleanPointInPolygon({ type: \"Point\", coordinates: midPoint }, polygon, {\n ignoreBoundary: true,\n })\n ) {\n output = true;\n break;\n }\n }\n return output;\n}\n\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(\n feature1: Feature<Polygon> | Polygon,\n feature2: Feature<Polygon> | Polygon\n) {\n // Handle Nulls\n if (feature1.type === \"Feature\" && feature1.geometry === null) {\n return false;\n }\n if (feature2.type === \"Feature\" && feature2.geometry === null) {\n return false;\n }\n\n const poly1Bbox = calcBbox(feature1);\n const poly2Bbox = calcBbox(feature2);\n if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n return false;\n }\n\n const coords = getGeom(feature2).coordinates;\n for (const ring of coords) {\n for (const coord of ring) {\n if (!booleanPointInPolygon(coord, feature1)) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction doBBoxOverlap(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] > bbox2[0]) {\n return false;\n }\n if (bbox1[2] < bbox2[2]) {\n return false;\n }\n if (bbox1[1] > bbox2[1]) {\n return false;\n }\n if (bbox1[3] < bbox2[3]) {\n return false;\n }\n return true;\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1: number[], pair2: number[]) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nfunction getMidpoint(pair1: number[], pair2: number[]) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\n\nexport {\n booleanContains,\n isPolygonInMultiPolygon,\n isPointInMultiPoint,\n isMultiPointInMultiPoint,\n isMultiPointOnLine,\n isMultiPointInPoly,\n isLineOnLine,\n isLineInPoly,\n isPolyInPoly,\n doBBoxOverlap,\n compareCoords,\n getMidpoint,\n};\n\nexport default booleanContains;\n"],"mappings":";AAUA,SAAS,QAAQ,gBAAgB;AACjC,SAAS,6BAA6B;AACtC,SAAS,sBAAsB,qBAAqB;AACpD,SAAS,eAAe;AAmBxB,SAAS,gBACP,UACA,UACA;AACA,QAAM,QAAQ,QAAQ,QAAQ;AAC9B,QAAM,QAAQ,QAAQ,QAAQ;AAC9B,QAAM,QAAQ,MAAM;AACpB,QAAM,QAAQ,MAAM;AACpB,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,MAAM;AAEtB,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,cAAc,SAAS,OAAO;AAAA,QACvC;AACE,gBAAM,IAAI,MAAM,cAAc,QAAQ,yBAAyB;AAAA,MACnE;AAAA,IACF,KAAK;AACH,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO,oBAAoB,OAAO,KAAK;AAAA,QACzC,KAAK;AACH,iBAAO,yBAAyB,OAAO,KAAK;AAAA,QAC9C;AACE,gBAAM,IAAI,MAAM,cAAc,QAAQ,yBAAyB;AAAA,MACnE;AAAA,IACF,KAAK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AC,MAAM,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,MAAM,CAAC;AACtD;AAEA,SAAS,YAAY,OAAiB,OAAiB;AACrD,SAAO,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC;AAC9D;AAiBA,IAAO,gBAAQ;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/boolean-contains",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"description": "Determines whether the second geometry is completely within the first geometry.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rowan Winsemius <@rowanwins>",
|
|
@@ -56,26 +56,26 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/benchmark": "^2.1.5",
|
|
59
|
-
"@types/tape": "^
|
|
59
|
+
"@types/tape": "^5.8.1",
|
|
60
60
|
"benchmark": "^2.1.4",
|
|
61
61
|
"boolean-jsts": "*",
|
|
62
62
|
"boolean-shapely": "*",
|
|
63
|
-
"glob": "^
|
|
63
|
+
"glob": "^11.0.2",
|
|
64
64
|
"load-json-file": "^7.0.1",
|
|
65
65
|
"npm-run-all": "^4.1.5",
|
|
66
66
|
"tape": "^5.9.0",
|
|
67
|
-
"tsup": "^8.
|
|
68
|
-
"tsx": "^4.19.
|
|
69
|
-
"typescript": "^5.
|
|
67
|
+
"tsup": "^8.4.0",
|
|
68
|
+
"tsx": "^4.19.4",
|
|
69
|
+
"typescript": "^5.8.3"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@turf/bbox": "
|
|
73
|
-
"@turf/boolean-point-in-polygon": "
|
|
74
|
-
"@turf/boolean-point-on-line": "
|
|
75
|
-
"@turf/helpers": "
|
|
76
|
-
"@turf/invariant": "
|
|
72
|
+
"@turf/bbox": "7.3.0",
|
|
73
|
+
"@turf/boolean-point-in-polygon": "7.3.0",
|
|
74
|
+
"@turf/boolean-point-on-line": "7.3.0",
|
|
75
|
+
"@turf/helpers": "7.3.0",
|
|
76
|
+
"@turf/invariant": "7.3.0",
|
|
77
77
|
"@types/geojson": "^7946.0.10",
|
|
78
78
|
"tslib": "^2.8.1"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
|
|
81
81
|
}
|
|
@@ -133,9 +133,9 @@ function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt, incEnd) {
|
|
|
133
133
|
return dyl > 0 ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1] : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
var
|
|
136
|
+
var index_default = booleanCrosses;
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
exports.booleanCrosses = booleanCrosses; exports.default =
|
|
140
|
+
exports.booleanCrosses = booleanCrosses; exports.default = index_default;
|
|
141
141
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-crosses/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,qDAA8B;AAC9B,sDAA8B;AAC9B,uEAAsC;AACtC,4CAAwB;AACxB,wCAAsB;AAqBtB,SAAS,cAAA,CACP,QAAA,EACA,QAAA,EACS;AACT,EAAA,IAAI,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC5B,EAAA,IAAI,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC5B,EAAA,IAAI,MAAA,EAAQ,KAAA,CAAM,IAAA;AAClB,EAAA,IAAI,MAAA,EAAQ,KAAA,CAAM,IAAA;AAElB,EAAA,OAAA,CAAQ,KAAA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dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Geometry, Polygon, LineString, MultiPoint } from \"geojson\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { getGeom } from \"@turf/invariant\";\nimport { point } from \"@turf/helpers\";\n\n/**\n * Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than\n * the maximum dimension of the two source geometries and the intersection set is interior to\n * both source geometries.\n *\n * Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.\n * Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line1 = turf.lineString([[-2, 2], [4, 2]]);\n * var line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * var cross = turf.booleanCrosses(line1, line2);\n * //=true\n */\nfunction booleanCrosses(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n): boolean {\n var geom1 = getGeom(feature1);\n var geom2 = getGeom(feature2);\n var type1 = geom1.type;\n var type2 = geom2.type;\n\n switch (type1) {\n case \"MultiPoint\":\n switch (type2) {\n case \"LineString\":\n return doMultiPointAndLineStringCross(geom1, geom2);\n case \"Polygon\":\n return doesMultiPointCrossPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doMultiPointAndLineStringCross(geom2, geom1);\n case \"LineString\":\n return doLineStringsCross(geom1, geom2);\n case \"Polygon\":\n return doLineStringAndPolygonCross(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doesMultiPointCrossPoly(geom2, geom1);\n case \"LineString\": // An inverse operation\n return doLineStringAndPolygonCross(geom2, geom1);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction doMultiPointAndLineStringCross(\n multiPoint: MultiPoint,\n lineString: LineString\n) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n var i = 0;\n while (i < pointLength && !foundIntPoint && !foundExtPoint) {\n for (var i2 = 0; i2 < lineString.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString.coordinates[i2],\n lineString.coordinates[i2 + 1],\n multiPoint.coordinates[i],\n incEndVertices\n )\n ) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n i++;\n }\n return foundIntPoint && foundExtPoint;\n}\n\nfunction doLineStringsCross(lineString1: LineString, lineString2: LineString) {\n var doLinesIntersect = lineIntersect(lineString1, lineString2);\n if (doLinesIntersect.features.length > 0) {\n for (var i = 0; i < lineString1.coordinates.length - 1; i++) {\n for (var i2 = 0; i2 < lineString2.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString2.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString1.coordinates[i],\n lineString1.coordinates[i + 1],\n lineString2.coordinates[i2],\n incEndVertices\n )\n ) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\nfunction doLineStringAndPolygonCross(lineString: LineString, polygon: Polygon) {\n const line: any = polygonToLine(polygon);\n const doLinesIntersect = lineIntersect(lineString, line);\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction doesMultiPointCrossPoly(multiPoint: MultiPoint, polygon: Polygon) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n for (let i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) {\n if (booleanPointInPolygon(point(multiPoint.coordinates[i]), polygon)) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n\n return foundExtPoint && foundIntPoint;\n}\n\n/**\n * Is a point on a line segment\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {number[]} lineSegmentStart coord pair of start of line\n * @param {number[]} lineSegmentEnd coord pair of end of line\n * @param {number[]} pt coord pair of point to check\n * @param {boolean} incEnd whether the point is allowed to fall on the line ends\n * @returns {boolean} true/false\n */\nfunction isPointOnLineSegment(\n lineSegmentStart: number[],\n lineSegmentEnd: number[],\n pt: number[],\n incEnd: boolean\n) {\n var dxc = pt[0] - lineSegmentStart[0];\n var dyc = pt[1] - lineSegmentStart[1];\n var dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n var dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n var cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (incEnd) {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0]\n : lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1]\n : lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n } else {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] < pt[0] && pt[0] < lineSegmentEnd[0]\n : lineSegmentEnd[0] < pt[0] && pt[0] < lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1]\n : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];\n }\n}\n\nexport { booleanCrosses };\nexport default booleanCrosses;\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-crosses/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,qDAA8B;AAC9B,sDAA8B;AAC9B,uEAAsC;AACtC,4CAAwB;AACxB,wCAAsB;AAqBtB,SAAS,cAAA,CACP,QAAA,EACA,QAAA,EACS;AACT,EAAA,IAAI,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC5B,EAAA,IAAI,MAAA,EAAQ,gCAAA,QAAgB,CAAA;AAC5B,EAAA,IAAI,MAAA,EAAQ,KAAA,CAAM,IAAA;AAClB,EAAA,IAAI,MAAA,EAAQ,KAAA,CAAM,IAAA;AAElB,EAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,IACb,KAAK,YAAA;AACH,MAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,QACb,KAAK,YAAA;AACH,UAAA,OAAO,8BAAA,CAA+B,KAAA,EAAO,KAAK,CAAA;AAAA,QACpD,KAAK,SAAA;AACH,UAAA,OAAO,uBAAA,CAAwB,KAAA,EAAO,KAAK,CAAA;AAAA,QAC7C,OAAA;AACE,UAAA,MAAM,IAAI,KAAA,CAAM,YAAA,EAAc,MAAA,EAAQ,yBAAyB,CAAA;AAAA,MACnE;AAAA,IACF,KAAK,YAAA;AACH,MAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,QACb,KAAK,YAAA;AACH,UAAA,OAAO,8BAAA,CAA+B,KAAA,EAAO,KAAK,CAAA;AAAA,QACpD,KAAK,YAAA;AACH,UAAA,OAAO,kBAAA,CAAmB,KAAA,EAAO,KAAK,CAAA;AAAA,QACxC,KAAK,SAAA;AACH,UAAA,OAAO,2BAAA,CAA4B,KAAA,EAAO,KAAK,CAAA;AAAA,QACjD,OAAA;AACE,UAAA,MAAM,IAAI,KAAA,CAAM,YAAA,EAAc,MAAA,EAAQ,yBAAyB,CAAA;AAAA,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EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,EAAI,gBAAA,CAAiB,CAAC,CAAA;AAAA,IAC7D;AACA,IAAA,OAAO,IAAA,EAAM,EAAA,EACT,gBAAA,CAAiB,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,EAAI,cAAA,CAAe,CAAC,EAAA,EACvD,cAAA,CAAe,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,EAAI,gBAAA,CAAiB,CAAC,CAAA;AAAA,EAC7D;AACF;AAGA,IAAO,cAAA,EAAQ,cAAA;AD/Df;AACE;AACA;AACF,yEAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-crosses/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Geometry, Polygon, LineString, MultiPoint } from \"geojson\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { getGeom } from \"@turf/invariant\";\nimport { point } from \"@turf/helpers\";\n\n/**\n * Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than\n * the maximum dimension of the two source geometries and the intersection set is interior to\n * both source geometries.\n *\n * Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.\n * Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line1 = turf.lineString([[-2, 2], [4, 2]]);\n * var line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * var cross = turf.booleanCrosses(line1, line2);\n * //=true\n */\nfunction booleanCrosses(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n): boolean {\n var geom1 = getGeom(feature1);\n var geom2 = getGeom(feature2);\n var type1 = geom1.type;\n var type2 = geom2.type;\n\n switch (type1) {\n case \"MultiPoint\":\n switch (type2) {\n case \"LineString\":\n return doMultiPointAndLineStringCross(geom1, geom2);\n case \"Polygon\":\n return doesMultiPointCrossPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doMultiPointAndLineStringCross(geom2, geom1);\n case \"LineString\":\n return doLineStringsCross(geom1, geom2);\n case \"Polygon\":\n return doLineStringAndPolygonCross(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doesMultiPointCrossPoly(geom2, geom1);\n case \"LineString\": // An inverse operation\n return doLineStringAndPolygonCross(geom2, geom1);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction doMultiPointAndLineStringCross(\n multiPoint: MultiPoint,\n lineString: LineString\n) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n var i = 0;\n while (i < pointLength && !foundIntPoint && !foundExtPoint) {\n for (var i2 = 0; i2 < lineString.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString.coordinates[i2],\n lineString.coordinates[i2 + 1],\n multiPoint.coordinates[i],\n incEndVertices\n )\n ) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n i++;\n }\n return foundIntPoint && foundExtPoint;\n}\n\nfunction doLineStringsCross(lineString1: LineString, lineString2: LineString) {\n var doLinesIntersect = lineIntersect(lineString1, lineString2);\n if (doLinesIntersect.features.length > 0) {\n for (var i = 0; i < lineString1.coordinates.length - 1; i++) {\n for (var i2 = 0; i2 < lineString2.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString2.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString1.coordinates[i],\n lineString1.coordinates[i + 1],\n lineString2.coordinates[i2],\n incEndVertices\n )\n ) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\nfunction doLineStringAndPolygonCross(lineString: LineString, polygon: Polygon) {\n const line: any = polygonToLine(polygon);\n const doLinesIntersect = lineIntersect(lineString, line);\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction doesMultiPointCrossPoly(multiPoint: MultiPoint, polygon: Polygon) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n for (let i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) {\n if (booleanPointInPolygon(point(multiPoint.coordinates[i]), polygon)) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n\n return foundExtPoint && foundIntPoint;\n}\n\n/**\n * Is a point on a line segment\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {number[]} lineSegmentStart coord pair of start of line\n * @param {number[]} lineSegmentEnd coord pair of end of line\n * @param {number[]} pt coord pair of point to check\n * @param {boolean} incEnd whether the point is allowed to fall on the line ends\n * @returns {boolean} true/false\n */\nfunction isPointOnLineSegment(\n lineSegmentStart: number[],\n lineSegmentEnd: number[],\n pt: number[],\n incEnd: boolean\n) {\n var dxc = pt[0] - lineSegmentStart[0];\n var dyc = pt[1] - lineSegmentStart[1];\n var dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n var dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n var cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (incEnd) {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0]\n : lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1]\n : lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n } else {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] < pt[0] && pt[0] < lineSegmentEnd[0]\n : lineSegmentEnd[0] < pt[0] && pt[0] < lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1]\n : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];\n }\n}\n\nexport { booleanCrosses };\nexport default booleanCrosses;\n"]}
|
|
@@ -133,9 +133,9 @@ function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt, incEnd) {
|
|
|
133
133
|
return dyl > 0 ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1] : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
var
|
|
136
|
+
var index_default = booleanCrosses;
|
|
137
137
|
export {
|
|
138
138
|
booleanCrosses,
|
|
139
|
-
|
|
139
|
+
index_default as default
|
|
140
140
|
};
|
|
141
141
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Geometry, Polygon, LineString, MultiPoint } from \"geojson\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { getGeom } from \"@turf/invariant\";\nimport { point } from \"@turf/helpers\";\n\n/**\n * Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than\n * the maximum dimension of the two source geometries and the intersection set is interior to\n * both source geometries.\n *\n * Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.\n * Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line1 = turf.lineString([[-2, 2], [4, 2]]);\n * var line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * var cross = turf.booleanCrosses(line1, line2);\n * //=true\n */\nfunction booleanCrosses(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n): boolean {\n var geom1 = getGeom(feature1);\n var geom2 = getGeom(feature2);\n var type1 = geom1.type;\n var type2 = geom2.type;\n\n switch (type1) {\n case \"MultiPoint\":\n switch (type2) {\n case \"LineString\":\n return doMultiPointAndLineStringCross(geom1, geom2);\n case \"Polygon\":\n return doesMultiPointCrossPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doMultiPointAndLineStringCross(geom2, geom1);\n case \"LineString\":\n return doLineStringsCross(geom1, geom2);\n case \"Polygon\":\n return doLineStringAndPolygonCross(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doesMultiPointCrossPoly(geom2, geom1);\n case \"LineString\": // An inverse operation\n return doLineStringAndPolygonCross(geom2, geom1);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction doMultiPointAndLineStringCross(\n multiPoint: MultiPoint,\n lineString: LineString\n) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n var i = 0;\n while (i < pointLength && !foundIntPoint && !foundExtPoint) {\n for (var i2 = 0; i2 < lineString.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString.coordinates[i2],\n lineString.coordinates[i2 + 1],\n multiPoint.coordinates[i],\n incEndVertices\n )\n ) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n i++;\n }\n return foundIntPoint && foundExtPoint;\n}\n\nfunction doLineStringsCross(lineString1: LineString, lineString2: LineString) {\n var doLinesIntersect = lineIntersect(lineString1, lineString2);\n if (doLinesIntersect.features.length > 0) {\n for (var i = 0; i < lineString1.coordinates.length - 1; i++) {\n for (var i2 = 0; i2 < lineString2.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString2.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString1.coordinates[i],\n lineString1.coordinates[i + 1],\n lineString2.coordinates[i2],\n incEndVertices\n )\n ) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\nfunction doLineStringAndPolygonCross(lineString: LineString, polygon: Polygon) {\n const line: any = polygonToLine(polygon);\n const doLinesIntersect = lineIntersect(lineString, line);\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction doesMultiPointCrossPoly(multiPoint: MultiPoint, polygon: Polygon) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n for (let i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) {\n if (booleanPointInPolygon(point(multiPoint.coordinates[i]), polygon)) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n\n return foundExtPoint && foundIntPoint;\n}\n\n/**\n * Is a point on a line segment\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {number[]} lineSegmentStart coord pair of start of line\n * @param {number[]} lineSegmentEnd coord pair of end of line\n * @param {number[]} pt coord pair of point to check\n * @param {boolean} incEnd whether the point is allowed to fall on the line ends\n * @returns {boolean} true/false\n */\nfunction isPointOnLineSegment(\n lineSegmentStart: number[],\n lineSegmentEnd: number[],\n pt: number[],\n incEnd: boolean\n) {\n var dxc = pt[0] - lineSegmentStart[0];\n var dyc = pt[1] - lineSegmentStart[1];\n var dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n var dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n var cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (incEnd) {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0]\n : lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1]\n : lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n } else {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] < pt[0] && pt[0] < lineSegmentEnd[0]\n : lineSegmentEnd[0] < pt[0] && pt[0] < lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1]\n : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];\n }\n}\n\nexport { booleanCrosses };\nexport default booleanCrosses;\n"],"mappings":";AACA,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,6BAA6B;AACtC,SAAS,eAAe;AACxB,SAAS,aAAa;AAqBtB,SAAS,eACP,UACA,UACS;AACT,MAAI,QAAQ,QAAQ,QAAQ;AAC5B,MAAI,QAAQ,QAAQ,QAAQ;AAC5B,MAA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esContent":["import { Feature, Geometry, Polygon, LineString, MultiPoint } from \"geojson\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { getGeom } from \"@turf/invariant\";\nimport { point } from \"@turf/helpers\";\n\n/**\n * Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than\n * the maximum dimension of the two source geometries and the intersection set is interior to\n * both source geometries.\n *\n * Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.\n * Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line1 = turf.lineString([[-2, 2], [4, 2]]);\n * var line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * var cross = turf.booleanCrosses(line1, line2);\n * //=true\n */\nfunction booleanCrosses(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry\n): boolean {\n var geom1 = getGeom(feature1);\n var geom2 = getGeom(feature2);\n var type1 = geom1.type;\n var type2 = geom2.type;\n\n switch (type1) {\n case \"MultiPoint\":\n switch (type2) {\n case \"LineString\":\n return doMultiPointAndLineStringCross(geom1, geom2);\n case \"Polygon\":\n return doesMultiPointCrossPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doMultiPointAndLineStringCross(geom2, geom1);\n case \"LineString\":\n return doLineStringsCross(geom1, geom2);\n case \"Polygon\":\n return doLineStringAndPolygonCross(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"MultiPoint\": // An inverse operation\n return doesMultiPointCrossPoly(geom2, geom1);\n case \"LineString\": // An inverse operation\n return doLineStringAndPolygonCross(geom2, geom1);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\n\nfunction doMultiPointAndLineStringCross(\n multiPoint: MultiPoint,\n lineString: LineString\n) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n var i = 0;\n while (i < pointLength && !foundIntPoint && !foundExtPoint) {\n for (var i2 = 0; i2 < lineString.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString.coordinates[i2],\n lineString.coordinates[i2 + 1],\n multiPoint.coordinates[i],\n incEndVertices\n )\n ) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n i++;\n }\n return foundIntPoint && foundExtPoint;\n}\n\nfunction doLineStringsCross(lineString1: LineString, lineString2: LineString) {\n var doLinesIntersect = lineIntersect(lineString1, lineString2);\n if (doLinesIntersect.features.length > 0) {\n for (var i = 0; i < lineString1.coordinates.length - 1; i++) {\n for (var i2 = 0; i2 < lineString2.coordinates.length - 1; i2++) {\n var incEndVertices = true;\n if (i2 === 0 || i2 === lineString2.coordinates.length - 2) {\n incEndVertices = false;\n }\n if (\n isPointOnLineSegment(\n lineString1.coordinates[i],\n lineString1.coordinates[i + 1],\n lineString2.coordinates[i2],\n incEndVertices\n )\n ) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\nfunction doLineStringAndPolygonCross(lineString: LineString, polygon: Polygon) {\n const line: any = polygonToLine(polygon);\n const doLinesIntersect = lineIntersect(lineString, line);\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction doesMultiPointCrossPoly(multiPoint: MultiPoint, polygon: Polygon) {\n var foundIntPoint = false;\n var foundExtPoint = false;\n var pointLength = multiPoint.coordinates.length;\n for (let i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) {\n if (booleanPointInPolygon(point(multiPoint.coordinates[i]), polygon)) {\n foundIntPoint = true;\n } else {\n foundExtPoint = true;\n }\n }\n\n return foundExtPoint && foundIntPoint;\n}\n\n/**\n * Is a point on a line segment\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {number[]} lineSegmentStart coord pair of start of line\n * @param {number[]} lineSegmentEnd coord pair of end of line\n * @param {number[]} pt coord pair of point to check\n * @param {boolean} incEnd whether the point is allowed to fall on the line ends\n * @returns {boolean} true/false\n */\nfunction isPointOnLineSegment(\n lineSegmentStart: number[],\n lineSegmentEnd: number[],\n pt: number[],\n incEnd: boolean\n) {\n var dxc = pt[0] - lineSegmentStart[0];\n var dyc = pt[1] - lineSegmentStart[1];\n var dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n var dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n var cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (incEnd) {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0]\n : lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1]\n : lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n } else {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0\n ? lineSegmentStart[0] < pt[0] && pt[0] < lineSegmentEnd[0]\n : lineSegmentEnd[0] < pt[0] && pt[0] < lineSegmentStart[0];\n }\n return dyl > 0\n ? lineSegmentStart[1] < pt[1] && pt[1] < lineSegmentEnd[1]\n : lineSegmentEnd[1] < pt[1] && pt[1] < lineSegmentStart[1];\n }\n}\n\nexport { booleanCr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M,IACT,iBAAiB,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,eAAe,CAAC,IACvD,eAAe,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,iBAAiB,CAAC;AAAA,EAC7D;AACF;AAGA,IAAO,gBAAQ;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/boolean-crosses",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"description": "Checks if two geometries cross each other.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rowan Winsemius <@rowanwins>",
|
|
@@ -56,25 +56,25 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/benchmark": "^2.1.5",
|
|
59
|
-
"@types/tape": "^
|
|
59
|
+
"@types/tape": "^5.8.1",
|
|
60
60
|
"benchmark": "^2.1.4",
|
|
61
61
|
"boolean-shapely": "*",
|
|
62
|
-
"glob": "^
|
|
62
|
+
"glob": "^11.0.2",
|
|
63
63
|
"load-json-file": "^7.0.1",
|
|
64
64
|
"npm-run-all": "^4.1.5",
|
|
65
65
|
"tape": "^5.9.0",
|
|
66
|
-
"tsup": "^8.
|
|
67
|
-
"tsx": "^4.19.
|
|
68
|
-
"typescript": "^5.
|
|
66
|
+
"tsup": "^8.4.0",
|
|
67
|
+
"tsx": "^4.19.4",
|
|
68
|
+
"typescript": "^5.8.3"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@turf/boolean-point-in-polygon": "
|
|
72
|
-
"@turf/helpers": "
|
|
73
|
-
"@turf/invariant": "
|
|
74
|
-
"@turf/line-intersect": "
|
|
75
|
-
"@turf/polygon-to-line": "
|
|
71
|
+
"@turf/boolean-point-in-polygon": "7.3.0",
|
|
72
|
+
"@turf/helpers": "7.3.0",
|
|
73
|
+
"@turf/invariant": "7.3.0",
|
|
74
|
+
"@turf/line-intersect": "7.3.0",
|
|
75
|
+
"@turf/polygon-to-line": "7.3.0",
|
|
76
76
|
"@types/geojson": "^7946.0.10",
|
|
77
77
|
"tslib": "^2.8.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
|
|
80
80
|
}
|
|
@@ -135,9 +135,9 @@ function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt) {
|
|
|
135
135
|
function compareCoords(pair1, pair2) {
|
|
136
136
|
return pair1[0] === pair2[0] && pair1[1] === pair2[1];
|
|
137
137
|
}
|
|
138
|
-
var
|
|
138
|
+
var index_default = booleanDisjoint;
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
exports.booleanDisjoint = booleanDisjoint; exports.default =
|
|
142
|
+
exports.booleanDisjoint = booleanDisjoint; exports.default = index_default;
|
|
143
143
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-disjoint/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACQA,uEAAsC;AACtC,qDAA8B;AAC9B,kCAA4B;AAC5B,sDAA8B;AAkB9B,SAAS,eAAA,CACP,QAAA,EACA,QAAA,EACA;AAAA,EACE,wBAAA,EAA0B;AAC5B,EAAA,EAEI,EAAE,uBAAA,EAAyB,KAAK,CAAA,EAC3B;AACT,EAAA,IAAI,KAAA,EAAO,IAAA;AACX,EAAA,+BAAA,QAAY,EAAU,CAAC,QAAA,EAAA,GAAa;AAClC,IAAA,+BAAA,QAAY,EAAU,CAAC,QAAA,EAAA,GAAa;AAClC,MAAA,GAAA,CAAI,KAAA,IAAS,KAAA,EAAO;AAClB,QAAA,OAAO,KAAA;AAAA,MACT;AACA,MAAA,KAAA,EAAO,QAAA;AAAA,QACL,QAAA,CAAS,QAAA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,8BAAA,EAAQ,eAAA;ADvFf;AACE;AACA;AACF,2FAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-disjoint/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n Geometry,\n LineString,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { flattenEach } from \"@turf/meta\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\n\n/**\n * Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreSelfIntersections=true] ignore self-intersections on input features\n * @returns {boolean} true if the intersection is an empty set, false otherwise\n * @example\n * var point = turf.point([2, 2]);\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * turf.booleanDisjoint(line, point);\n * //=true\n */\nfunction booleanDisjoint(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry,\n {\n ignoreSelfIntersections = true,\n }: {\n ignoreSelfIntersections?: boolean;\n } = { ignoreSelfIntersections: true }\n): boolean {\n let bool = true;\n flattenEach(feature1, (flatten1) => {\n flattenEach(feature2, (flatten2) => {\n if (bool === false) {\n return false;\n }\n bool = disjoint(\n flatten1.geometry,\n flatten2.geometry,\n ignoreSelfIntersections\n );\n });\n });\n return bool;\n}\n\n/**\n * Disjoint operation for simple Geometries (Point/LineString/Polygon)\n *\n * @private\n * @param {Geometry<any>} geom1 GeoJSON Geometry\n * @param {Geometry<any>} geom2 GeoJSON Geometry\n * @param {boolean} ignoreSelfIntersections ignore self-intersections on input features\n * @returns {boolean} true if disjoint, false otherwise\n */\nfunction disjoint(geom1: any, geom2: any, ignoreSelfIntersections: boolean) {\n switch (geom1.type) {\n case \"Point\":\n switch (geom2.type) {\n case \"Point\":\n return !compareCoords(geom1.coordinates, geom2.coordinates);\n case \"LineString\":\n return !isPointOnLine(geom2, geom1);\n case \"Polygon\":\n return !booleanPointInPolygon(geom1, geom2);\n }\n /* istanbul ignore next */\n break;\n case \"LineString\":\n switch (geom2.type) {\n case \"Point\":\n return !isPointOnLine(geom1, geom2);\n case \"LineString\":\n return !isLineOnLine(geom1, geom2, ignoreSelfIntersections);\n case \"Polygon\":\n return !isLineInPoly(geom2, geom1, ignoreSelfIntersections);\n }\n /* istanbul ignore next */\n break;\n case \"Polygon\":\n switch (geom2.type) {\n case \"Point\":\n return !booleanPointInPolygon(geom2, geom1);\n case \"LineString\":\n return !isLineInPoly(geom1, geom2, ignoreSelfIntersections);\n case \"Polygon\":\n return !isPolyInPoly(geom2, geom1, ignoreSelfIntersections);\n }\n }\n return false;\n}\n\n// http://stackoverflow.com/a/11908158/1979085\nfunction isPointOnLine(lineString: LineString, pt: Point) {\n for (let i = 0; i < lineString.coordinates.length - 1; i++) {\n if (\n isPointOnLineSegment(\n lineString.coordinates[i],\n lineString.coordinates[i + 1],\n pt.coordinates\n )\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction isLineOnLine(\n lineString1: LineString,\n lineString2: LineString,\n ignoreSelfIntersections: boolean\n) {\n const doLinesIntersect = lineIntersect(lineString1, lineString2, {\n ignoreSelfIntersections,\n });\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction isLineInPoly(\n polygon: Polygon,\n lineString: LineString,\n ignoreSelfIntersections: boolean\n) {\n for (const coord of lineString.coordinates) {\n if (booleanPointInPolygon(coord, polygon)) {\n return true;\n }\n }\n const doLinesIntersect = lineIntersect(lineString, polygonToLine(polygon), {\n ignoreSelfIntersections,\n });\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\n/**\n * Is Polygon (geom1) in Polygon (geom2)\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @param {boolean} ignoreSelfIntersections ignore self-intersections on input features\n * @returns {boolean} true if geom1 is in geom2, false otherwise\n */\nfunction isPolyInPoly(\n feature1: Polygon,\n feature2: Polygon,\n ignoreSelfIntersections: boolean\n) {\n for (const coord1 of feature1.coordinates[0]) {\n if (booleanPointInPolygon(coord1, feature2)) {\n return true;\n }\n }\n for (const coord2 of feature2.coordinates[0]) {\n if (booleanPointInPolygon(coord2, feature1)) {\n return true;\n }\n }\n const doLinesIntersect = lineIntersect(\n polygonToLine(feature1),\n polygonToLine(feature2),\n { ignoreSelfIntersections }\n );\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction isPointOnLineSegment(\n lineSegmentStart: Position,\n lineSegmentEnd: Position,\n pt: Position\n) {\n const dxc = pt[0] - lineSegmentStart[0];\n const dyc = pt[1] - lineSegmentStart[1];\n const dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n const dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n const cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n if (dxl > 0) {\n return lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0];\n } else {\n return lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n } else if (dyl > 0) {\n return lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1];\n } else {\n return lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n }\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true if coord pairs match, false otherwise\n */\nfunction compareCoords(pair1: Position, pair2: Position) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nexport { booleanDisjoint };\nexport default booleanDisjoint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C,CAAA;AAAA,IAClE;AAAA,EACF,EAAA,KAAA,GAAA,CAAW,IAAA,EAAM,CAAA,EAAG;AAClB,IAAA,OAAO,gBAAA,CAAiB,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,GAAK,cAAA,CAAe,CAAC,CAAA;AAAA,EAClE,EAAA,KAAO;AACL,IAAA,OAAO,cAAA,CAAe,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,GAAK,EAAA,CAAG,CAAC,EAAA,GAAK,gBAAA,CAAiB,CAAC,CAAA;AAAA,EAClE;AACF;AAUA,SAAS,aAAA,CAAc,KAAA,EAAiB,KAAA,EAAiB;AACvD,EAAA,OAAO,KAAA,CAAM,CAAC,EAAA,IAAM,KAAA,CAAM,CAAC,EAAA,GAAK,KAAA,CAAM,CAAC,EAAA,IAAM,KAAA,CAAM,CAAC,CAAA;AACtD;AAGA,IAAO,cAAA,EAAQ,eAAA;ADvFf;AACE;AACA;AACF,2EAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-disjoint/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n Geometry,\n LineString,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { lineIntersect } from \"@turf/line-intersect\";\nimport { flattenEach } from \"@turf/meta\";\nimport { polygonToLine } from \"@turf/polygon-to-line\";\n\n/**\n * Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreSelfIntersections=true] ignore self-intersections on input features\n * @returns {boolean} true if the intersection is an empty set, false otherwise\n * @example\n * var point = turf.point([2, 2]);\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n *\n * turf.booleanDisjoint(line, point);\n * //=true\n */\nfunction booleanDisjoint(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry,\n {\n ignoreSelfIntersections = true,\n }: {\n ignoreSelfIntersections?: boolean;\n } = { ignoreSelfIntersections: true }\n): boolean {\n let bool = true;\n flattenEach(feature1, (flatten1) => {\n flattenEach(feature2, (flatten2) => {\n if (bool === false) {\n return false;\n }\n bool = disjoint(\n flatten1.geometry,\n flatten2.geometry,\n ignoreSelfIntersections\n );\n });\n });\n return bool;\n}\n\n/**\n * Disjoint operation for simple Geometries (Point/LineString/Polygon)\n *\n * @private\n * @param {Geometry<any>} geom1 GeoJSON Geometry\n * @param {Geometry<any>} geom2 GeoJSON Geometry\n * @param {boolean} ignoreSelfIntersections ignore self-intersections on input features\n * @returns {boolean} true if disjoint, false otherwise\n */\nfunction disjoint(geom1: any, geom2: any, ignoreSelfIntersections: boolean) {\n switch (geom1.type) {\n case \"Point\":\n switch (geom2.type) {\n case \"Point\":\n return !compareCoords(geom1.coordinates, geom2.coordinates);\n case \"LineString\":\n return !isPointOnLine(geom2, geom1);\n case \"Polygon\":\n return !booleanPointInPolygon(geom1, geom2);\n }\n /* istanbul ignore next */\n break;\n case \"LineString\":\n switch (geom2.type) {\n case \"Point\":\n return !isPointOnLine(geom1, geom2);\n case \"LineString\":\n return !isLineOnLine(geom1, geom2, ignoreSelfIntersections);\n case \"Polygon\":\n return !isLineInPoly(geom2, geom1, ignoreSelfIntersections);\n }\n /* istanbul ignore next */\n break;\n case \"Polygon\":\n switch (geom2.type) {\n case \"Point\":\n return !booleanPointInPolygon(geom2, geom1);\n case \"LineString\":\n return !isLineInPoly(geom1, geom2, ignoreSelfIntersections);\n case \"Polygon\":\n return !isPolyInPoly(geom2, geom1, ignoreSelfIntersections);\n }\n }\n return false;\n}\n\n// http://stackoverflow.com/a/11908158/1979085\nfunction isPointOnLine(lineString: LineString, pt: Point) {\n for (let i = 0; i < lineString.coordinates.length - 1; i++) {\n if (\n isPointOnLineSegment(\n lineString.coordinates[i],\n lineString.coordinates[i + 1],\n pt.coordinates\n )\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction isLineOnLine(\n lineString1: LineString,\n lineString2: LineString,\n ignoreSelfIntersections: boolean\n) {\n const doLinesIntersect = lineIntersect(lineString1, lineString2, {\n ignoreSelfIntersections,\n });\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction isLineInPoly(\n polygon: Polygon,\n lineString: LineString,\n ignoreSelfIntersections: boolean\n) {\n for (const coord of lineString.coordinates) {\n if (booleanPointInPolygon(coord, polygon)) {\n return true;\n }\n }\n const doLinesIntersect = lineIntersect(lineString, polygonToLine(polygon), {\n ignoreSelfIntersections,\n });\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\n/**\n * Is Polygon (geom1) in Polygon (geom2)\n * Only takes into account outer rings\n * See http://stackoverflow.com/a/4833823/1979085\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @param {boolean} ignoreSelfIntersections ignore self-intersections on input features\n * @returns {boolean} true if geom1 is in geom2, false otherwise\n */\nfunction isPolyInPoly(\n feature1: Polygon,\n feature2: Polygon,\n ignoreSelfIntersections: boolean\n) {\n for (const coord1 of feature1.coordinates[0]) {\n if (booleanPointInPolygon(coord1, feature2)) {\n return true;\n }\n }\n for (const coord2 of feature2.coordinates[0]) {\n if (booleanPointInPolygon(coord2, feature1)) {\n return true;\n }\n }\n const doLinesIntersect = lineIntersect(\n polygonToLine(feature1),\n polygonToLine(feature2),\n { ignoreSelfIntersections }\n );\n if (doLinesIntersect.features.length > 0) {\n return true;\n }\n return false;\n}\n\nfunction isPointOnLineSegment(\n lineSegmentStart: Position,\n lineSegmentEnd: Position,\n pt: Position\n) {\n const dxc = pt[0] - lineSegmentStart[0];\n const dyc = pt[1] - lineSegmentStart[1];\n const dxl = lineSegmentEnd[0] - lineSegmentStart[0];\n const dyl = lineSegmentEnd[1] - lineSegmentStart[1];\n const cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n if (dxl > 0) {\n return lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0];\n } else {\n return lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];\n }\n } else if (dyl > 0) {\n return lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1];\n } else {\n return lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];\n }\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true if coord pairs match, false otherwise\n */\nfunction compareCoords(pair1: Position, pair2: Position) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nexport { booleanDisjoint };\nexport default booleanDisjoint;\n"]}
|
|
@@ -135,9 +135,9 @@ function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt) {
|
|
|
135
135
|
function compareCoords(pair1, pair2) {
|
|
136
136
|
return pair1[0] === pair2[0] && pair1[1] === pair2[1];
|
|
137
137
|
}
|
|
138
|
-
var
|
|
138
|
+
var index_default = booleanDisjoint;
|
|
139
139
|
export {
|
|
140
140
|
booleanDisjoint,
|
|
141
|
-
|
|
141
|
+
index_default as default
|
|
142
142
|
};
|
|
143
143
|
//# sourceMappingURL=index.js.map
|