node-red-contrib-tak-registration 0.13.0 → 0.14.0
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 -5
- package/node_modules/@turf/along/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/along/dist/cjs/index.d.cts +3 -3
- package/node_modules/@turf/along/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/along/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/along/package.json +13 -13
- package/node_modules/@turf/angle/dist/cjs/index.cjs +10 -7
- package/node_modules/@turf/angle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/angle/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/angle/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/angle/dist/esm/index.js +10 -7
- package/node_modules/@turf/angle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/angle/package.json +15 -15
- package/node_modules/@turf/area/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/area/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/area/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/area/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/area/dist/esm/index.js +1 -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.map +1 -1
- package/node_modules/@turf/bbox/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/bbox/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/bbox/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox/package.json +10 -10
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs +9 -18
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-clip/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/bbox-clip/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/bbox-clip/dist/esm/index.js +9 -18
- 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/README.md +6 -6
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/bbox-polygon/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/bbox-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox-polygon/package.json +9 -9
- package/node_modules/@turf/bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bearing/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/bearing/dist/esm/index.d.ts +1 -1
- 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.map +1 -1
- package/node_modules/@turf/bezier-spline/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/bezier-spline/dist/esm/index.d.ts +1 -1
- 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.map +1 -1
- package/node_modules/@turf/boolean-clockwise/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-clockwise/dist/esm/index.d.ts +1 -1
- 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.map +1 -1
- package/node_modules/@turf/boolean-concave/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-concave/dist/esm/index.d.ts +1 -1
- 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.map +1 -1
- package/node_modules/@turf/boolean-contains/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-contains/dist/esm/index.d.ts +1 -1
- 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.map +1 -1
- package/node_modules/@turf/boolean-crosses/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-crosses/dist/esm/index.d.ts +1 -1
- 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/README.md +1 -1
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.d.cts +3 -3
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js +3 -3
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-disjoint/package.json +13 -13
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-equal/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-equal/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-equal/dist/esm/index.js +1 -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/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.d.cts +3 -3
- package/node_modules/@turf/boolean-intersects/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js +3 -3
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-intersects/package.json +11 -11
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-overlap/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-overlap/dist/esm/index.js +3 -6
- 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 +7 -14
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-parallel/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-parallel/dist/esm/index.js +7 -14
- 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 -4
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +2 -4
- 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 +10 -10
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs +10 -0
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js +10 -0
- 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 +10 -10
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-touches/dist/cjs/index.d.cts +2 -1
- package/node_modules/@turf/boolean-touches/dist/esm/index.d.ts +2 -1
- package/node_modules/@turf/boolean-touches/dist/esm/index.js +2 -4
- 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 +14 -28
- package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-valid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-valid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-valid/dist/esm/index.js +14 -28
- 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 +4 -8
- package/node_modules/@turf/boolean-within/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-within/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-within/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-within/dist/esm/index.js +4 -8
- 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/dist/cjs/index.cjs +12 -24
- package/node_modules/@turf/buffer/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/buffer/dist/esm/index.js +12 -24
- package/node_modules/@turf/buffer/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/buffer/package.json +12 -12
- package/node_modules/@turf/center/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/center/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/center/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center/package.json +12 -12
- package/node_modules/@turf/center-mean/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-mean/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/center-mean/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/center-mean/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-mean/package.json +13 -13
- package/node_modules/@turf/center-median/dist/cjs/index.cjs +5 -10
- package/node_modules/@turf/center-median/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-median/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/center-median/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/center-median/dist/esm/index.js +5 -10
- 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 -4
- package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-of-mass/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/center-of-mass/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/center-of-mass/dist/esm/index.js +2 -4
- package/node_modules/@turf/center-of-mass/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-of-mass/package.json +13 -13
- package/node_modules/@turf/centroid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/centroid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/centroid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/centroid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/centroid/package.json +10 -10
- package/node_modules/@turf/circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/circle/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/circle/dist/esm/index.d.ts +1 -1
- 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 +4 -8
- package/node_modules/@turf/clean-coords/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clean-coords/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clean-coords/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clean-coords/dist/esm/index.js +4 -8
- package/node_modules/@turf/clean-coords/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clean-coords/package.json +11 -11
- package/node_modules/@turf/clone/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clone/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clone/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clone/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clone/package.json +10 -10
- package/node_modules/@turf/clusters/README.md +8 -2
- package/node_modules/@turf/clusters/dist/cjs/index.cjs +9 -18
- package/node_modules/@turf/clusters/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters/dist/cjs/index.d.cts +9 -8
- package/node_modules/@turf/clusters/dist/esm/index.d.ts +9 -8
- package/node_modules/@turf/clusters/dist/esm/index.js +9 -18
- package/node_modules/@turf/clusters/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters/package.json +10 -10
- package/node_modules/@turf/clusters-dbscan/README.md +38 -15
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.d.cts +16 -3
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.d.ts +16 -3
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js +2 -4
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters-dbscan/package.json +14 -14
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs +2 -4
- 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 -4
- 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.map +1 -1
- package/node_modules/@turf/collect/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/collect/dist/esm/index.d.ts +1 -1
- 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.map +1 -1
- package/node_modules/@turf/combine/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/combine/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/combine/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/combine/package.json +10 -10
- 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.map +1 -1
- package/node_modules/@turf/concave/package.json +14 -14
- package/node_modules/@turf/convex/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/convex/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/convex/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/convex/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/convex/package.json +10 -10
- 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.map +1 -1
- package/node_modules/@turf/destination/package.json +11 -11
- package/node_modules/@turf/difference/dist/cjs/index.cjs +8 -10
- package/node_modules/@turf/difference/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/difference/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/difference/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/difference/dist/esm/index.js +7 -9
- 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/README.md +11 -12
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs +5 -6
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/dissolve/dist/cjs/index.d.cts +3 -3
- package/node_modules/@turf/dissolve/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/dissolve/dist/esm/index.js +4 -5
- package/node_modules/@turf/dissolve/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/dissolve/package.json +13 -13
- 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.map +1 -1
- package/node_modules/@turf/distance/package.json +10 -10
- package/node_modules/@turf/distance-weight/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/distance-weight/dist/cjs/index.d.cts +3 -1
- package/node_modules/@turf/distance-weight/dist/esm/index.d.ts +3 -1
- 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/dist/cjs/index.cjs +8 -16
- package/node_modules/@turf/ellipse/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/ellipse/dist/esm/index.js +8 -16
- package/node_modules/@turf/ellipse/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/ellipse/package.json +16 -16
- package/node_modules/@turf/envelope/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/envelope/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/envelope/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/envelope/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/envelope/package.json +11 -11
- package/node_modules/@turf/explode/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/explode/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/explode/dist/esm/index.d.ts +1 -1
- 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 +1 -2
- package/node_modules/@turf/flatten/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flatten/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/flatten/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/flatten/dist/esm/index.js +1 -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 +3 -6
- package/node_modules/@turf/flip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flip/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/flip/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/flip/dist/esm/index.js +3 -6
- 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 +9 -18
- package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js +9 -18
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/geojson-rbush/package.json +11 -11
- package/node_modules/@turf/great-circle/README.md +2 -1
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs +7 -2
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/great-circle/dist/esm/index.js +7 -2
- package/node_modules/@turf/great-circle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/great-circle/package.json +9 -9
- package/node_modules/@turf/helpers/README.md +199 -154
- package/node_modules/@turf/helpers/dist/cjs/index.cjs +10 -7
- package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/helpers/dist/cjs/index.d.cts +149 -110
- package/node_modules/@turf/helpers/dist/esm/index.d.ts +149 -110
- package/node_modules/@turf/helpers/dist/esm/index.js +10 -7
- package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/helpers/package.json +8 -8
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/hex-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/hex-grid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/hex-grid/dist/esm/index.js +2 -4
- 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 +5 -2
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs +10 -15
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/interpolate/dist/cjs/index.d.cts +3 -1
- package/node_modules/@turf/interpolate/dist/esm/index.d.ts +3 -1
- package/node_modules/@turf/interpolate/dist/esm/index.js +11 -16
- package/node_modules/@turf/interpolate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/interpolate/package.json +18 -18
- package/node_modules/@turf/intersect/dist/cjs/index.cjs +7 -11
- package/node_modules/@turf/intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/intersect/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/intersect/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/intersect/dist/esm/index.js +6 -10
- 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/README.md +4 -0
- package/node_modules/@turf/invariant/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/invariant/dist/cjs/index.d.cts +6 -6
- package/node_modules/@turf/invariant/dist/esm/index.d.ts +6 -6
- package/node_modules/@turf/invariant/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/invariant/package.json +9 -9
- package/node_modules/@turf/isobands/dist/cjs/index.cjs +10 -20
- 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 +10 -20
- package/node_modules/@turf/isobands/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isobands/package.json +20 -20
- package/node_modules/@turf/isolines/dist/cjs/index.cjs +10 -20
- 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 +10 -20
- package/node_modules/@turf/isolines/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isolines/package.json +17 -17
- package/node_modules/@turf/jsts/dist/jsts.min.js +1 -1
- package/node_modules/@turf/jsts/dist/jsts.min.js.map +1 -0
- package/node_modules/@turf/jsts/package.json +17 -17
- package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/kinks/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/kinks/dist/esm/index.d.ts +1 -1
- 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/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.map +1 -1
- package/node_modules/@turf/length/package.json +11 -11
- 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.map +1 -1
- package/node_modules/@turf/line-arc/package.json +12 -12
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-chunk/dist/esm/index.js +3 -6
- package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-chunk/package.json +11 -11
- package/node_modules/@turf/line-intersect/README.md +1 -1
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +3 -5
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-intersect/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/line-intersect/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/line-intersect/dist/esm/index.js +3 -5
- 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/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-offset/dist/esm/index.js +3 -6
- package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-offset/package.json +10 -10
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +10 -20
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-overlap/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-overlap/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/line-overlap/dist/esm/index.js +10 -20
- 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.map +1 -1
- package/node_modules/@turf/line-segment/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-segment/dist/esm/index.d.ts +1 -1
- 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.map +1 -1
- package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-slice/package.json +10 -10
- package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +5 -10
- 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 +5 -10
- 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/dist/cjs/index.cjs +7 -14
- package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-split/dist/esm/index.js +7 -14
- package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-split/package.json +16 -16
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +4 -8
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-to-polygon/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/line-to-polygon/dist/esm/index.js +4 -8
- 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 +7 -7
- package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/mask/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/mask/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/mask/dist/esm/index.js +6 -6
- package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/mask/package.json +11 -11
- package/node_modules/@turf/meta/README.md +145 -93
- package/node_modules/@turf/meta/dist/cjs/index.cjs +22 -44
- package/node_modules/@turf/meta/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/meta/dist/esm/index.js +22 -44
- package/node_modules/@turf/meta/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/meta/package.json +7 -7
- package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/midpoint/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/midpoint/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/midpoint/package.json +12 -12
- package/node_modules/@turf/moran-index/README.md +25 -47
- package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/moran-index/dist/cjs/index.d.cts +16 -8
- package/node_modules/@turf/moran-index/dist/esm/index.d.ts +16 -8
- 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 +50 -21
- 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 +25 -6
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +25 -6
- 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/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -4
- 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 +9 -9
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +97 -53
- 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 +2 -2
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +99 -55
- 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 +15 -18
- package/node_modules/@turf/nearest-point-to-line/README.md +1 -9
- 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.map +1 -1
- package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
- package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/planepoint/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/planepoint/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/planepoint/package.json +10 -10
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/point-grid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/point-grid/dist/esm/index.js +2 -4
- 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.map +1 -1
- package/node_modules/@turf/point-on-feature/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/point-on-feature/dist/esm/index.d.ts +1 -1
- 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 +10 -10
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +21 -19
- 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 +3 -3
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +22 -20
- 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 -17
- package/node_modules/@turf/point-to-polygon-distance/LICENSE +20 -0
- package/node_modules/@turf/point-to-polygon-distance/README.md +61 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +49 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.d.cts +23 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.d.ts +23 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +49 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -0
- package/node_modules/@turf/point-to-polygon-distance/package.json +80 -0
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/points-within-polygon/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/points-within-polygon/package.json +11 -11
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +1 -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 +1 -2
- package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-smooth/package.json +10 -10
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygon-tangents/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/polygon-tangents/dist/esm/index.js +1 -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.map +1 -1
- package/node_modules/@turf/polygon-to-line/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygon-to-line/dist/esm/index.d.ts +1 -1
- 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 +20 -40
- package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygonize/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygonize/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/polygonize/dist/esm/index.js +20 -40
- 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/README.md +2 -2
- package/node_modules/@turf/projection/dist/cjs/index.cjs +6 -12
- package/node_modules/@turf/projection/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/projection/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/projection/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/projection/dist/esm/index.js +6 -12
- package/node_modules/@turf/projection/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/projection/package.json +12 -12
- package/node_modules/@turf/quadrat-analysis/README.md +10 -10
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.d.cts +4 -4
- package/node_modules/@turf/quadrat-analysis/dist/esm/index.d.ts +4 -4
- 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/README.md +27 -29
- package/node_modules/@turf/random/dist/cjs/index.cjs +1 -3
- package/node_modules/@turf/random/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/random/dist/cjs/index.d.cts +11 -11
- package/node_modules/@turf/random/dist/esm/index.d.ts +11 -11
- package/node_modules/@turf/random/dist/esm/index.js +1 -3
- package/node_modules/@turf/random/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/random/package.json +9 -9
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rectangle-grid/dist/esm/index.d.ts +1 -1
- 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 +3 -6
- package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rewind/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rewind/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/rewind/dist/esm/index.js +3 -6
- 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/README.md +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/esm/index.d.ts +1 -1
- 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/dist/cjs/index.cjs +1 -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 +1 -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 +1 -1
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +1 -1
- 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/README.md +2 -1
- package/node_modules/@turf/sample/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/sample/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/sample/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/sample/dist/esm/index.js +3 -6
- package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/sample/package.json +9 -9
- package/node_modules/@turf/sector/dist/cjs/index.cjs +4 -8
- 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 +4 -8
- 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 +13 -19
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +5 -5
- package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +5 -5
- package/node_modules/@turf/shortest-path/dist/esm/index.js +3 -6
- package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/shortest-path/package.json +18 -18
- package/node_modules/@turf/simplify/dist/cjs/index.cjs +8 -16
- package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/simplify/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/simplify/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/simplify/dist/esm/index.js +8 -16
- 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.map +1 -1
- package/node_modules/@turf/square/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/square/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/square/package.json +10 -10
- package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/square-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/square-grid/dist/esm/index.d.ts +1 -1
- 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 +3 -6
- 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 +3 -6
- 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 +1 -2
- package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tag/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/tag/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/tag/dist/esm/index.js +1 -2
- package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tag/package.json +12 -12
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tesselate/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/tesselate/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/tesselate/dist/esm/index.js +1 -2
- package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tesselate/package.json +9 -9
- package/node_modules/@turf/tin/dist/cjs/index.cjs +13 -14
- package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tin/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/tin/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/tin/dist/esm/index.js +13 -14
- package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tin/package.json +9 -9
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +4 -8
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-rotate/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/transform-rotate/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/transform-rotate/dist/esm/index.js +4 -8
- 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 +18 -12
- package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-scale/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/transform-scale/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/transform-scale/dist/esm/index.js +18 -12
- 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/dist/cjs/index.cjs +4 -8
- package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.js +4 -8
- 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.map +1 -1
- package/node_modules/@turf/triangle-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/triangle-grid/dist/esm/index.d.ts +1 -1
- 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 +3 -6
- package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/truncate/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/truncate/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/truncate/dist/esm/index.js +3 -6
- 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/dist/cjs/index.cjs +3 -1
- package/node_modules/@turf/turf/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/turf/dist/cjs/index.d.cts +1 -0
- package/node_modules/@turf/turf/dist/esm/index.d.ts +1 -0
- package/node_modules/@turf/turf/dist/esm/index.js +2 -0
- package/node_modules/@turf/turf/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/turf/package.json +126 -125
- package/node_modules/@turf/turf/turf.min.js +3 -26
- package/node_modules/@turf/union/README.md +44 -24
- package/node_modules/@turf/union/dist/cjs/index.cjs +9 -12
- package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/union/dist/cjs/index.d.cts +40 -21
- package/node_modules/@turf/union/dist/esm/index.d.ts +40 -21
- package/node_modules/@turf/union/dist/esm/index.js +8 -11
- 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 +14 -28
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/unkink-polygon/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/unkink-polygon/dist/esm/index.js +14 -28
- 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 +3 -6
- package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/voronoi/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/voronoi/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/voronoi/dist/esm/index.js +3 -6
- package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/voronoi/package.json +11 -11
- package/node_modules/@types/geojson/README.md +1 -1
- package/node_modules/@types/geojson/index.d.ts +4 -1
- package/node_modules/@types/geojson/package.json +4 -3
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/crypto.d.ts +33 -9
- package/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/node/fs/promises.d.ts +16 -5
- package/node_modules/@types/node/fs.d.ts +14 -8
- package/node_modules/@types/node/globals.d.ts +25 -54
- package/node_modules/@types/node/http.d.ts +38 -1
- package/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@types/node/https.d.ts +0 -1
- package/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@types/node/module.d.ts +112 -4
- package/node_modules/@types/node/net.d.ts +3 -0
- package/node_modules/@types/node/package.json +5 -9
- package/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@types/node/process.d.ts +96 -12
- package/node_modules/@types/node/readline/promises.d.ts +14 -2
- package/node_modules/@types/node/readline.d.ts +58 -9
- package/node_modules/@types/node/sqlite.d.ts +30 -9
- package/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/node/test.d.ts +155 -5
- package/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/node/tls.d.ts +6 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@types/node/util.d.ts +80 -10
- package/node_modules/@types/node/v8.d.ts +1 -1
- package/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@types/node/worker_threads.d.ts +34 -1
- package/node_modules/axios/CHANGELOG.md +49 -0
- package/node_modules/axios/README.md +20 -8
- package/node_modules/axios/dist/axios.js +34 -63
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +40 -71
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +40 -71
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +45 -75
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +5 -1
- package/node_modules/axios/index.d.ts +8 -1
- package/node_modules/axios/lib/adapters/http.js +4 -4
- package/node_modules/axios/lib/core/Axios.js +7 -2
- package/node_modules/axios/lib/core/mergeConfig.js +5 -5
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/buildURL.js +7 -1
- package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +12 -65
- package/node_modules/axios/lib/helpers/validator.js +8 -0
- package/node_modules/axios/package.json +3 -3
- package/node_modules/bignumber.js/CHANGELOG.md +295 -0
- package/node_modules/bignumber.js/LICENCE.md +26 -0
- package/node_modules/bignumber.js/README.md +286 -0
- package/node_modules/bignumber.js/bignumber.d.ts +1831 -0
- package/node_modules/bignumber.js/bignumber.js +2922 -0
- package/node_modules/bignumber.js/bignumber.mjs +2907 -0
- package/node_modules/bignumber.js/doc/API.html +2249 -0
- package/node_modules/bignumber.js/package.json +50 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +4 -0
- package/node_modules/fast-xml-parser/README.md +3 -2
- package/node_modules/fast-xml-parser/package.json +1 -1
- package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +21 -17
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +1 -0
- package/node_modules/long/index.d.ts +1 -456
- package/node_modules/long/package.json +1 -1
- package/node_modules/long/umd/index.d.ts +456 -1
- package/node_modules/point-in-polygon-hao/README.md +8 -7
- package/node_modules/point-in-polygon-hao/dist/cjs/index.cjs +322 -0
- package/node_modules/point-in-polygon-hao/dist/esm/index.d.ts +10 -0
- package/node_modules/point-in-polygon-hao/dist/esm/index.js +56 -0
- package/node_modules/point-in-polygon-hao/dist/pointInPolygon.js +286 -42
- package/node_modules/point-in-polygon-hao/dist/pointInPolygon.min.js +1 -1
- package/node_modules/point-in-polygon-hao/package.json +24 -20
- package/node_modules/polyclip-ts/LICENSE +21 -0
- package/node_modules/{polygon-clipping → polyclip-ts}/README.md +35 -36
- package/node_modules/polyclip-ts/dist/cjs/index.cjs +1179 -0
- package/node_modules/polyclip-ts/dist/cjs/index.cjs.map +1 -0
- package/node_modules/polyclip-ts/dist/cjs/index.d.cts +12 -0
- package/node_modules/polyclip-ts/dist/esm/index.d.ts +12 -0
- package/node_modules/polyclip-ts/dist/esm/index.js +1138 -0
- package/node_modules/polyclip-ts/dist/esm/index.js.map +1 -0
- package/node_modules/polyclip-ts/dist/polyclip-ts.umd.js +4811 -0
- package/node_modules/polyclip-ts/dist/polyclip-ts.umd.min.js +2 -0
- package/node_modules/polyclip-ts/package.json +72 -0
- package/node_modules/splaytree-ts/LICENSE +29 -0
- package/node_modules/splaytree-ts/README.md +296 -0
- package/node_modules/splaytree-ts/dist/cjs/index.cjs +714 -0
- package/node_modules/splaytree-ts/dist/cjs/index.cjs.map +1 -0
- package/node_modules/splaytree-ts/dist/cjs/index.d.cts +105 -0
- package/node_modules/splaytree-ts/dist/esm/index.d.ts +105 -0
- package/node_modules/splaytree-ts/dist/esm/index.js +688 -0
- package/node_modules/splaytree-ts/dist/esm/index.js.map +1 -0
- package/node_modules/splaytree-ts/dist/splaytree-ts.umd.js +736 -0
- package/node_modules/splaytree-ts/dist/splaytree-ts.umd.min.js +2 -0
- package/node_modules/splaytree-ts/package.json +59 -0
- package/node_modules/tslib/modules/index.d.ts +1 -0
- package/node_modules/tslib/modules/index.js +2 -0
- package/node_modules/tslib/package.json +1 -1
- package/node_modules/tslib/tslib.d.ts +7 -0
- package/node_modules/tslib/tslib.es6.js +24 -1
- package/node_modules/tslib/tslib.es6.mjs +24 -1
- package/node_modules/tslib/tslib.js +56 -1
- package/node_modules/undici-types/eventsource.d.ts +0 -2
- package/node_modules/undici-types/filereader.d.ts +1 -1
- package/node_modules/undici-types/interceptors.d.ts +3 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -38
- package/node_modules/undici-types/websocket.d.ts +0 -2
- package/node_modules/uuid/README.md +82 -156
- package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs/index.js +31 -0
- package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/max.js +3 -0
- package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
- package/node_modules/uuid/dist/cjs/native.js +4 -0
- package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/node_modules/uuid/dist/cjs/package.json +1 -0
- package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs/types.js +2 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs/v1.js +87 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs/v35.js +41 -0
- package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v4.js +29 -0
- package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v6.js +19 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v7.js +69 -0
- package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/version.js +10 -0
- package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
- package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
- package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
- package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
- package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
- package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs-browser/v35.js +41 -0
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v6.js +19 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
- package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
- package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
- package/node_modules/uuid/dist/esm/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm/index.d.ts +15 -0
- package/node_modules/uuid/dist/{esm-node → esm}/index.js +1 -1
- package/node_modules/uuid/dist/esm/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm/max.js +1 -0
- package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
- package/node_modules/uuid/dist/esm/md5.js +11 -0
- package/node_modules/uuid/dist/esm/native.d.ts +6 -0
- package/node_modules/uuid/dist/esm/native.js +2 -0
- package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm/nil.js +1 -0
- package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm/parse.js +9 -0
- package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
- package/node_modules/uuid/dist/{esm-node → esm}/regex.js +1 -1
- package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm/rng.js +10 -0
- package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/esm/sha1.js +11 -0
- package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm/stringify.js +35 -0
- package/node_modules/uuid/dist/esm/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm/types.js +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm/v1.js +83 -0
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v3.js +9 -0
- package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm/v35.js +36 -0
- package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v4.js +27 -0
- package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v5.js +9 -0
- package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v6.js +17 -0
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v7.js +65 -0
- package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm/validate.js +5 -0
- package/node_modules/uuid/dist/esm/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm/version.js +8 -0
- package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm-browser/index.js +1 -1
- package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/max.js +1 -1
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +113 -172
- package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/native.js +2 -4
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -1
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +6 -34
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +8 -14
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +62 -68
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +29 -25
- package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm-browser/types.js +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +75 -117
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +6 -16
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +8 -3
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +28 -47
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +21 -19
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +8 -3
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v6.js +13 -32
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +5 -15
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +58 -139
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +2 -2
- package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/version.js +5 -5
- package/node_modules/uuid/package.json +65 -75
- package/package.json +6 -6
- package/tak-registration.js +1 -4
- package/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/point-in-polygon-hao/.eslintrc +0 -10
- package/node_modules/point-in-polygon-hao/CHANGES.md +0 -8
- package/node_modules/point-in-polygon-hao/FUNDING.yml +0 -2
- package/node_modules/point-in-polygon-hao/dist/pointInPolygon.mjs +0 -76
- package/node_modules/point-in-polygon-hao/rollup.config.js +0 -19
- package/node_modules/point-in-polygon-hao/src/index.js +0 -74
- package/node_modules/polygon-clipping/LICENSE.md +0 -11
- package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +0 -1803
- package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +0 -14
- package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +0 -1532
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +0 -2496
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +0 -24
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +0 -1
- package/node_modules/polygon-clipping/package.json +0 -79
- package/node_modules/splaytree/Readme.md +0 -222
- package/node_modules/splaytree/dist/splay.esm.js +0 -686
- package/node_modules/splaytree/dist/splay.esm.js.map +0 -1
- package/node_modules/splaytree/dist/splay.js +0 -694
- package/node_modules/splaytree/dist/splay.js.map +0 -1
- package/node_modules/splaytree/package.json +0 -91
- package/node_modules/splaytree/src/index.ts +0 -679
- package/node_modules/splaytree/src/node.ts +0 -15
- package/node_modules/splaytree/src/types.ts +0 -2
- package/node_modules/splaytree/typings/index.d.ts +0 -82
- package/node_modules/splaytree/typings/node.d.ts +0 -8
- package/node_modules/splaytree/typings/types.d.ts +0 -2
- package/node_modules/uuid/CHANGELOG.md +0 -292
- package/node_modules/uuid/CONTRIBUTING.md +0 -18
- package/node_modules/uuid/dist/bin/uuid +0 -2
- package/node_modules/uuid/dist/commonjs-browser/index.js +0 -104
- package/node_modules/uuid/dist/commonjs-browser/max.js +0 -7
- package/node_modules/uuid/dist/commonjs-browser/md5.js +0 -200
- package/node_modules/uuid/dist/commonjs-browser/native.js +0 -10
- package/node_modules/uuid/dist/commonjs-browser/nil.js +0 -7
- package/node_modules/uuid/dist/commonjs-browser/parse.js +0 -44
- package/node_modules/uuid/dist/commonjs-browser/regex.js +0 -7
- package/node_modules/uuid/dist/commonjs-browser/rng.js +0 -23
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -82
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -38
- package/node_modules/uuid/dist/commonjs-browser/v1.js +0 -131
- package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +0 -26
- package/node_modules/uuid/dist/commonjs-browser/v3.js +0 -11
- package/node_modules/uuid/dist/commonjs-browser/v35.js +0 -63
- package/node_modules/uuid/dist/commonjs-browser/v4.js +0 -32
- package/node_modules/uuid/dist/commonjs-browser/v5.js +0 -11
- package/node_modules/uuid/dist/commonjs-browser/v6.js +0 -42
- package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +0 -26
- package/node_modules/uuid/dist/commonjs-browser/v7.js +0 -152
- package/node_modules/uuid/dist/commonjs-browser/validate.js +0 -12
- package/node_modules/uuid/dist/commonjs-browser/version.js +0 -15
- package/node_modules/uuid/dist/esm-node/max.js +0 -1
- package/node_modules/uuid/dist/esm-node/md5.js +0 -10
- package/node_modules/uuid/dist/esm-node/native.js +0 -4
- package/node_modules/uuid/dist/esm-node/nil.js +0 -1
- package/node_modules/uuid/dist/esm-node/parse.js +0 -37
- package/node_modules/uuid/dist/esm-node/rng.js +0 -10
- package/node_modules/uuid/dist/esm-node/sha1.js +0 -10
- package/node_modules/uuid/dist/esm-node/stringify.js +0 -31
- package/node_modules/uuid/dist/esm-node/v1.js +0 -125
- package/node_modules/uuid/dist/esm-node/v1ToV6.js +0 -20
- package/node_modules/uuid/dist/esm-node/v3.js +0 -4
- package/node_modules/uuid/dist/esm-node/v35.js +0 -55
- package/node_modules/uuid/dist/esm-node/v4.js +0 -25
- package/node_modules/uuid/dist/esm-node/v5.js +0 -4
- package/node_modules/uuid/dist/esm-node/v6.js +0 -32
- package/node_modules/uuid/dist/esm-node/v6ToV1.js +0 -20
- package/node_modules/uuid/dist/esm-node/v7.js +0 -146
- package/node_modules/uuid/dist/esm-node/validate.js +0 -5
- package/node_modules/uuid/dist/esm-node/version.js +0 -8
- package/node_modules/uuid/dist/index.js +0 -104
- package/node_modules/uuid/dist/max.js +0 -7
- package/node_modules/uuid/dist/md5-browser.js +0 -200
- package/node_modules/uuid/dist/md5.js +0 -17
- package/node_modules/uuid/dist/native-browser.js +0 -10
- package/node_modules/uuid/dist/native.js +0 -11
- package/node_modules/uuid/dist/nil.js +0 -7
- package/node_modules/uuid/dist/parse.js +0 -44
- package/node_modules/uuid/dist/regex.js +0 -7
- package/node_modules/uuid/dist/rng-browser.js +0 -23
- package/node_modules/uuid/dist/rng.js +0 -17
- package/node_modules/uuid/dist/sha1-browser.js +0 -82
- package/node_modules/uuid/dist/sha1.js +0 -17
- package/node_modules/uuid/dist/stringify.js +0 -38
- package/node_modules/uuid/dist/uuid-bin.js +0 -75
- package/node_modules/uuid/dist/v1.js +0 -131
- package/node_modules/uuid/dist/v1ToV6.js +0 -26
- package/node_modules/uuid/dist/v3.js +0 -11
- package/node_modules/uuid/dist/v35.js +0 -63
- package/node_modules/uuid/dist/v4.js +0 -32
- package/node_modules/uuid/dist/v5.js +0 -11
- package/node_modules/uuid/dist/v6.js +0 -38
- package/node_modules/uuid/dist/v6ToV1.js +0 -26
- package/node_modules/uuid/dist/v7.js +0 -152
- package/node_modules/uuid/dist/validate.js +0 -12
- package/node_modules/uuid/dist/version.js +0 -15
- package/node_modules/uuid/wrapper.mjs +0 -15
- /package/node_modules/point-in-polygon-hao/{index.d.ts → dist/cjs/index.d.cts} +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/LICENSE +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/README.md +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/incircle.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/insphere.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/orient2d.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/orient3d.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/util.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/index.d.ts +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/index.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/package.json +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/incircle.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/incircle.min.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/insphere.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/insphere.min.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient2d.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient2d.min.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient3d.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient3d.min.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/predicates.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/predicates.min.js +0 -0
|
@@ -19,17 +19,19 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
|
|
21
21
|
// index.ts
|
|
22
|
-
import { bearing } from "@turf/bearing";
|
|
23
22
|
import { distance } from "@turf/distance";
|
|
24
|
-
import { destination } from "@turf/destination";
|
|
25
|
-
import { lineIntersect as lineIntersects } from "@turf/line-intersect";
|
|
26
23
|
import { flattenEach } from "@turf/meta";
|
|
27
|
-
import {
|
|
28
|
-
|
|
24
|
+
import {
|
|
25
|
+
point,
|
|
26
|
+
degreesToRadians,
|
|
27
|
+
radiansToDegrees
|
|
28
|
+
} from "@turf/helpers";
|
|
29
|
+
import { getCoord, getCoords } from "@turf/invariant";
|
|
29
30
|
function nearestPointOnLine(lines, pt, options = {}) {
|
|
30
31
|
if (!lines || !pt) {
|
|
31
32
|
throw new Error("lines and pt are required arguments");
|
|
32
33
|
}
|
|
34
|
+
const ptPos = getCoord(pt);
|
|
33
35
|
let closestPt = point([Infinity, Infinity], {
|
|
34
36
|
dist: Infinity,
|
|
35
37
|
index: -1,
|
|
@@ -44,64 +46,39 @@ function nearestPointOnLine(lines, pt, options = {}) {
|
|
|
44
46
|
for (let i = 0; i < coords.length - 1; i++) {
|
|
45
47
|
const start = point(coords[i]);
|
|
46
48
|
start.properties.dist = distance(pt, start, options);
|
|
49
|
+
const startPos = getCoord(start);
|
|
47
50
|
const stop = point(coords[i + 1]);
|
|
48
51
|
stop.properties.dist = distance(pt, stop, options);
|
|
52
|
+
const stopPos = getCoord(stop);
|
|
49
53
|
const sectionLength = distance(start, stop, options);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
pt,
|
|
63
|
-
heightDistance,
|
|
64
|
-
direction - 90,
|
|
65
|
-
options
|
|
66
|
-
);
|
|
67
|
-
const intersect = lineIntersects(
|
|
68
|
-
lineString([
|
|
69
|
-
perpendicularPt1.geometry.coordinates,
|
|
70
|
-
perpendicularPt2.geometry.coordinates
|
|
71
|
-
]),
|
|
72
|
-
lineString([start.geometry.coordinates, stop.geometry.coordinates])
|
|
73
|
-
);
|
|
74
|
-
let intersectPt;
|
|
75
|
-
if (intersect.features.length > 0 && intersect.features[0]) {
|
|
76
|
-
intersectPt = __spreadProps(__spreadValues({}, intersect.features[0]), {
|
|
77
|
-
properties: {
|
|
78
|
-
dist: distance(pt, intersect.features[0], options),
|
|
79
|
-
multiFeatureIndex,
|
|
80
|
-
location: length + distance(start, intersect.features[0], options)
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
if (start.properties.dist < closestPt.properties.dist) {
|
|
85
|
-
closestPt = __spreadProps(__spreadValues({}, start), {
|
|
86
|
-
properties: __spreadProps(__spreadValues({}, start.properties), {
|
|
87
|
-
index: i,
|
|
88
|
-
multiFeatureIndex,
|
|
89
|
-
location: length
|
|
90
|
-
})
|
|
91
|
-
});
|
|
54
|
+
let intersectPos;
|
|
55
|
+
let wasEnd;
|
|
56
|
+
if (startPos[0] === ptPos[0] && startPos[1] === ptPos[1]) {
|
|
57
|
+
[intersectPos, , wasEnd] = [startPos, void 0, false];
|
|
58
|
+
} else if (stopPos[0] === ptPos[0] && stopPos[1] === ptPos[1]) {
|
|
59
|
+
[intersectPos, , wasEnd] = [stopPos, void 0, true];
|
|
60
|
+
} else {
|
|
61
|
+
[intersectPos, , wasEnd] = nearestPointOnSegment(
|
|
62
|
+
start.geometry.coordinates,
|
|
63
|
+
stop.geometry.coordinates,
|
|
64
|
+
getCoord(pt)
|
|
65
|
+
);
|
|
92
66
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
})
|
|
67
|
+
let intersectPt;
|
|
68
|
+
if (intersectPos) {
|
|
69
|
+
intersectPt = point(intersectPos, {
|
|
70
|
+
dist: distance(pt, intersectPos, options),
|
|
71
|
+
multiFeatureIndex,
|
|
72
|
+
location: length + distance(start, intersectPos, options)
|
|
100
73
|
});
|
|
101
74
|
}
|
|
102
75
|
if (intersectPt && intersectPt.properties.dist < closestPt.properties.dist) {
|
|
103
76
|
closestPt = __spreadProps(__spreadValues({}, intersectPt), {
|
|
104
|
-
properties: __spreadProps(__spreadValues({}, intersectPt.properties), {
|
|
77
|
+
properties: __spreadProps(__spreadValues({}, intersectPt.properties), {
|
|
78
|
+
// Legacy behaviour where index progresses to next segment # if we
|
|
79
|
+
// went with the end point this iteration.
|
|
80
|
+
index: wasEnd ? i + 1 : i
|
|
81
|
+
})
|
|
105
82
|
});
|
|
106
83
|
}
|
|
107
84
|
length += sectionLength;
|
|
@@ -110,6 +87,73 @@ function nearestPointOnLine(lines, pt, options = {}) {
|
|
|
110
87
|
);
|
|
111
88
|
return closestPt;
|
|
112
89
|
}
|
|
90
|
+
function dot(v1, v2) {
|
|
91
|
+
const [v1x, v1y, v1z] = v1;
|
|
92
|
+
const [v2x, v2y, v2z] = v2;
|
|
93
|
+
return v1x * v2x + v1y * v2y + v1z * v2z;
|
|
94
|
+
}
|
|
95
|
+
function cross(v1, v2) {
|
|
96
|
+
const [v1x, v1y, v1z] = v1;
|
|
97
|
+
const [v2x, v2y, v2z] = v2;
|
|
98
|
+
return [v1y * v2z - v1z * v2y, v1z * v2x - v1x * v2z, v1x * v2y - v1y * v2x];
|
|
99
|
+
}
|
|
100
|
+
function magnitude(v) {
|
|
101
|
+
return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2) + Math.pow(v[2], 2));
|
|
102
|
+
}
|
|
103
|
+
function angle(v1, v2) {
|
|
104
|
+
const theta = dot(v1, v2) / (magnitude(v1) * magnitude(v2));
|
|
105
|
+
return Math.acos(Math.min(Math.max(theta, -1), 1));
|
|
106
|
+
}
|
|
107
|
+
function lngLatToVector(a) {
|
|
108
|
+
const lat = degreesToRadians(a[1]);
|
|
109
|
+
const lng = degreesToRadians(a[0]);
|
|
110
|
+
return [
|
|
111
|
+
Math.cos(lat) * Math.cos(lng),
|
|
112
|
+
Math.cos(lat) * Math.sin(lng),
|
|
113
|
+
Math.sin(lat)
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
function vectorToLngLat(v) {
|
|
117
|
+
const [x, y, z] = v;
|
|
118
|
+
const lat = radiansToDegrees(Math.asin(z));
|
|
119
|
+
const lng = radiansToDegrees(Math.atan2(y, x));
|
|
120
|
+
return [lng, lat];
|
|
121
|
+
}
|
|
122
|
+
function nearestPointOnSegment(posA, posB, posC) {
|
|
123
|
+
const A = lngLatToVector(posA);
|
|
124
|
+
const B = lngLatToVector(posB);
|
|
125
|
+
const C = lngLatToVector(posC);
|
|
126
|
+
const [Cx, Cy, Cz] = C;
|
|
127
|
+
const [D, E, F] = cross(A, B);
|
|
128
|
+
const a = E * Cz - F * Cy;
|
|
129
|
+
const b = F * Cx - D * Cz;
|
|
130
|
+
const c = D * Cy - E * Cx;
|
|
131
|
+
const f = c * E - b * F;
|
|
132
|
+
const g = a * F - c * D;
|
|
133
|
+
const h = b * D - a * E;
|
|
134
|
+
const t = 1 / Math.sqrt(Math.pow(f, 2) + Math.pow(g, 2) + Math.pow(h, 2));
|
|
135
|
+
const I1 = [f * t, g * t, h * t];
|
|
136
|
+
const I2 = [-1 * f * t, -1 * g * t, -1 * h * t];
|
|
137
|
+
const angleAB = angle(A, B);
|
|
138
|
+
const angleAI1 = angle(A, I1);
|
|
139
|
+
const angleBI1 = angle(B, I1);
|
|
140
|
+
const angleAI2 = angle(A, I2);
|
|
141
|
+
const angleBI2 = angle(B, I2);
|
|
142
|
+
let I;
|
|
143
|
+
if (angleAI1 < angleAI2 && angleAI1 < angleBI2 || angleBI1 < angleAI2 && angleBI1 < angleBI2) {
|
|
144
|
+
I = I1;
|
|
145
|
+
} else {
|
|
146
|
+
I = I2;
|
|
147
|
+
}
|
|
148
|
+
if (angle(A, I) > angleAB || angle(B, I) > angleAB) {
|
|
149
|
+
if (distance(vectorToLngLat(I), vectorToLngLat(A)) <= distance(vectorToLngLat(I), vectorToLngLat(B))) {
|
|
150
|
+
return [vectorToLngLat(A), true, false];
|
|
151
|
+
} else {
|
|
152
|
+
return [vectorToLngLat(B), false, true];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return [vectorToLngLat(I), false, false];
|
|
156
|
+
}
|
|
113
157
|
var turf_nearest_point_on_line_default = nearestPointOnLine;
|
|
114
158
|
export {
|
|
115
159
|
turf_nearest_point_on_line_default as default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Point, LineString, MultiLineString } from \"geojson\";\nimport { bearing } from \"@turf/bearing\";\nimport { distance } from \"@turf/distance\";\nimport { destination } from \"@turf/destination\";\nimport { lineIntersect as lineIntersects } from \"@turf/line-intersect\";\nimport { flattenEach } from \"@turf/meta\";\nimport { point, lineString, Coord, Units } from \"@turf/helpers\";\nimport { getCoords } from \"@turf/invariant\";\n\n/**\n * Takes a {@link Point} and a {@link LineString} and calculates the closest Point on the (Multi)LineString.\n *\n * @name nearestPointOnLine\n * @param {Geometry|Feature<LineString|MultiLineString>} lines lines to snap to\n * @param {Geometry|Feature<Point>|number[]} pt point to snap from\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {Feature<Point>} closest point on the `line` to `point`. The properties object will contain four values: `index`: closest point was found on nth line part, `multiFeatureIndex`: closest point was found on the nth line of the `MultiLineString`, `dist`: distance between pt and the closest point, `location`: distance along the line between start and the closest point.\n * @example\n * var line = turf.lineString([\n * [-77.031669, 38.878605],\n * [-77.029609, 38.881946],\n * [-77.020339, 38.884084],\n * [-77.025661, 38.885821],\n * [-77.021884, 38.889563],\n * [-77.019824, 38.892368]\n * ]);\n * var pt = turf.point([-77.037076, 38.884017]);\n *\n * var snapped = turf.nearestPointOnLine(line, pt, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [line, pt, snapped];\n * snapped.properties['marker-color'] = '#00f';\n */\nfunction nearestPointOnLine<G extends LineString | MultiLineString>(\n lines: Feature<G> | G,\n pt: Coord,\n options: { units?: Units } = {}\n): Feature<\n Point,\n {\n dist: number;\n index: number;\n multiFeatureIndex: number;\n location: number;\n [key: string]: any;\n }\n> {\n if (!lines || !pt) {\n throw new Error(\"lines and pt are required arguments\");\n }\n\n let closestPt: Feature<\n Point,\n { dist: number; index: number; multiFeatureIndex: number; location: number }\n > = point([Infinity, Infinity], {\n dist: Infinity,\n index: -1,\n multiFeatureIndex: -1,\n location: -1,\n });\n\n let length = 0.0;\n flattenEach(\n lines,\n function (line: any, _featureIndex: number, multiFeatureIndex: number) {\n const coords: any = getCoords(line);\n\n for (let i = 0; i < coords.length - 1; i++) {\n //start\n const start: Feature<Point, { dist: number }> = point(coords[i]);\n start.properties.dist = distance(pt, start, options);\n //stop\n const stop: Feature<Point, { dist: number }> = point(coords[i + 1]);\n stop.properties.dist = distance(pt, stop, options);\n // sectionLength\n const sectionLength = distance(start, stop, options);\n //perpendicular\n const heightDistance = Math.max(\n start.properties.dist,\n stop.properties.dist\n );\n const direction = bearing(start, stop);\n const perpendicularPt1 = destination(\n pt,\n heightDistance,\n direction + 90,\n options\n );\n const perpendicularPt2 = destination(\n pt,\n heightDistance,\n direction - 90,\n options\n );\n const intersect = lineIntersects(\n lineString([\n perpendicularPt1.geometry.coordinates,\n perpendicularPt2.geometry.coordinates,\n ]),\n lineString([start.geometry.coordinates, stop.geometry.coordinates])\n );\n let intersectPt:\n | Feature<\n Point,\n { dist: number; multiFeatureIndex: number; location: number }\n >\n | undefined;\n\n if (intersect.features.length > 0 && intersect.features[0]) {\n intersectPt = {\n ...intersect.features[0],\n properties: {\n dist: distance(pt, intersect.features[0], options),\n multiFeatureIndex: multiFeatureIndex,\n location:\n length + distance(start, intersect.features[0], options),\n },\n };\n }\n\n if (start.properties.dist < closestPt.properties.dist) {\n closestPt = {\n ...start,\n properties: {\n ...start.properties,\n index: i,\n multiFeatureIndex: multiFeatureIndex,\n location: length,\n },\n };\n }\n\n if (stop.properties.dist < closestPt.properties.dist) {\n closestPt = {\n ...stop,\n properties: {\n ...stop.properties,\n index: i + 1,\n multiFeatureIndex: multiFeatureIndex,\n location: length + sectionLength,\n },\n };\n }\n\n if (\n intersectPt &&\n intersectPt.properties.dist < closestPt.properties.dist\n ) {\n closestPt = {\n ...intersectPt,\n properties: { ...intersectPt.properties, index: i },\n };\n }\n // update length\n length += sectionLength;\n }\n }\n );\n\n return closestPt;\n}\n\nexport { nearestPointOnLine };\nexport default nearestPointOnLine;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB,sBAAsB;AAChD,SAAS,mBAAmB;AAC5B,SAAS,OAAO,kBAAgC;AAChD,SAAS,iBAAiB;AA4B1B,SAAS,mBACP,OACA,IACA,UAA6B,CAAC,GAU9B;AACA,MAAI,CAAC,SAAS,CAAC,IAAI;AACjB,UAAM,IAAI,MAAM,qCAAqC;AAAA,EACvD;AAEA,MAAI,YAGA,MAAM,CAAC,UAAU,QAAQ,GAAG;AAAA,IAC9B,MAAM;AAAA,IACN,OAAO;AAAA,IACP,mBAAmB;AAAA,IACnB,UAAU;AAAA,EACZ,CAAC;AAED,MAAI,SAAS;AACb;AAAA,IACE;AAAA,IACA,SAAU,MAAW,eAAuB,mBAA2B;AACrE,YAAM,SAAc,UAAU,IAAI;AAElC,eAAS,IAAI,GAAG,IAAI,OAAO,SAAS,GAAG,KAAK;AAE1C,cAAM,QAA0C,MAAM,OAAO,CAAC,CAAC;AAC/D,cAAM,WAAW,OAAO,SAAS,IAAI,OAAO,OAAO;AAEnD,cAAM,OAAyC,MAAM,OAAO,IAAI,CAAC,CAAC;AAClE,aAAK,WAAW,OAAO,SAAS,IAAI,MAAM,OAAO;AAEjD,cAAM,gBAAgB,SAAS,OAAO,MAAM,OAAO;AAEnD,cAAM,iBAAiB,KAAK;AAAA,UAC1B,MAAM,WAAW;AAAA,UACjB,KAAK,WAAW;AAAA,QAClB;AACA,cAAM,YAAY,QAAQ,OAAO,IAAI;AACrC,cAAM,mBAAmB;AAAA,UACvB;AAAA,UACA;AAAA,UACA,YAAY;AAAA,UACZ;AAAA,QACF;AACA,cAAM,mBAAmB;AAAA,UACvB;AAAA,UACA;AAAA,UACA,YAAY;AAAA,UACZ;AAAA,QACF;AACA,cAAM,YAAY;AAAA,UAChB,WAAW;AAAA,YACT,iBAAiB,SAAS;AAAA,YAC1B,iBAAiB,SAAS;AAAA,UAC5B,CAAC;AAAA,UACD,WAAW,CAAC,MAAM,SAAS,aAAa,KAAK,SAAS,WAAW,CAAC;AAAA,QACpE;AACA,YAAI;AAOJ,YAAI,UAAU,SAAS,SAAS,KAAK,UAAU,SAAS,CAAC,GAAG;AAC1D,wBAAc,iCACT,UAAU,SAAS,CAAC,IADX;AAAA,YAEZ,YAAY;AAAA,cACV,MAAM,SAAS,IAAI,UAAU,SAAS,CAAC,GAAG,OAAO;AAAA,cACjD;AAAA,cACA,UACE,SAAS,SAAS,OAAO,UAAU,SAAS,CAAC,GAAG,OAAO;AAAA,YAC3D;AAAA,UACF;AAAA,QACF;AAEA,YAAI,MAAM,WAAW,OAAO,UAAU,WAAW,MAAM;AACrD,sBAAY,iCACP,QADO;AAAA,YAEV,YAAY,iCACP,MAAM,aADC;AAAA,cAEV,OAAO;AAAA,cACP;AAAA,cACA,UAAU;AAAA,YACZ;AAAA,UACF;AAAA,QACF;AAEA,YAAI,KAAK,WAAW,OAAO,UAAU,WAAW,MAAM;AACpD,sBAAY,iCACP,OADO;AAAA,YAEV,YAAY,iCACP,KAAK,aADE;AAAA,cAEV,OAAO,IAAI;AAAA,cACX;AAAA,cACA,UAAU,SAAS;AAAA,YACrB;AAAA,UACF;AAAA,QACF;AAEA,YACE,eACA,YAAY,WAAW,OAAO,UAAU,WAAW,MACnD;AACA,sBAAY,iCACP,cADO;AAAA,YAEV,YAAY,iCAAK,YAAY,aAAjB,EAA6B,OAAO,EAAE;AAAA,UACpD;AAAA,QACF;AAEA,kBAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAGA,IAAO,qCAAQ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Point, Position, LineString, MultiLineString } from \"geojson\";\nimport { distance } from \"@turf/distance\";\nimport { flattenEach } from \"@turf/meta\";\nimport {\n point,\n degreesToRadians,\n radiansToDegrees,\n Coord,\n Units,\n} from \"@turf/helpers\";\nimport { getCoord, getCoords } from \"@turf/invariant\";\n\n/**\n * Returns the nearest point on a line to a given point.\n *\n * @function\n * @param {Geometry|Feature<LineString|MultiLineString>} lines lines to snap to\n * @param {Geometry|Feature<Point>|number[]} pt point to snap from\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {Feature<Point>} closest point on the `line` to `point`. The properties object will contain four values: `index`: closest point was found on nth line part, `multiFeatureIndex`: closest point was found on the nth line of the `MultiLineString`, `dist`: distance between pt and the closest point, `location`: distance along the line between start and the closest point.\n * @example\n * var line = turf.lineString([\n * [-77.031669, 38.878605],\n * [-77.029609, 38.881946],\n * [-77.020339, 38.884084],\n * [-77.025661, 38.885821],\n * [-77.021884, 38.889563],\n * [-77.019824, 38.892368]\n * ]);\n * var pt = turf.point([-77.037076, 38.884017]);\n *\n * var snapped = turf.nearestPointOnLine(line, pt, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [line, pt, snapped];\n * snapped.properties['marker-color'] = '#00f';\n */\nfunction nearestPointOnLine<G extends LineString | MultiLineString>(\n lines: Feature<G> | G,\n pt: Coord,\n options: { units?: Units } = {}\n): Feature<\n Point,\n {\n dist: number;\n index: number;\n multiFeatureIndex: number;\n location: number;\n [key: string]: any;\n }\n> {\n if (!lines || !pt) {\n throw new Error(\"lines and pt are required arguments\");\n }\n\n const ptPos = getCoord(pt);\n\n let closestPt: Feature<\n Point,\n { dist: number; index: number; multiFeatureIndex: number; location: number }\n > = point([Infinity, Infinity], {\n dist: Infinity,\n index: -1,\n multiFeatureIndex: -1,\n location: -1,\n });\n\n let length = 0.0;\n flattenEach(\n lines,\n function (line: any, _featureIndex: number, multiFeatureIndex: number) {\n const coords: any = getCoords(line);\n\n for (let i = 0; i < coords.length - 1; i++) {\n //start - start of current line section\n const start: Feature<Point, { dist: number }> = point(coords[i]);\n start.properties.dist = distance(pt, start, options);\n const startPos = getCoord(start);\n\n //stop - end of current line section\n const stop: Feature<Point, { dist: number }> = point(coords[i + 1]);\n stop.properties.dist = distance(pt, stop, options);\n const stopPos = getCoord(stop);\n\n // sectionLength\n const sectionLength = distance(start, stop, options);\n let intersectPos: Position;\n let wasEnd: boolean;\n\n // Short circuit if snap point is start or end position of the line\n // segment.\n if (startPos[0] === ptPos[0] && startPos[1] === ptPos[1]) {\n [intersectPos, , wasEnd] = [startPos, undefined, false];\n } else if (stopPos[0] === ptPos[0] && stopPos[1] === ptPos[1]) {\n [intersectPos, , wasEnd] = [stopPos, undefined, true];\n } else {\n // Otherwise, find the nearest point the hard way.\n [intersectPos, , wasEnd] = nearestPointOnSegment(\n start.geometry.coordinates,\n stop.geometry.coordinates,\n getCoord(pt)\n );\n }\n let intersectPt:\n | Feature<\n Point,\n { dist: number; multiFeatureIndex: number; location: number }\n >\n | undefined;\n\n if (intersectPos) {\n intersectPt = point(intersectPos, {\n dist: distance(pt, intersectPos, options),\n multiFeatureIndex: multiFeatureIndex,\n location: length + distance(start, intersectPos, options),\n });\n }\n\n if (\n intersectPt &&\n intersectPt.properties.dist < closestPt.properties.dist\n ) {\n closestPt = {\n ...intersectPt,\n properties: {\n ...intersectPt.properties,\n // Legacy behaviour where index progresses to next segment # if we\n // went with the end point this iteration.\n index: wasEnd ? i + 1 : i,\n },\n };\n }\n\n // update length\n length += sectionLength;\n }\n }\n );\n\n return closestPt;\n}\n\n/*\n * Plan is to externalise these vector functions to a simple third party\n * library.\n * Possible candidate is @amandaghassaei/vector-math though having some import\n * issues.\n */\ntype Vector = [number, number, number];\n\nfunction dot(v1: Vector, v2: Vector): number {\n const [v1x, v1y, v1z] = v1;\n const [v2x, v2y, v2z] = v2;\n return v1x * v2x + v1y * v2y + v1z * v2z;\n}\n\n// https://en.wikipedia.org/wiki/Cross_product\nfunction cross(v1: Vector, v2: Vector): Vector {\n const [v1x, v1y, v1z] = v1;\n const [v2x, v2y, v2z] = v2;\n return [v1y * v2z - v1z * v2y, v1z * v2x - v1x * v2z, v1x * v2y - v1y * v2x];\n}\n\nfunction magnitude(v: Vector) {\n return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2) + Math.pow(v[2], 2));\n}\n\nfunction angle(v1: Vector, v2: Vector): number {\n const theta = dot(v1, v2) / (magnitude(v1) * magnitude(v2));\n return Math.acos(Math.min(Math.max(theta, -1), 1));\n}\n\nfunction lngLatToVector(a: Position): Vector {\n const lat = degreesToRadians(a[1]);\n const lng = degreesToRadians(a[0]);\n return [\n Math.cos(lat) * Math.cos(lng),\n Math.cos(lat) * Math.sin(lng),\n Math.sin(lat),\n ];\n}\n\nfunction vectorToLngLat(v: Vector): Position {\n const [x, y, z] = v;\n const lat = radiansToDegrees(Math.asin(z));\n const lng = radiansToDegrees(Math.atan2(y, x));\n\n return [lng, lat];\n}\n\nfunction nearestPointOnSegment(\n posA: Position, // start point of segment to measure to\n posB: Position, // end point of segment to measure to\n posC: Position // point to measure from\n): [Position, boolean, boolean] {\n // Based heavily on this article on finding cross track distance to an arc:\n // https://gis.stackexchange.com/questions/209540/projecting-cross-track-distance-on-great-circle\n\n // Convert spherical (lng, lat) to cartesian vector coords (x, y, z)\n // In the below https://tikz.net/spherical_1/ we convert lng (𝜙) and lat (𝜃)\n // into vectors with x, y, and z components with a length (r) of 1.\n const A = lngLatToVector(posA); // the vector from 0,0,0 to posA\n const B = lngLatToVector(posB); // ... to posB\n const C = lngLatToVector(posC); // ... to posC\n\n // Components of target point.\n const [Cx, Cy, Cz] = C;\n\n // Calculate coefficients.\n const [D, E, F] = cross(A, B);\n const a = E * Cz - F * Cy;\n const b = F * Cx - D * Cz;\n const c = D * Cy - E * Cx;\n\n const f = c * E - b * F;\n const g = a * F - c * D;\n const h = b * D - a * E;\n\n const t = 1 / Math.sqrt(Math.pow(f, 2) + Math.pow(g, 2) + Math.pow(h, 2));\n\n // Vectors to the two points these great circles intersect.\n const I1: Vector = [f * t, g * t, h * t];\n const I2: Vector = [-1 * f * t, -1 * g * t, -1 * h * t];\n\n // Figure out which is the closest intersection to this segment of the great\n // circle.\n const angleAB = angle(A, B);\n const angleAI1 = angle(A, I1);\n const angleBI1 = angle(B, I1);\n const angleAI2 = angle(A, I2);\n const angleBI2 = angle(B, I2);\n\n let I: Vector;\n\n if (\n (angleAI1 < angleAI2 && angleAI1 < angleBI2) ||\n (angleBI1 < angleAI2 && angleBI1 < angleBI2)\n ) {\n I = I1;\n } else {\n I = I2;\n }\n\n // I is the closest intersection to the segment, though might not actually be\n // ON the segment.\n\n // If angle AI or BI is greater than angleAB, I lies on the circle *beyond* A\n // and B so use the closest of A or B as the intersection\n if (angle(A, I) > angleAB || angle(B, I) > angleAB) {\n if (\n distance(vectorToLngLat(I), vectorToLngLat(A)) <=\n distance(vectorToLngLat(I), vectorToLngLat(B))\n ) {\n return [vectorToLngLat(A), true, false];\n } else {\n return [vectorToLngLat(B), false, true];\n }\n }\n\n // As angleAI nor angleBI don't exceed angleAB, I is on the segment\n return [vectorToLngLat(I), false, false];\n}\n\nexport { nearestPointOnLine };\nexport default nearestPointOnLine;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,UAAU,iBAAiB;AA4BpC,SAAS,mBACP,OACA,IACA,UAA6B,CAAC,GAU9B;AACA,MAAI,CAAC,SAAS,CAAC,IAAI;AACjB,UAAM,IAAI,MAAM,qCAAqC;AAAA,EACvD;AAEA,QAAM,QAAQ,SAAS,EAAE;AAEzB,MAAI,YAGA,MAAM,CAAC,UAAU,QAAQ,GAAG;AAAA,IAC9B,MAAM;AAAA,IACN,OAAO;AAAA,IACP,mBAAmB;AAAA,IACnB,UAAU;AAAA,EACZ,CAAC;AAED,MAAI,SAAS;AACb;AAAA,IACE;AAAA,IACA,SAAU,MAAW,eAAuB,mBAA2B;AACrE,YAAM,SAAc,UAAU,IAAI;AAElC,eAAS,IAAI,GAAG,IAAI,OAAO,SAAS,GAAG,KAAK;AAE1C,cAAM,QAA0C,MAAM,OAAO,CAAC,CAAC;AAC/D,cAAM,WAAW,OAAO,SAAS,IAAI,OAAO,OAAO;AACnD,cAAM,WAAW,SAAS,KAAK;AAG/B,cAAM,OAAyC,MAAM,OAAO,IAAI,CAAC,CAAC;AAClE,aAAK,WAAW,OAAO,SAAS,IAAI,MAAM,OAAO;AACjD,cAAM,UAAU,SAAS,IAAI;AAG7B,cAAM,gBAAgB,SAAS,OAAO,MAAM,OAAO;AACnD,YAAI;AACJ,YAAI;AAIJ,YAAI,SAAS,CAAC,MAAM,MAAM,CAAC,KAAK,SAAS,CAAC,MAAM,MAAM,CAAC,GAAG;AACxD,WAAC,cAAc,EAAE,MAAM,IAAI,CAAC,UAAU,QAAW,KAAK;AAAA,QACxD,WAAW,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAK,QAAQ,CAAC,MAAM,MAAM,CAAC,GAAG;AAC7D,WAAC,cAAc,EAAE,MAAM,IAAI,CAAC,SAAS,QAAW,IAAI;AAAA,QACtD,OAAO;AAEL,WAAC,cAAc,EAAE,MAAM,IAAI;AAAA,YACzB,MAAM,SAAS;AAAA,YACf,KAAK,SAAS;AAAA,YACd,SAAS,EAAE;AAAA,UACb;AAAA,QACF;AACA,YAAI;AAOJ,YAAI,cAAc;AAChB,wBAAc,MAAM,cAAc;AAAA,YAChC,MAAM,SAAS,IAAI,cAAc,OAAO;AAAA,YACxC;AAAA,YACA,UAAU,SAAS,SAAS,OAAO,cAAc,OAAO;AAAA,UAC1D,CAAC;AAAA,QACH;AAEA,YACE,eACA,YAAY,WAAW,OAAO,UAAU,WAAW,MACnD;AACA,sBAAY,iCACP,cADO;AAAA,YAEV,YAAY,iCACP,YAAY,aADL;AAAA;AAAA;AAAA,cAIV,OAAO,SAAS,IAAI,IAAI;AAAA,YAC1B;AAAA,UACF;AAAA,QACF;AAGA,kBAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAUA,SAAS,IAAI,IAAY,IAAoB;AAC3C,QAAM,CAAC,KAAK,KAAK,GAAG,IAAI;AACxB,QAAM,CAAC,KAAK,KAAK,GAAG,IAAI;AACxB,SAAO,MAAM,MAAM,MAAM,MAAM,MAAM;AACvC;AAGA,SAAS,MAAM,IAAY,IAAoB;AAC7C,QAAM,CAAC,KAAK,KAAK,GAAG,IAAI;AACxB,QAAM,CAAC,KAAK,KAAK,GAAG,IAAI;AACxB,SAAO,CAAC,MAAM,MAAM,MAAM,KAAK,MAAM,MAAM,MAAM,KAAK,MAAM,MAAM,MAAM,GAAG;AAC7E;AAEA,SAAS,UAAU,GAAW;AAC5B,SAAO,KAAK,KAAK,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;AAC5E;AAEA,SAAS,MAAM,IAAY,IAAoB;AAC7C,QAAM,QAAQ,IAAI,IAAI,EAAE,KAAK,UAAU,EAAE,IAAI,UAAU,EAAE;AACzD,SAAO,KAAK,KAAK,KAAK,IAAI,KAAK,IAAI,OAAO,EAAE,GAAG,CAAC,CAAC;AACnD;AAEA,SAAS,eAAe,GAAqB;AAC3C,QAAM,MAAM,iBAAiB,EAAE,CAAC,CAAC;AACjC,QAAM,MAAM,iBAAiB,EAAE,CAAC,CAAC;AACjC,SAAO;AAAA,IACL,KAAK,IAAI,GAAG,IAAI,KAAK,IAAI,GAAG;AAAA,IAC5B,KAAK,IAAI,GAAG,IAAI,KAAK,IAAI,GAAG;AAAA,IAC5B,KAAK,IAAI,GAAG;AAAA,EACd;AACF;AAEA,SAAS,eAAe,GAAqB;AAC3C,QAAM,CAAC,GAAG,GAAG,CAAC,IAAI;AAClB,QAAM,MAAM,iBAAiB,KAAK,KAAK,CAAC,CAAC;AACzC,QAAM,MAAM,iBAAiB,KAAK,MAAM,GAAG,CAAC,CAAC;AAE7C,SAAO,CAAC,KAAK,GAAG;AAClB;AAEA,SAAS,sBACP,MACA,MACA,MAC8B;AAO9B,QAAM,IAAI,eAAe,IAAI;AAC7B,QAAM,IAAI,eAAe,IAAI;AAC7B,QAAM,IAAI,eAAe,IAAI;AAG7B,QAAM,CAAC,IAAI,IAAI,EAAE,IAAI;AAGrB,QAAM,CAAC,GAAG,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC;AAC5B,QAAM,IAAI,IAAI,KAAK,IAAI;AACvB,QAAM,IAAI,IAAI,KAAK,IAAI;AACvB,QAAM,IAAI,IAAI,KAAK,IAAI;AAEvB,QAAM,IAAI,IAAI,IAAI,IAAI;AACtB,QAAM,IAAI,IAAI,IAAI,IAAI;AACtB,QAAM,IAAI,IAAI,IAAI,IAAI;AAEtB,QAAM,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,GAAG,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,CAAC;AAGxE,QAAM,KAAa,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACvC,QAAM,KAAa,CAAC,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,IAAI,CAAC;AAItD,QAAM,UAAU,MAAM,GAAG,CAAC;AAC1B,QAAM,WAAW,MAAM,GAAG,EAAE;AAC5B,QAAM,WAAW,MAAM,GAAG,EAAE;AAC5B,QAAM,WAAW,MAAM,GAAG,EAAE;AAC5B,QAAM,WAAW,MAAM,GAAG,EAAE;AAE5B,MAAI;AAEJ,MACG,WAAW,YAAY,WAAW,YAClC,WAAW,YAAY,WAAW,UACnC;AACA,QAAI;AAAA,EACN,OAAO;AACL,QAAI;AAAA,EACN;AAOA,MAAI,MAAM,GAAG,CAAC,IAAI,WAAW,MAAM,GAAG,CAAC,IAAI,SAAS;AAClD,QACE,SAAS,eAAe,CAAC,GAAG,eAAe,CAAC,CAAC,KAC7C,SAAS,eAAe,CAAC,GAAG,eAAe,CAAC,CAAC,GAC7C;AACA,aAAO,CAAC,eAAe,CAAC,GAAG,MAAM,KAAK;AAAA,IACxC,OAAO;AACL,aAAO,CAAC,eAAe,CAAC,GAAG,OAAO,IAAI;AAAA,IACxC;AAAA,EACF;AAGA,SAAO,CAAC,eAAe,CAAC,GAAG,OAAO,KAAK;AACzC;AAGA,IAAO,qCAAQ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/nearest-point-on-line",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "turf nearest-point-on-line module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,30 +46,27 @@
|
|
|
46
46
|
"test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@turf/along": "^7.
|
|
50
|
-
"@turf/length": "^7.
|
|
51
|
-
"@turf/truncate": "^7.
|
|
49
|
+
"@turf/along": "^7.2.0",
|
|
50
|
+
"@turf/length": "^7.2.0",
|
|
51
|
+
"@turf/truncate": "^7.2.0",
|
|
52
52
|
"@types/benchmark": "^2.1.5",
|
|
53
|
-
"@types/tape": "^4.
|
|
53
|
+
"@types/tape": "^4.13.4",
|
|
54
54
|
"benchmark": "^2.1.4",
|
|
55
55
|
"load-json-file": "^7.0.1",
|
|
56
56
|
"npm-run-all": "^4.1.5",
|
|
57
|
-
"tape": "^5.
|
|
58
|
-
"tsup": "^8.
|
|
59
|
-
"tsx": "^4.
|
|
60
|
-
"typescript": "^5.
|
|
57
|
+
"tape": "^5.9.0",
|
|
58
|
+
"tsup": "^8.3.5",
|
|
59
|
+
"tsx": "^4.19.2",
|
|
60
|
+
"typescript": "^5.5.4",
|
|
61
61
|
"write-json-file": "^5.0.0"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@turf/
|
|
65
|
-
"@turf/
|
|
66
|
-
"@turf/
|
|
67
|
-
"@turf/
|
|
68
|
-
"@turf/invariant": "^7.1.0",
|
|
69
|
-
"@turf/line-intersect": "^7.1.0",
|
|
70
|
-
"@turf/meta": "^7.1.0",
|
|
64
|
+
"@turf/distance": "^7.2.0",
|
|
65
|
+
"@turf/helpers": "^7.2.0",
|
|
66
|
+
"@turf/invariant": "^7.2.0",
|
|
67
|
+
"@turf/meta": "^7.2.0",
|
|
71
68
|
"@types/geojson": "^7946.0.10",
|
|
72
|
-
"tslib": "^2.
|
|
69
|
+
"tslib": "^2.8.1"
|
|
73
70
|
},
|
|
74
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
|
|
75
72
|
}
|
|
@@ -11,7 +11,7 @@ to a [line][3]. The returned point has a `dist` property indicating its distance
|
|
|
11
11
|
|
|
12
12
|
* `points` **([FeatureCollection][2] | [GeometryCollection][4]<[Point][1]>)** Point Collection
|
|
13
13
|
* `line` **([Feature][5] | [Geometry][6]<[LineString][3]>)** Line Feature
|
|
14
|
-
* `options` **[Object][7]?** Optional parameters
|
|
14
|
+
* `options` **[Object][7]?** Optional parameters (optional, default `{}`)
|
|
15
15
|
|
|
16
16
|
* `options.units` **[string][8]** unit of the output distance property
|
|
17
17
|
(eg: degrees, radians, miles, or kilometers) (optional, default `'kilometers'`)
|
|
@@ -33,14 +33,6 @@ var addToMap = [nearest, line];
|
|
|
33
33
|
|
|
34
34
|
Returns **[Feature][5]<[Point][1]>** the closest point
|
|
35
35
|
|
|
36
|
-
## pt
|
|
37
|
-
|
|
38
|
-
Translate Properties to final Point, priorities:
|
|
39
|
-
|
|
40
|
-
1. options.properties
|
|
41
|
-
2. inherent Point properties
|
|
42
|
-
3. dist custom properties created by NearestPointToLine
|
|
43
|
-
|
|
44
36
|
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2
|
|
45
37
|
|
|
46
38
|
[2]: https://tools.ietf.org/html/rfc7946#section-3.3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-nearest-point-to-line/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"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","file":"/home/runner/work/turf/turf/packages/turf-nearest-point-to-line/dist/cjs/index.cjs","sourcesContent":[null,"import {\n Feature,\n FeatureCollection,\n GeometryCollection,\n LineString,\n Point,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { getType } from \"@turf/invariant\";\nimport { featureEach, geomEach } from \"@turf/meta\";\nimport { pointToLineDistance } from \"@turf/point-to-line-distance\";\n\n/**\n * Returns the closest {@link Point|point}, of a {@link FeatureCollection|collection} of points,\n * to a {@link LineString|line}. The returned point has a `dist` property indicating its distance to the line.\n *\n * @function\n * @param {FeatureCollection|GeometryCollection<Point>} points Point Collection\n * @param {Feature|Geometry<LineString>} line Line Feature\n * @param {Object} [options] Optional parameters\n * @param {string} [options.units='kilometers'] unit of the output distance property\n * (eg: degrees, radians, miles, or kilometers)\n * @param {Object} [options.properties={}] Translate Properties to Point\n * @returns {Feature<Point>} the closest point\n * @example\n * var pt1 = turf.point([0, 0]);\n * var pt2 = turf.point([0.5, 0.5]);\n * var points = turf.featureCollection([pt1, pt2]);\n * var line = turf.lineString([[1,1], [-1,1]]);\n *\n * var nearest = turf.nearestPointToLine(points, line);\n *\n * //addToMap\n * var addToMap = [nearest, line];\n */\nfunction nearestPointToLine<P = { dist: number; [key: string]: any }>(\n points:\n | FeatureCollection<Point>\n | Feature<GeometryCollection>\n | GeometryCollection,\n line: Feature<LineString> | LineString,\n options: {\n units?: Units;\n properties?: GeoJsonProperties;\n } = {}\n): Feature<Point, P> {\n const units = options.units;\n const properties = options.properties || {};\n\n // validation\n const pts = normalize(points);\n if (!pts.features.length) {\n throw new Error(\"points must contain features\");\n }\n\n if (!line) {\n throw new Error(\"line is required\");\n }\n if (getType(line) !== \"LineString\") {\n throw new Error(\"line must be a LineString\");\n }\n\n let dist = Infinity;\n let pt: any = null;\n\n featureEach(pts, (point) => {\n const d = pointToLineDistance(point, line, { units });\n if (d < dist) {\n dist = d;\n pt = point;\n }\n });\n /*\n * Translate Properties to final Point, priorities:\n * 1. options.properties\n * 2. inherent Point properties\n * 3. dist custom properties created by NearestPointToLine\n */\n if (pt) {\n pt.properties = { ...{ dist }, ...pt.properties, ...properties };\n }\n return pt;\n}\n\n/**\n * Convert Collection to FeatureCollection\n *\n * @private\n * @param {FeatureCollection|GeometryCollection} points Points\n * @returns {FeatureCollection<Point>} points\n */\nfunction normalize(points: any): FeatureCollection<Point> {\n const features: any[] = [];\n const type = points.geometry ? points.geometry.type : points.type;\n switch (type) {\n case \"GeometryCollection\":\n geomEach(points, (geom) => {\n if (geom.type === \"Point\") {\n features.push({ type: \"Feature\", properties: {}, geometry: geom });\n }\n });\n return { type: \"FeatureCollection\", features };\n case \"FeatureCollection\":\n points.features = points.features.filter((feature: any) => {\n return feature.geometry.type === \"Point\";\n });\n return points;\n default:\n throw new Error(\"points must be a Point Collection\");\n }\n}\n\nexport { nearestPointToLine };\nexport default nearestPointToLine;\n"]}
|
|
@@ -5,7 +5,7 @@ import { Units } from '@turf/helpers';
|
|
|
5
5
|
* Returns the closest {@link Point|point}, of a {@link FeatureCollection|collection} of points,
|
|
6
6
|
* to a {@link LineString|line}. The returned point has a `dist` property indicating its distance to the line.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
8
|
+
* @function
|
|
9
9
|
* @param {FeatureCollection|GeometryCollection<Point>} points Point Collection
|
|
10
10
|
* @param {Feature|Geometry<LineString>} line Line Feature
|
|
11
11
|
* @param {Object} [options] Optional parameters
|
|
@@ -5,7 +5,7 @@ import { Units } from '@turf/helpers';
|
|
|
5
5
|
* Returns the closest {@link Point|point}, of a {@link FeatureCollection|collection} of points,
|
|
6
6
|
* to a {@link LineString|line}. The returned point has a `dist` property indicating its distance to the line.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
8
|
+
* @function
|
|
9
9
|
* @param {FeatureCollection|GeometryCollection<Point>} points Point Collection
|
|
10
10
|
* @param {Feature|Geometry<LineString>} line Line Feature
|
|
11
11
|
* @param {Object} [options] Optional parameters
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n Feature,\n FeatureCollection,\n GeometryCollection,\n LineString,\n Point,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { getType } from \"@turf/invariant\";\nimport { featureEach, geomEach } from \"@turf/meta\";\nimport { pointToLineDistance } from \"@turf/point-to-line-distance\";\n\n/**\n * Returns the closest {@link Point|point}, of a {@link FeatureCollection|collection} of points,\n * to a {@link LineString|line}. The returned point has a `dist` property indicating its distance to the line.\n *\n * @
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n Feature,\n FeatureCollection,\n GeometryCollection,\n LineString,\n Point,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { getType } from \"@turf/invariant\";\nimport { featureEach, geomEach } from \"@turf/meta\";\nimport { pointToLineDistance } from \"@turf/point-to-line-distance\";\n\n/**\n * Returns the closest {@link Point|point}, of a {@link FeatureCollection|collection} of points,\n * to a {@link LineString|line}. The returned point has a `dist` property indicating its distance to the line.\n *\n * @function\n * @param {FeatureCollection|GeometryCollection<Point>} points Point Collection\n * @param {Feature|Geometry<LineString>} line Line Feature\n * @param {Object} [options] Optional parameters\n * @param {string} [options.units='kilometers'] unit of the output distance property\n * (eg: degrees, radians, miles, or kilometers)\n * @param {Object} [options.properties={}] Translate Properties to Point\n * @returns {Feature<Point>} the closest point\n * @example\n * var pt1 = turf.point([0, 0]);\n * var pt2 = turf.point([0.5, 0.5]);\n * var points = turf.featureCollection([pt1, pt2]);\n * var line = turf.lineString([[1,1], [-1,1]]);\n *\n * var nearest = turf.nearestPointToLine(points, line);\n *\n * //addToMap\n * var addToMap = [nearest, line];\n */\nfunction nearestPointToLine<P = { dist: number; [key: string]: any }>(\n points:\n | FeatureCollection<Point>\n | Feature<GeometryCollection>\n | GeometryCollection,\n line: Feature<LineString> | LineString,\n options: {\n units?: Units;\n properties?: GeoJsonProperties;\n } = {}\n): Feature<Point, P> {\n const units = options.units;\n const properties = options.properties || {};\n\n // validation\n const pts = normalize(points);\n if (!pts.features.length) {\n throw new Error(\"points must contain features\");\n }\n\n if (!line) {\n throw new Error(\"line is required\");\n }\n if (getType(line) !== \"LineString\") {\n throw new Error(\"line must be a LineString\");\n }\n\n let dist = Infinity;\n let pt: any = null;\n\n featureEach(pts, (point) => {\n const d = pointToLineDistance(point, line, { units });\n if (d < dist) {\n dist = d;\n pt = point;\n }\n });\n /*\n * Translate Properties to final Point, priorities:\n * 1. options.properties\n * 2. inherent Point properties\n * 3. dist custom properties created by NearestPointToLine\n */\n if (pt) {\n pt.properties = { ...{ dist }, ...pt.properties, ...properties };\n }\n return pt;\n}\n\n/**\n * Convert Collection to FeatureCollection\n *\n * @private\n * @param {FeatureCollection|GeometryCollection} points Points\n * @returns {FeatureCollection<Point>} points\n */\nfunction normalize(points: any): FeatureCollection<Point> {\n const features: any[] = [];\n const type = points.geometry ? points.geometry.type : points.type;\n switch (type) {\n case \"GeometryCollection\":\n geomEach(points, (geom) => {\n if (geom.type === \"Point\") {\n features.push({ type: \"Feature\", properties: {}, geometry: geom });\n }\n });\n return { type: \"FeatureCollection\", features };\n case \"FeatureCollection\":\n points.features = points.features.filter((feature: any) => {\n return feature.geometry.type === \"Point\";\n });\n return points;\n default:\n throw new Error(\"points must be a Point Collection\");\n }\n}\n\nexport { nearestPointToLine };\nexport default nearestPointToLine;\n"],"mappings":";;;;;;;;;;;;;;;;;;AASA,SAAS,eAAe;AACxB,SAAS,aAAa,gBAAgB;AACtC,SAAS,2BAA2B;AAyBpC,SAAS,mBACP,QAIA,MACA,UAGI,CAAC,GACc;AACnB,QAAM,QAAQ,QAAQ;AACtB,QAAM,aAAa,QAAQ,cAAc,CAAC;AAG1C,QAAM,MAAM,UAAU,MAAM;AAC5B,MAAI,CAAC,IAAI,SAAS,QAAQ;AACxB,UAAM,IAAI,MAAM,8BAA8B;AAAA,EAChD;AAEA,MAAI,CAAC,MAAM;AACT,UAAM,IAAI,MAAM,kBAAkB;AAAA,EACpC;AACA,MAAI,QAAQ,IAAI,MAAM,cAAc;AAClC,UAAM,IAAI,MAAM,2BAA2B;AAAA,EAC7C;AAEA,MAAI,OAAO;AACX,MAAI,KAAU;AAEd,cAAY,KAAK,CAAC,UAAU;AAC1B,UAAM,IAAI,oBAAoB,OAAO,MAAM,EAAE,MAAM,CAAC;AACpD,QAAI,IAAI,MAAM;AACZ,aAAO;AACP,WAAK;AAAA,IACP;AAAA,EACF,CAAC;AAOD,MAAI,IAAI;AACN,OAAG,aAAa,iDAAK,EAAE,KAAK,IAAM,GAAG,aAAe;AAAA,EACtD;AACA,SAAO;AACT;AASA,SAAS,UAAU,QAAuC;AACxD,QAAM,WAAkB,CAAC;AACzB,QAAM,OAAO,OAAO,WAAW,OAAO,SAAS,OAAO,OAAO;AAC7D,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,eAAS,QAAQ,CAAC,SAAS;AACzB,YAAI,KAAK,SAAS,SAAS;AACzB,mBAAS,KAAK,EAAE,MAAM,WAAW,YAAY,CAAC,GAAG,UAAU,KAAK,CAAC;AAAA,QACnE;AAAA,MACF,CAAC;AACD,aAAO,EAAE,MAAM,qBAAqB,SAAS;AAAA,IAC/C,KAAK;AACH,aAAO,WAAW,OAAO,SAAS,OAAO,CAAC,YAAiB;AACzD,eAAO,QAAQ,SAAS,SAAS;AAAA,MACnC,CAAC;AACD,aAAO;AAAA,IACT;AACE,YAAM,IAAI,MAAM,mCAAmC;AAAA,EACvD;AACF;AAGA,IAAO,qCAAQ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/nearest-point-to-line",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "turf nearest-point-to-line module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -56,27 +56,27 @@
|
|
|
56
56
|
"test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@turf/circle": "^7.
|
|
60
|
-
"@turf/truncate": "^7.
|
|
59
|
+
"@turf/circle": "^7.2.0",
|
|
60
|
+
"@turf/truncate": "^7.2.0",
|
|
61
61
|
"@types/benchmark": "^2.1.5",
|
|
62
62
|
"@types/object-assign": "^4.0.33",
|
|
63
|
-
"@types/tape": "^4.
|
|
63
|
+
"@types/tape": "^4.13.4",
|
|
64
64
|
"benchmark": "^2.1.4",
|
|
65
65
|
"load-json-file": "^7.0.1",
|
|
66
66
|
"npm-run-all": "^4.1.5",
|
|
67
|
-
"tape": "^5.
|
|
68
|
-
"tsup": "^8.
|
|
69
|
-
"tsx": "^4.
|
|
70
|
-
"typescript": "^5.
|
|
67
|
+
"tape": "^5.9.0",
|
|
68
|
+
"tsup": "^8.3.5",
|
|
69
|
+
"tsx": "^4.19.2",
|
|
70
|
+
"typescript": "^5.5.4",
|
|
71
71
|
"write-json-file": "^5.0.0"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@turf/helpers": "^7.
|
|
75
|
-
"@turf/invariant": "^7.
|
|
76
|
-
"@turf/meta": "^7.
|
|
77
|
-
"@turf/point-to-line-distance": "^7.
|
|
74
|
+
"@turf/helpers": "^7.2.0",
|
|
75
|
+
"@turf/invariant": "^7.2.0",
|
|
76
|
+
"@turf/meta": "^7.2.0",
|
|
77
|
+
"@turf/point-to-line-distance": "^7.2.0",
|
|
78
78
|
"@types/geojson": "^7946.0.10",
|
|
79
|
-
"tslib": "^2.
|
|
79
|
+
"tslib": "^2.8.1"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
|
|
82
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-planepoint/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"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","file":"/home/runner/work/turf/turf/packages/turf-planepoint/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Polygon } from \"geojson\";\nimport { getCoord, getGeom } from \"@turf/invariant\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes a triangular plane as a polygon and a point within that triangle, and\n * returns the z-value at that point.\n *\n * The Polygon should have properties `a`, `b`, and `c`\n * that define the values at its three corners. Alternatively, the z-values\n * of each triangle point can be provided by their respective 3rd coordinate\n * if their values are not provided as properties.\n *\n * @function\n * @param {Coord} point the Point for which a z-value will be calculated\n * @param {Feature<Polygon>} triangle a Polygon feature with three vertices\n * @returns {number} the z-value for `interpolatedPoint`\n * @example\n * const point = turf.point([-75.3221, 39.529]);\n * // \"a\", \"b\", and \"c\" values represent the values of the coordinates in order.\n * const triangle = turf.polygon([[\n * [-75.1221, 39.57],\n * [-75.58, 39.18],\n * [-75.97, 39.86],\n * [-75.1221, 39.57]\n * ]], {\n * \"a\": 11,\n * \"b\": 122,\n * \"c\": 44\n * });\n *\n * const zValue = turf.planepoint(point, triangle);\n * point.properties.zValue = zValue;\n *\n * //addToMap\n * const addToMap = [triangle, point];\n */\nfunction planepoint(\n point: Coord,\n triangle: Feature<Polygon> | Polygon\n): number {\n // Normalize input\n const coord = getCoord(point);\n const geom = getGeom(triangle);\n const coords = geom.coordinates;\n const outer = coords[0];\n if (outer.length < 4)\n throw new Error(\"OuterRing of a Polygon must have 4 or more Positions.\");\n const properties = (triangle.type === \"Feature\" && triangle.properties) || {};\n const a = properties.a;\n const b = properties.b;\n const c = properties.c;\n\n // Planepoint\n const x = coord[0];\n const y = coord[1];\n const x1 = outer[0][0];\n const y1 = outer[0][1];\n const z1 = a !== undefined ? a : outer[0][2];\n const x2 = outer[1][0];\n const y2 = outer[1][1];\n const z2 = b !== undefined ? b : outer[1][2];\n const x3 = outer[2][0];\n const y3 = outer[2][1];\n const z3 = c !== undefined ? c : outer[2][2];\n const z =\n (z3 * (x - x1) * (y - y2) +\n z1 * (x - x2) * (y - y3) +\n z2 * (x - x3) * (y - y1) -\n z2 * (x - x1) * (y - y3) -\n z3 * (x - x2) * (y - y1) -\n z1 * (x - x3) * (y - y2)) /\n ((x - x1) * (y - y2) +\n (x - x2) * (y - y3) +\n (x - x3) * (y - y1) -\n (x - x1) * (y - y3) -\n (x - x2) * (y - y1) -\n (x - x3) * (y - y2));\n\n return z;\n}\n\nexport { planepoint };\nexport default planepoint;\n"]}
|
|
@@ -10,7 +10,7 @@ import { Coord } from '@turf/helpers';
|
|
|
10
10
|
* of each triangle point can be provided by their respective 3rd coordinate
|
|
11
11
|
* if their values are not provided as properties.
|
|
12
12
|
*
|
|
13
|
-
* @
|
|
13
|
+
* @function
|
|
14
14
|
* @param {Coord} point the Point for which a z-value will be calculated
|
|
15
15
|
* @param {Feature<Polygon>} triangle a Polygon feature with three vertices
|
|
16
16
|
* @returns {number} the z-value for `interpolatedPoint`
|
|
@@ -10,7 +10,7 @@ import { Coord } from '@turf/helpers';
|
|
|
10
10
|
* of each triangle point can be provided by their respective 3rd coordinate
|
|
11
11
|
* if their values are not provided as properties.
|
|
12
12
|
*
|
|
13
|
-
* @
|
|
13
|
+
* @function
|
|
14
14
|
* @param {Coord} point the Point for which a z-value will be calculated
|
|
15
15
|
* @param {Feature<Polygon>} triangle a Polygon feature with three vertices
|
|
16
16
|
* @returns {number} the z-value for `interpolatedPoint`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Polygon } from \"geojson\";\nimport { getCoord, getGeom } from \"@turf/invariant\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes a triangular plane as a polygon and a point within that triangle, and\n * returns the z-value at that point.\n *\n * The Polygon should have properties `a`, `b`, and `c`\n * that define the values at its three corners. Alternatively, the z-values\n * of each triangle point can be provided by their respective 3rd coordinate\n * if their values are not provided as properties.\n *\n * @
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Polygon } from \"geojson\";\nimport { getCoord, getGeom } from \"@turf/invariant\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes a triangular plane as a polygon and a point within that triangle, and\n * returns the z-value at that point.\n *\n * The Polygon should have properties `a`, `b`, and `c`\n * that define the values at its three corners. Alternatively, the z-values\n * of each triangle point can be provided by their respective 3rd coordinate\n * if their values are not provided as properties.\n *\n * @function\n * @param {Coord} point the Point for which a z-value will be calculated\n * @param {Feature<Polygon>} triangle a Polygon feature with three vertices\n * @returns {number} the z-value for `interpolatedPoint`\n * @example\n * const point = turf.point([-75.3221, 39.529]);\n * // \"a\", \"b\", and \"c\" values represent the values of the coordinates in order.\n * const triangle = turf.polygon([[\n * [-75.1221, 39.57],\n * [-75.58, 39.18],\n * [-75.97, 39.86],\n * [-75.1221, 39.57]\n * ]], {\n * \"a\": 11,\n * \"b\": 122,\n * \"c\": 44\n * });\n *\n * const zValue = turf.planepoint(point, triangle);\n * point.properties.zValue = zValue;\n *\n * //addToMap\n * const addToMap = [triangle, point];\n */\nfunction planepoint(\n point: Coord,\n triangle: Feature<Polygon> | Polygon\n): number {\n // Normalize input\n const coord = getCoord(point);\n const geom = getGeom(triangle);\n const coords = geom.coordinates;\n const outer = coords[0];\n if (outer.length < 4)\n throw new Error(\"OuterRing of a Polygon must have 4 or more Positions.\");\n const properties = (triangle.type === \"Feature\" && triangle.properties) || {};\n const a = properties.a;\n const b = properties.b;\n const c = properties.c;\n\n // Planepoint\n const x = coord[0];\n const y = coord[1];\n const x1 = outer[0][0];\n const y1 = outer[0][1];\n const z1 = a !== undefined ? a : outer[0][2];\n const x2 = outer[1][0];\n const y2 = outer[1][1];\n const z2 = b !== undefined ? b : outer[1][2];\n const x3 = outer[2][0];\n const y3 = outer[2][1];\n const z3 = c !== undefined ? c : outer[2][2];\n const z =\n (z3 * (x - x1) * (y - y2) +\n z1 * (x - x2) * (y - y3) +\n z2 * (x - x3) * (y - y1) -\n z2 * (x - x1) * (y - y3) -\n z3 * (x - x2) * (y - y1) -\n z1 * (x - x3) * (y - y2)) /\n ((x - x1) * (y - y2) +\n (x - x2) * (y - y3) +\n (x - x3) * (y - y1) -\n (x - x1) * (y - y3) -\n (x - x2) * (y - y1) -\n (x - x3) * (y - y2));\n\n return z;\n}\n\nexport { planepoint };\nexport default planepoint;\n"],"mappings":";AACA,SAAS,UAAU,eAAe;AAoClC,SAAS,WACP,OACA,UACQ;AAER,QAAM,QAAQ,SAAS,KAAK;AAC5B,QAAM,OAAO,QAAQ,QAAQ;AAC7B,QAAM,SAAS,KAAK;AACpB,QAAM,QAAQ,OAAO,CAAC;AACtB,MAAI,MAAM,SAAS;AACjB,UAAM,IAAI,MAAM,uDAAuD;AACzE,QAAM,aAAc,SAAS,SAAS,aAAa,SAAS,cAAe,CAAC;AAC5E,QAAM,IAAI,WAAW;AACrB,QAAM,IAAI,WAAW;AACrB,QAAM,IAAI,WAAW;AAGrB,QAAM,IAAI,MAAM,CAAC;AACjB,QAAM,IAAI,MAAM,CAAC;AACjB,QAAM,KAAK,MAAM,CAAC,EAAE,CAAC;AACrB,QAAM,KAAK,MAAM,CAAC,EAAE,CAAC;AACrB,QAAM,KAAK,MAAM,SAAY,IAAI,MAAM,CAAC,EAAE,CAAC;AAC3C,QAAM,KAAK,MAAM,CAAC,EAAE,CAAC;AACrB,QAAM,KAAK,MAAM,CAAC,EAAE,CAAC;AACrB,QAAM,KAAK,MAAM,SAAY,IAAI,MAAM,CAAC,EAAE,CAAC;AAC3C,QAAM,KAAK,MAAM,CAAC,EAAE,CAAC;AACrB,QAAM,KAAK,MAAM,CAAC,EAAE,CAAC;AACrB,QAAM,KAAK,MAAM,SAAY,IAAI,MAAM,CAAC,EAAE,CAAC;AAC3C,QAAM,KACH,MAAM,IAAI,OAAO,IAAI,MACpB,MAAM,IAAI,OAAO,IAAI,MACrB,MAAM,IAAI,OAAO,IAAI,MACrB,MAAM,IAAI,OAAO,IAAI,MACrB,MAAM,IAAI,OAAO,IAAI,MACrB,MAAM,IAAI,OAAO,IAAI,SACrB,IAAI,OAAO,IAAI,OACd,IAAI,OAAO,IAAI,OACf,IAAI,OAAO,IAAI,OACf,IAAI,OAAO,IAAI,OACf,IAAI,OAAO,IAAI,OACf,IAAI,OAAO,IAAI;AAEpB,SAAO;AACT;AAGA,IAAO,0BAAQ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/planepoint",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "turf planepoint module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,19 +54,19 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/benchmark": "^2.1.5",
|
|
57
|
-
"@types/tape": "^4.
|
|
57
|
+
"@types/tape": "^4.13.4",
|
|
58
58
|
"benchmark": "^2.1.4",
|
|
59
59
|
"npm-run-all": "^4.1.5",
|
|
60
|
-
"tape": "^5.
|
|
61
|
-
"tsup": "^8.
|
|
62
|
-
"tsx": "^4.
|
|
63
|
-
"typescript": "^5.
|
|
60
|
+
"tape": "^5.9.0",
|
|
61
|
+
"tsup": "^8.3.5",
|
|
62
|
+
"tsx": "^4.19.2",
|
|
63
|
+
"typescript": "^5.5.4"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@turf/helpers": "^7.
|
|
67
|
-
"@turf/invariant": "^7.
|
|
66
|
+
"@turf/helpers": "^7.2.0",
|
|
67
|
+
"@turf/invariant": "^7.2.0",
|
|
68
68
|
"@types/geojson": "^7946.0.10",
|
|
69
|
-
"tslib": "^2.
|
|
69
|
+
"tslib": "^2.8.1"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
|
|
72
72
|
}
|
|
@@ -3,8 +3,7 @@ var _booleanwithin = require('@turf/boolean-within');
|
|
|
3
3
|
var _distance = require('@turf/distance');
|
|
4
4
|
var _helpers = require('@turf/helpers');
|
|
5
5
|
function pointGrid(bbox, cellSide, options = {}) {
|
|
6
|
-
if (options.mask && !options.units)
|
|
7
|
-
options.units = "kilometers";
|
|
6
|
+
if (options.mask && !options.units) options.units = "kilometers";
|
|
8
7
|
var results = [];
|
|
9
8
|
var west = bbox[0];
|
|
10
9
|
var south = bbox[1];
|
|
@@ -26,8 +25,7 @@ function pointGrid(bbox, cellSide, options = {}) {
|
|
|
26
25
|
while (currentY <= north) {
|
|
27
26
|
var cellPt = _helpers.point.call(void 0, [currentX, currentY], options.properties);
|
|
28
27
|
if (options.mask) {
|
|
29
|
-
if (_booleanwithin.booleanWithin.call(void 0, cellPt, options.mask))
|
|
30
|
-
results.push(cellPt);
|
|
28
|
+
if (_booleanwithin.booleanWithin.call(void 0, cellPt, options.mask)) results.push(cellPt);
|
|
31
29
|
} else {
|
|
32
30
|
results.push(cellPt);
|
|
33
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-point-grid/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACSA,qDAAwC;AACxC,0CAAyB;AACzB,wCAAgD;AAuBhD,SAAS,SAAA,CACP,IAAA,EACA,QAAA,EACA,QAAA,EAII,CAAC,CAAA,EACwB;AAE7B,EAAA,GAAA,CAAI,OAAA,CAAQ,KAAA,GAAQ,CAAC,OAAA,CAAQ,KAAA,EAAO,OAAA,CAAQ,MAAA,EAAQ,YAAA;AAGpD,EAAA,IAAI,QAAA,EAAU,CAAC,CAAA;AAUf,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACjB,EAAA,IAAI,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AAClB,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACjB,EAAA,IAAI,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AAElB,EAAA,IAAI,UAAA,EAAY,SAAA,EAAW,gCAAA,CAAU,IAAA,EAAM,KAAK,CAAA,EAAG,CAAC,IAAA,EAAM,KAAK,CAAA,EAAG,OAAO,CAAA;AACzE,EAAA,IAAI,UAAA,EAAY,UAAA,EAAA,CAAa,KAAA,EAAO,IAAA,CAAA;AACpC,EAAA,IAAI,UAAA,EAAY,SAAA,EAAW,gCAAA,CAAU,IAAA,EAAM,KAAK,CAAA,EAAG,CAAC,IAAA,EAAM,KAAK,CAAA,EAAG,OAAO,CAAA;AACzE,EAAA,IAAI,WAAA,EAAa,UAAA,EAAA,CAAa,MAAA,EAAQ,KAAA,CAAA;AAEtC,EAAA,IAAI,UAAA,EAAY,KAAA,EAAO,IAAA;AACvB,EAAA,IAAI,WAAA,EAAa,MAAA,EAAQ,KAAA;AACzB,EAAA,IAAI,QAAA,EAAU,IAAA,CAAK,KAAA,CAAM,UAAA,EAAY,SAAS,CAAA;AAC9C,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,KAAA,CAAM,WAAA,EAAa,UAAU,CAAA;AAG7C,EAAA,IAAI,OAAA,EAAA,CAAU,UAAA,EAAY,QAAA,EAAU,SAAA,EAAA,EAAa,CAAA;AACjD,EAAA,IAAI,OAAA,EAAA,CAAU,WAAA,EAAa,KAAA,EAAO,UAAA,EAAA,EAAc,CAAA;AAEhD,EAAA,IAAI,SAAA,EAAW,KAAA,EAAO,MAAA;AACtB,EAAA,MAAA,CAAO,SAAA,GAAY,IAAA,EAAM;AACvB,IAAA,IAAI,SAAA,EAAW,MAAA,EAAQ,MAAA;AACvB,IAAA,MAAA,CAAO,SAAA,GAAY,KAAA,EAAO;AACxB,MAAA,IAAI,OAAA,EAAS,4BAAA,CAAO,QAAA,EAAU,QAAQ,CAAA,EAAG,OAAA,CAAQ,UAAU,CAAA;AAC3D,MAAA,GAAA,CAAI,OAAA,CAAQ,IAAA,EAAM;AAChB,QAAA,GAAA,CAAI,0CAAA,MAAO,EAAQ,OAAA,CAAQ,IAAI,CAAA,EAAG,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAA;AAAA,MACvD,EAAA,KAAO;AACL,QAAA,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAA;AAAA,MACrB;AACA,MAAA,SAAA,GAAY,UAAA;AAAA,IACd;AACA,IAAA,SAAA,GAAY,SAAA;AAAA,EACd;AAEA,EAAA,OAAO,wCAAA,OAAyB,CAAA;AAClC;AAGA,IAAO,wBAAA,EAAQ,SAAA;ADzDf;AACE;AACA;AACF,yEAAC","file":"/home/runner/work/turf/turf/packages/turf-point-grid/dist/cjs/index.cjs","sourcesContent":[null,"import {\n BBox,\n Feature,\n Polygon,\n MultiPolygon,\n FeatureCollection,\n Point,\n GeoJsonProperties,\n} from \"geojson\";\nimport { booleanWithin as within } from \"@turf/boolean-within\";\nimport { distance } from \"@turf/distance\";\nimport { point, featureCollection, Units } from \"@turf/helpers\";\n\n/**\n * Creates a grid of points\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order\n * @param {number} cellSide the distance between points\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cellSide value. Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}\n * @param {Feature<Polygon|MultiPolygon>} [options.mask] if passed a Polygon or MultiPolygon, the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Point>} grid of points\n * @example\n * var extent = [-70.823364, -33.553984, -70.473175, -33.302986];\n * var cellSide = 3;\n * var options = {units: 'miles'};\n *\n * var grid = turf.pointGrid(extent, cellSide, options);\n *\n * //addToMap\n * var addToMap = [grid];\n */\nfunction pointGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n mask?: Feature<Polygon | MultiPolygon>;\n properties?: P;\n } = {}\n): FeatureCollection<Point, P> {\n // Default parameters\n if (options.mask && !options.units) options.units = \"kilometers\";\n\n // Containers\n var results = [];\n\n // Typescript handles the Type Validation\n // if (cellSide === null || cellSide === undefined) throw new Error('cellSide is required');\n // if (!isNumber(cellSide)) throw new Error('cellSide is invalid');\n // if (!bbox) throw new Error('bbox is required');\n // if (!Array.isArray(bbox)) throw new Error('bbox must be array');\n // if (bbox.length !== 4) throw new Error('bbox must contain 4 numbers');\n // if (mask && ['Polygon', 'MultiPolygon'].indexOf(getType(mask)) === -1) throw new Error('options.mask must be a (Multi)Polygon');\n\n var west = bbox[0];\n var south = bbox[1];\n var east = bbox[2];\n var north = bbox[3];\n\n var xFraction = cellSide / distance([west, south], [east, south], options);\n var cellWidth = xFraction * (east - west);\n var yFraction = cellSide / distance([west, south], [west, north], options);\n var cellHeight = yFraction * (north - south);\n\n var bboxWidth = east - west;\n var bboxHeight = north - south;\n var columns = Math.floor(bboxWidth / cellWidth);\n var rows = Math.floor(bboxHeight / cellHeight);\n\n // adjust origin of the grid\n var deltaX = (bboxWidth - columns * cellWidth) / 2;\n var deltaY = (bboxHeight - rows * cellHeight) / 2;\n\n var currentX = west + deltaX;\n while (currentX <= east) {\n var currentY = south + deltaY;\n while (currentY <= north) {\n var cellPt = point([currentX, currentY], options.properties);\n if (options.mask) {\n if (within(cellPt, options.mask)) results.push(cellPt);\n } else {\n results.push(cellPt);\n }\n currentY += cellHeight;\n }\n currentX += cellWidth;\n }\n\n return featureCollection(results);\n}\n\nexport { pointGrid };\nexport default pointGrid;\n"]}
|
|
@@ -4,7 +4,7 @@ import { Units } from '@turf/helpers';
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates a grid of points
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @function
|
|
8
8
|
* @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order
|
|
9
9
|
* @param {number} cellSide the distance between points
|
|
10
10
|
* @param {Object} [options={}] Optional parameters
|