node-red-contrib-tak-registration 0.13.1 → 0.14.1
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/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/node/README.md +1 -1
- package/node_modules/@types/node/events.d.ts +1 -1
- package/node_modules/@types/node/globals.d.ts +8 -6
- package/node_modules/@types/node/module.d.ts +10 -3
- package/node_modules/@types/node/net.d.ts +3 -0
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/process.d.ts +35 -2
- package/node_modules/@types/node/sqlite.d.ts +30 -9
- 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/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/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/uuid/README.md +29 -16
- package/node_modules/uuid/dist/cjs/md5.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/native.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/rng.js +1 -1
- package/node_modules/uuid/dist/cjs/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/stringify.js +2 -1
- package/node_modules/uuid/dist/cjs/v1.js +10 -1
- package/node_modules/uuid/dist/cjs/v1ToV6.js +1 -1
- package/node_modules/uuid/dist/cjs/v35.js +3 -3
- package/node_modules/uuid/dist/cjs/v4.js +7 -1
- package/node_modules/uuid/dist/cjs/v6ToV1.js +1 -1
- package/node_modules/uuid/dist/cjs/v7.js +10 -1
- package/node_modules/uuid/dist/cjs-browser/rng.js +1 -1
- package/node_modules/uuid/dist/cjs-browser/stringify.js +2 -1
- package/node_modules/uuid/dist/cjs-browser/v1.js +10 -1
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +1 -1
- package/node_modules/uuid/dist/cjs-browser/v35.js +3 -3
- package/node_modules/uuid/dist/cjs-browser/v4.js +7 -1
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +1 -1
- package/node_modules/uuid/dist/cjs-browser/v7.js +10 -1
- package/node_modules/uuid/dist/esm/md5.d.ts +2 -0
- package/node_modules/uuid/dist/esm/native.d.ts +1 -0
- package/node_modules/uuid/dist/esm/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v1.js +8 -0
- package/node_modules/uuid/dist/esm/v4.js +7 -1
- package/node_modules/uuid/dist/esm/v7.js +8 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +8 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +7 -1
- package/node_modules/uuid/dist/esm-browser/v7.js +8 -0
- package/node_modules/uuid/package.json +26 -28
- package/package.json +4 -4
- package/tak-registration.js +3 -1
- 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/node_modules/robust-predicates/LICENSE +0 -24
- package/node_modules/polygon-clipping/node_modules/robust-predicates/README.md +0 -82
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/incircle.js +0 -765
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/insphere.js +0 -766
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient2d.js +0 -184
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient3d.js +0 -462
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/util.js +0 -138
- package/node_modules/polygon-clipping/node_modules/robust-predicates/index.d.ts +0 -49
- package/node_modules/polygon-clipping/node_modules/robust-predicates/index.js +0 -5
- package/node_modules/polygon-clipping/node_modules/robust-predicates/package.json +0 -75
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.js +0 -908
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.min.js +0 -1
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.js +0 -914
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.min.js +0 -1
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.js +0 -280
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.min.js +0 -1
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.js +0 -601
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.min.js +0 -1
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.js +0 -2328
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.min.js +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 -335
- package/node_modules/uuid/CONTRIBUTING.md +0 -18
- package/node_modules/uuid/dist/cjs/test/parse.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/parse.test.js +0 -50
- package/node_modules/uuid/dist/cjs/test/rng.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/rng.test.js +0 -14
- package/node_modules/uuid/dist/cjs/test/stringify.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/stringify.test.js +0 -23
- package/node_modules/uuid/dist/cjs/test/test_constants.d.ts +0 -33
- package/node_modules/uuid/dist/cjs/test/test_constants.js +0 -91
- package/node_modules/uuid/dist/cjs/test/v1.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/v1.test.js +0 -127
- package/node_modules/uuid/dist/cjs/test/v35.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/v35.test.js +0 -143
- package/node_modules/uuid/dist/cjs/test/v4.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/v4.test.js +0 -60
- package/node_modules/uuid/dist/cjs/test/v6.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/v6.test.js +0 -56
- package/node_modules/uuid/dist/cjs/test/v7.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/v7.test.js +0 -194
- package/node_modules/uuid/dist/cjs/test/validate.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/validate.test.js +0 -13
- package/node_modules/uuid/dist/cjs/test/version.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/test/version.test.js +0 -20
- package/node_modules/uuid/dist/cjs-browser/test/parse.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/parse.test.js +0 -50
- package/node_modules/uuid/dist/cjs-browser/test/rng.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/rng.test.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/test/stringify.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/stringify.test.js +0 -23
- package/node_modules/uuid/dist/cjs-browser/test/test_constants.d.ts +0 -33
- package/node_modules/uuid/dist/cjs-browser/test/test_constants.js +0 -91
- package/node_modules/uuid/dist/cjs-browser/test/v1.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/v1.test.js +0 -127
- package/node_modules/uuid/dist/cjs-browser/test/v35.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/v35.test.js +0 -143
- package/node_modules/uuid/dist/cjs-browser/test/v4.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/v4.test.js +0 -60
- package/node_modules/uuid/dist/cjs-browser/test/v6.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/v6.test.js +0 -56
- package/node_modules/uuid/dist/cjs-browser/test/v7.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/v7.test.js +0 -194
- package/node_modules/uuid/dist/cjs-browser/test/validate.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/validate.test.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/test/version.test.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/test/version.test.js +0 -20
- package/node_modules/uuid/dist/esm/test/parse.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/parse.test.js +0 -48
- package/node_modules/uuid/dist/esm/test/rng.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/rng.test.js +0 -12
- package/node_modules/uuid/dist/esm/test/stringify.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/stringify.test.js +0 -21
- package/node_modules/uuid/dist/esm/test/test_constants.d.ts +0 -33
- package/node_modules/uuid/dist/esm/test/test_constants.js +0 -88
- package/node_modules/uuid/dist/esm/test/v1.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/v1.test.js +0 -125
- package/node_modules/uuid/dist/esm/test/v35.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/v35.test.js +0 -141
- package/node_modules/uuid/dist/esm/test/v4.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/v4.test.js +0 -58
- package/node_modules/uuid/dist/esm/test/v6.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/v6.test.js +0 -54
- package/node_modules/uuid/dist/esm/test/v7.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/v7.test.js +0 -192
- package/node_modules/uuid/dist/esm/test/validate.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/validate.test.js +0 -11
- package/node_modules/uuid/dist/esm/test/version.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm/test/version.test.js +0 -18
- package/node_modules/uuid/dist/esm-browser/test/parse.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/parse.test.js +0 -48
- package/node_modules/uuid/dist/esm-browser/test/rng.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/rng.test.js +0 -12
- package/node_modules/uuid/dist/esm-browser/test/stringify.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/stringify.test.js +0 -21
- package/node_modules/uuid/dist/esm-browser/test/test_constants.d.ts +0 -33
- package/node_modules/uuid/dist/esm-browser/test/test_constants.js +0 -88
- package/node_modules/uuid/dist/esm-browser/test/v1.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/v1.test.js +0 -125
- package/node_modules/uuid/dist/esm-browser/test/v35.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/v35.test.js +0 -141
- package/node_modules/uuid/dist/esm-browser/test/v4.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/v4.test.js +0 -58
- package/node_modules/uuid/dist/esm-browser/test/v6.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/v6.test.js +0 -54
- package/node_modules/uuid/dist/esm-browser/test/v7.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/v7.test.js +0 -192
- package/node_modules/uuid/dist/esm-browser/test/validate.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/validate.test.js +0 -11
- package/node_modules/uuid/dist/esm-browser/test/version.test.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/test/version.test.js +0 -18
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## randomPosition
|
|
6
6
|
|
|
7
|
-
Returns a random position within a [box][1].
|
|
7
|
+
Returns a random position within a [bounding box][1].
|
|
8
8
|
|
|
9
9
|
### Parameters
|
|
10
10
|
|
|
11
|
-
* `bbox` **[
|
|
11
|
+
* `bbox` **[BBox][1]** a bounding box inside of which positions are placed. (optional, default `[-180,-90,180,90]`)
|
|
12
12
|
|
|
13
13
|
### Examples
|
|
14
14
|
|
|
@@ -17,20 +17,20 @@ var position = turf.randomPosition([-180, -90, 180, 90])
|
|
|
17
17
|
// => position
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
* Throws **[Error][
|
|
20
|
+
* Throws **[Error][2]** if bbox is invalid
|
|
21
21
|
|
|
22
|
-
Returns **[
|
|
22
|
+
Returns **[Position][3]** Position \[longitude, latitude]
|
|
23
23
|
|
|
24
24
|
## randomPoint
|
|
25
25
|
|
|
26
|
-
Returns a random [point][
|
|
26
|
+
Returns a random [point][4].
|
|
27
27
|
|
|
28
28
|
### Parameters
|
|
29
29
|
|
|
30
|
-
* `count` **[number][
|
|
30
|
+
* `count` **[number][5]** how many geometries will be generated (optional, default `1`)
|
|
31
31
|
* `options` **[Object][6]** Optional parameters (optional, default `{}`)
|
|
32
32
|
|
|
33
|
-
* `options.bbox` **[
|
|
33
|
+
* `options.bbox` **[BBox][1]** a bounding box inside of which geometries are placed. (optional, default `[-180,-90,180,90]`)
|
|
34
34
|
|
|
35
35
|
### Examples
|
|
36
36
|
|
|
@@ -39,7 +39,7 @@ var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})
|
|
|
39
39
|
// => points
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
* Throws **[Error][
|
|
42
|
+
* Throws **[Error][2]** if bbox is invalid
|
|
43
43
|
|
|
44
44
|
Returns **[FeatureCollection][7]<[Point][8]>** GeoJSON FeatureCollection of points
|
|
45
45
|
|
|
@@ -49,12 +49,12 @@ Returns a random [polygon][9].
|
|
|
49
49
|
|
|
50
50
|
### Parameters
|
|
51
51
|
|
|
52
|
-
* `count` **[number][
|
|
52
|
+
* `count` **[number][5]** how many geometries will be generated (optional, default `1`)
|
|
53
53
|
* `options` **[Object][6]** Optional parameters (optional, default `{}`)
|
|
54
54
|
|
|
55
|
-
* `options.bbox` **[
|
|
56
|
-
* `options.num_vertices` **[number][
|
|
57
|
-
* `options.max_radial_length` **[number][
|
|
55
|
+
* `options.bbox` **[BBox][1]** a bounding box inside of which geometries are placed. (optional, default `[-180,-90,180,90]`)
|
|
56
|
+
* `options.num_vertices` **[number][5]** is how many coordinates each LineString will contain. (optional, default `10`)
|
|
57
|
+
* `options.max_radial_length` **[number][5]** is the maximum number of decimal degrees latitude or longitude that a
|
|
58
58
|
vertex can reach out of the center of the Polygon. (optional, default `10`)
|
|
59
59
|
|
|
60
60
|
### Examples
|
|
@@ -64,24 +64,24 @@ var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})
|
|
|
64
64
|
// => polygons
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
* Throws **[Error][
|
|
67
|
+
* Throws **[Error][2]** if bbox is invalid
|
|
68
68
|
|
|
69
69
|
Returns **[FeatureCollection][7]<[Polygon][10]>** GeoJSON FeatureCollection of polygons
|
|
70
70
|
|
|
71
71
|
## randomLineString
|
|
72
72
|
|
|
73
|
-
Returns a random [
|
|
73
|
+
Returns a random [LineString][11].
|
|
74
74
|
|
|
75
75
|
### Parameters
|
|
76
76
|
|
|
77
|
-
* `count` **[number][
|
|
77
|
+
* `count` **[number][5]** how many geometries will be generated (optional, default `1`)
|
|
78
78
|
* `options` **[Object][6]** Optional parameters (optional, default `{}`)
|
|
79
79
|
|
|
80
|
-
* `options.bbox` **[
|
|
81
|
-
* `options.num_vertices` **[number][
|
|
82
|
-
* `options.max_length` **[number][
|
|
80
|
+
* `options.bbox` **[BBox][1]** a bounding box inside of which geometries are placed. (optional, default `[-180,-90,180,90]`)
|
|
81
|
+
* `options.num_vertices` **[number][5]** is how many coordinates each LineString will contain. (optional, default `10`)
|
|
82
|
+
* `options.max_length` **[number][5]** is the maximum number of decimal degrees that a
|
|
83
83
|
vertex can be from its predecessor (optional, default `0.0001`)
|
|
84
|
-
* `options.max_rotation` **[number][
|
|
84
|
+
* `options.max_rotation` **[number][5]** is the maximum number of radians that a
|
|
85
85
|
line segment can turn from the previous segment. (optional, default `Math.PI/8`)
|
|
86
86
|
|
|
87
87
|
### Examples
|
|
@@ -91,19 +91,19 @@ var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})
|
|
|
91
91
|
// => lineStrings
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
* Throws **[Error][
|
|
94
|
+
* Throws **[Error][2]** if bbox is invalid
|
|
95
95
|
|
|
96
|
-
Returns **[FeatureCollection][7]<[LineString][
|
|
96
|
+
Returns **[FeatureCollection][7]<[LineString][11]>** GeoJSON FeatureCollection of linestrings
|
|
97
97
|
|
|
98
|
-
[1]:
|
|
98
|
+
[1]: https://tools.ietf.org/html/rfc7946#section-5
|
|
99
99
|
|
|
100
|
-
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
100
|
+
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error
|
|
101
101
|
|
|
102
|
-
[3]: https://developer.mozilla.org/docs/Web/
|
|
102
|
+
[3]: https://developer.mozilla.org/docs/Web/API/Position
|
|
103
103
|
|
|
104
|
-
[4]:
|
|
104
|
+
[4]: point
|
|
105
105
|
|
|
106
|
-
[5]:
|
|
106
|
+
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
107
107
|
|
|
108
108
|
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
109
109
|
|
|
@@ -115,9 +115,7 @@ Returns **[FeatureCollection][7]<[LineString][12]>** GeoJSON FeatureCollection o
|
|
|
115
115
|
|
|
116
116
|
[10]: https://tools.ietf.org/html/rfc7946#section-3.1.6
|
|
117
117
|
|
|
118
|
-
[11]:
|
|
119
|
-
|
|
120
|
-
[12]: https://tools.ietf.org/html/rfc7946#section-3.1.4
|
|
118
|
+
[11]: https://tools.ietf.org/html/rfc7946#section-3.1.4
|
|
121
119
|
|
|
122
120
|
<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->
|
|
123
121
|
|
|
@@ -83,9 +83,7 @@ function randomPolygon(count, options = {}) {
|
|
|
83
83
|
]);
|
|
84
84
|
});
|
|
85
85
|
vertices[vertices.length - 1] = vertices[0];
|
|
86
|
-
vertices = vertices.map(
|
|
87
|
-
vertexToCoordinate(randomPositionUnchecked(paddedBbox))
|
|
88
|
-
);
|
|
86
|
+
vertices = vertices.reverse().map(vertexToCoordinate(randomPositionUnchecked(paddedBbox)));
|
|
89
87
|
features.push(_helpers.polygon.call(void 0, [vertices]));
|
|
90
88
|
}
|
|
91
89
|
return _helpers.featureCollection.call(void 0, features);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AAQA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,SAAS,eAAe,MAAwC;AAC9D,YAAU,IAAI;AACd,SAAO,wBAAwB,IAAI;AACrC;AAGA,SAAS,wBAAwB,MAAwC;AACvE,MAAI,MAAM,QAAQ,IAAI,GAAG;AACvB,WAAO,YAAY,IAAI;AAAA,EACzB;AACA,MAAI,QAAQ,KAAK,MAAM;AACrB,WAAO,YAAY,KAAK,IAAI;AAAA,EAC9B;AACA,SAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACtB;AAEA,SAAS,UAAU,MAA8B;AAC/C,MAAI,QAAQ,MAAM;AAChB;AAAA,EACF,WAAW,MAAM,QAAQ,IAAI,GAAG;AAC9B,iBAAa,IAAI;AAAA,EACnB,WAAW,KAAK,QAAQ,MAAM;AAC5B,iBAAa,KAAK,IAAI;AAAA,EACxB;AACF;AAeA,SAAS,YACP,OACA,UAEI,CAAC,GAC0B;AAC/B,YAAU,QAAQ,IAAI;AACtB,MAAI,UAAU,UAAa,UAAU,MAAM;AACzC,YAAQ;AAAA,EACV;AACA,QAAM,WAAW,CAAC;AAClB,WAAS,IAAI,GAAG,IAAI,OAAO,KAAK;AAC9B,aAAS,KAAK,MAAM,wBAAwB,QAAQ,IAAI,CAAC,CAAC;AAAA,EAC5D;AACA,SAAO,kBAAkB,QAAQ;AACnC;AAkBA,SAAS,cACP,OACA,UAII,CAAC,GAC4B;AACjC,YAAU,QAAQ,IAAI;AAGtB,MAAI,UAAU,UAAa,UAAU,MAAM;AACzC,YAAQ;AAAA,EACV;AACA,MAAI,QAAQ,SAAS,UAAa,QAAQ,SAAS,MAAM;AACvD,YAAQ,OAAO,CAAC,MAAM,KAAK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AC,EAAE,CAAC,IAAI,SAAS,IAAI,CAAC,EAAE,CAAC;AAAA,MACvC;AACN,YAAM,QAAQ,cAAc,KAAK,OAAO,IAAI,OAAO,eAAe;AAClE,YAAM,WAAW,KAAK,OAAO,IAAI;AACjC,eAAS,KAAK;AAAA,QACZ,SAAS,CAAC,EAAE,CAAC,IAAI,WAAW,KAAK,IAAI,KAAK;AAAA,QAC1C,SAAS,CAAC,EAAE,CAAC,IAAI,WAAW,KAAK,IAAI,KAAK;AAAA,MAC5C,CAAC;AAAA,IACH;AACA,aAAS,KAAK,WAAW,QAAQ,CAAC;AAAA,EACpC;AAEA,SAAO,kBAAkB,QAAQ;AACnC;AAEA,SAAS,mBAAmB,KAAe;AACzC,SAAO,CAAC,QAAkB;AACxB,WAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;AAAA,EAC1C;AACF;AAEA,SAAS,MAAM;AACb,SAAO,KAAK,OAAO,IAAI;AACzB;AACA,SAAS,MAAM;AACb,SAAO,IAAI,IAAI;AACjB;AACA,SAAS,MAAM;AACb,SAAO,IAAI,IAAI;AACjB;AAEA,SAAS,YAAY,MAAY;AAC/B,SAAO;AAAA,IACL,KAAK,OAAO,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC;AAAA,IAC5C,KAAK,OAAO,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC;AAAA,EAC9C;AACF","sourcesContent":["import {\n BBox,\n FeatureCollection,\n LineString,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport {\n featureCollection,\n isNumber,\n isObject,\n lineString,\n point,\n polygon,\n validateBBox,\n} from \"@turf/helpers\";\n\n/**\n * Returns a random position within a {@link bounding box}.\n *\n * @name randomPosition\n * @param {Array<number>} [bbox=[-180, -90, 180, 90]] a bounding box inside of which positions are placed.\n * @returns {Array<number>} Position [longitude, latitude]\n * @throws {Error} if bbox is invalid\n * @example\n * var position = turf.randomPosition([-180, -90, 180, 90])\n * // => position\n */\nfunction randomPosition(bbox?: BBox | { bbox: BBox }): Position {\n checkBBox(bbox);\n return randomPositionUnchecked(bbox);\n}\n\n// does not check bbox for validity, that is handled by the exported functions\nfunction randomPositionUnchecked(bbox?: BBox | { bbox: BBox }): Position {\n if (Array.isArray(bbox)) {\n return coordInBBox(bbox);\n }\n if (bbox && bbox.bbox) {\n return coordInBBox(bbox.bbox);\n }\n return [lon(), lat()];\n}\n\nfunction checkBBox(bbox?: BBox | { bbox: BBox }) {\n if (bbox == null) {\n return;\n } else if (Array.isArray(bbox)) {\n validateBBox(bbox);\n } else if (bbox.bbox != null) {\n validateBBox(bbox.bbox);\n }\n}\n\n/**\n * Returns a random {@link point}.\n *\n * @name randomPoint\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @returns {FeatureCollection<Point>} GeoJSON FeatureCollection of points\n * @throws {Error} if bbox is invalid\n * @example\n * var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})\n * // => points\n */\nfunction randomPoint(\n count?: number,\n options: {\n bbox?: BBox;\n } = {}\n): FeatureCollection<Point, any> {\n checkBBox(options.bbox);\n if (count === undefined || count === null) {\n count = 1;\n }\n const features = [];\n for (let i = 0; i < count; i++) {\n features.push(point(randomPositionUnchecked(options.bbox)));\n }\n return featureCollection(features);\n}\n\n/**\n * Returns a random {@link polygon}.\n *\n * @name randomPolygon\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.\n * @param {number} [options.max_radial_length=10] is the maximum number of decimal degrees latitude or longitude that a\n * vertex can reach out of the center of the Polygon.\n * @returns {FeatureCollection<Polygon>} GeoJSON FeatureCollection of polygons\n * @throws {Error} if bbox is invalid\n * @example\n * var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})\n * // => polygons\n */\nfunction randomPolygon(\n count?: number,\n options: {\n bbox?: BBox;\n num_vertices?: number;\n max_radial_length?: number;\n } = {}\n): FeatureCollection<Polygon, any> {\n checkBBox(options.bbox);\n\n // Default param\n if (count === undefined || count === null) {\n count = 1;\n }\n if (options.bbox === undefined || options.bbox === null) {\n options.bbox = [-180, -90, 180, 90];\n }\n if (!isNumber(options.num_vertices) || options.num_vertices === undefined) {\n options.num_vertices = 10;\n }\n if (\n !isNumber(options.max_radial_length) ||\n options.max_radial_length === undefined\n ) {\n options.max_radial_length = 10;\n }\n\n const bboxWidth = Math.abs(options.bbox[0] - options.bbox[2]);\n const bboxHeight = Math.abs(options.bbox[1] - options.bbox[3]);\n\n const maxRadius = Math.min(bboxWidth / 2, bboxHeight / 2);\n\n if (options.max_radial_length > maxRadius) {\n throw new Error(\"max_radial_length is greater than the radius of the bbox\");\n }\n\n // Create a padded bbox to avoid the polygons to be too close to the border\n const paddedBbox = [\n options.bbox[0] + options.max_radial_length,\n options.bbox[1] + options.max_radial_length,\n options.bbox[2] - options.max_radial_length,\n options.bbox[3] - options.max_radial_length,\n ] as BBox;\n\n const features = [];\n for (let i = 0; i < count; i++) {\n let vertices: any[] = [];\n const circleOffsets = [...Array(options.num_vertices + 1)].map(Math.random);\n\n // Sum Offsets\n circleOffsets.forEach((cur: any, index: number, arr: any[]) => {\n arr[index] = index > 0 ? cur + arr[index - 1] : cur;\n });\n\n // scaleOffsets\n circleOffsets.forEach((cur: any) => {\n cur = (cur * 2 * Math.PI) / circleOffsets[circleOffsets.length - 1];\n const radialScaler = Math.random();\n vertices.push([\n radialScaler * (options.max_radial_length || 10) * Math.sin(cur),\n radialScaler * (options.max_radial_length || 10) * Math.cos(cur),\n ]);\n });\n vertices[vertices.length - 1] = vertices[0]; // close the ring\n\n // center the polygon around something\n vertices = vertices.map(\n vertexToCoordinate(randomPositionUnchecked(paddedBbox))\n );\n features.push(polygon([vertices]));\n }\n return featureCollection(features);\n}\n\n/**\n * Returns a random {@link linestring}.\n *\n * @name randomLineString\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.\n * @param {number} [options.max_length=0.0001] is the maximum number of decimal degrees that a\n * vertex can be from its predecessor\n * @param {number} [options.max_rotation=Math.PI / 8] is the maximum number of radians that a\n * line segment can turn from the previous segment.\n * @returns {FeatureCollection<LineString>} GeoJSON FeatureCollection of linestrings\n * @throws {Error} if bbox is invalid\n * @example\n * var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})\n * // => lineStrings\n */\nfunction randomLineString(\n count?: number,\n options: {\n bbox?: BBox;\n num_vertices?: number;\n max_length?: number;\n max_rotation?: number;\n } = {}\n): FeatureCollection<LineString, any> {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) {\n throw new Error(\"options is invalid\");\n }\n const bbox = options.bbox;\n checkBBox(bbox);\n let num_vertices = options.num_vertices;\n let max_length = options.max_length;\n let max_rotation = options.max_rotation;\n if (count === undefined || count === null) {\n count = 1;\n }\n\n // Default parameters\n if (\n !isNumber(num_vertices) ||\n num_vertices === undefined ||\n num_vertices < 2\n ) {\n num_vertices = 10;\n }\n if (!isNumber(max_length) || max_length === undefined) {\n max_length = 0.0001;\n }\n if (!isNumber(max_rotation) || max_rotation === undefined) {\n max_rotation = Math.PI / 8;\n }\n\n const features = [];\n for (let i = 0; i < count; i++) {\n const startingPoint = randomPositionUnchecked(bbox);\n const vertices = [startingPoint];\n for (let j = 0; j < num_vertices - 1; j++) {\n const priorAngle =\n j === 0\n ? Math.random() * 2 * Math.PI\n : Math.tan(\n (vertices[j][1] - vertices[j - 1][1]) /\n (vertices[j][0] - vertices[j - 1][0])\n );\n const angle = priorAngle + (Math.random() - 0.5) * max_rotation * 2;\n const distance = Math.random() * max_length;\n vertices.push([\n vertices[j][0] + distance * Math.cos(angle),\n vertices[j][1] + distance * Math.sin(angle),\n ]);\n }\n features.push(lineString(vertices));\n }\n\n return featureCollection(features);\n}\n\nfunction vertexToCoordinate(hub: number[]) {\n return (cur: number[]) => {\n return [cur[0] + hub[0], cur[1] + hub[1]];\n };\n}\n\nfunction rnd() {\n return Math.random() - 0.5;\n}\nfunction lon() {\n return rnd() * 360;\n}\nfunction lat() {\n return rnd() * 180;\n}\n\nfunction coordInBBox(bbox: BBox) {\n return [\n Math.random() * (bbox[2] - bbox[0]) + bbox[0],\n Math.random() * (bbox[3] - bbox[1]) + bbox[1],\n ];\n}\n\nexport { randomPosition, randomPoint, randomPolygon, randomLineString };\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-random/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACQA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,wCACK;AAaP,SAAS,cAAA,CAAe,IAAA,EAAwC;AAC9D,EAAA,SAAA,CAAU,IAAI,CAAA;AACd,EAAA,OAAO,uBAAA,CAAwB,IAAI,CAAA;AACrC;AAGA,SAAS,uBAAA,CAAwB,IAAA,EAAwC;AACvE,EAAA,GAAA,CAAI,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,EAAG;AACvB,IAAA,OAAO,WAAA,CAAY,IAAI,CAAA;AAAA,EACzB;AACA,EAAA,GAAA,CAAI,KAAA,GAAQ,IAAA,CAAK,IAAA,EAAM;AACrB,IAAA,OAAO,WAAA,CAAY,IAAA,CAAK,IAAI,CAAA;AAAA,EAC9B;AACA,EAAA,OAAO,CAAC,GAAA,CAAI,CAAA,EAAG,GAAA,CAAI,CAAC,CAAA;AACtB;AAEA,SAAS,SAAA,CAAU,IAAA,EAA8B;AAC/C,EAAA,GAAA,CAAI,KAAA,GAAQ,IAAA,EAAM;AAChB,IAAA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QAAA,CAAS,IAAA,CAAK,iCAAA,QAAmB,CAAC,CAAA;AAAA,EACpC;AAEA,EAAA,OAAO,wCAAA,QAA0B,CAAA;AACnC;AAEA,SAAS,kBAAA,CAAmB,GAAA,EAAe;AACzC,EAAA,OAAO,CAAC,GAAA,EAAA,GAAkB;AACxB,IAAA,OAAO,CAAC,GAAA,CAAI,CAAC,EAAA,EAAI,GAAA,CAAI,CAAC,CAAA,EAAG,GAAA,CAAI,CAAC,EAAA,EAAI,GAAA,CAAI,CAAC,CAAC,CAAA;AAAA,EAC1C,CAAA;AACF;AAEA,SAAS,GAAA,CAAA,EAAM;AACb,EAAA,OAAO,IAAA,CAAK,MAAA,CAAO,EAAA,EAAI,GAAA;AACzB;AACA,SAAS,GAAA,CAAA,EAAM;AACb,EAAA,OAAO,GAAA,CAAI,EAAA,EAAI,GAAA;AACjB;AACA,SAAS,GAAA,CAAA,EAAM;AACb,EAAA,OAAO,GAAA,CAAI,EAAA,EAAI,GAAA;AACjB;AAEA,SAAS,WAAA,CAAY,IAAA,EAAY;AAC/B,EAAA,OAAO;AAAA,IACL,IAAA,CAAK,MAAA,CAAO,EAAA,EAAA,CAAK,IAAA,CAAK,CAAC,EAAA,EAAI,IAAA,CAAK,CAAC,CAAA,EAAA,EAAK,IAAA,CAAK,CAAC,CAAA;AAAA,IAC5C,IAAA,CAAK,MAAA,CAAO,EAAA,EAAA,CAAK,IAAA,CAAK,CAAC,EAAA,EAAI,IAAA,CAAK,CAAC,CAAA,EAAA,EAAK,IAAA,CAAK,CAAC;AAAA,EAC9C,CAAA;AACF;AD9HA;AACE;AACA;AACA;AACA;AACF,+JAAC","file":"/home/runner/work/turf/turf/packages/turf-random/dist/cjs/index.cjs","sourcesContent":[null,"import {\n BBox,\n FeatureCollection,\n LineString,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport {\n featureCollection,\n isNumber,\n isObject,\n lineString,\n point,\n polygon,\n validateBBox,\n} from \"@turf/helpers\";\n\n/**\n * Returns a random position within a {@link BBox|bounding box}.\n *\n * @function\n * @param {BBox} [bbox=[-180, -90, 180, 90]] a bounding box inside of which positions are placed.\n * @returns {Position} Position [longitude, latitude]\n * @throws {Error} if bbox is invalid\n * @example\n * var position = turf.randomPosition([-180, -90, 180, 90])\n * // => position\n */\nfunction randomPosition(bbox?: BBox | { bbox: BBox }): Position {\n checkBBox(bbox);\n return randomPositionUnchecked(bbox);\n}\n\n// does not check bbox for validity, that is handled by the exported functions\nfunction randomPositionUnchecked(bbox?: BBox | { bbox: BBox }): Position {\n if (Array.isArray(bbox)) {\n return coordInBBox(bbox);\n }\n if (bbox && bbox.bbox) {\n return coordInBBox(bbox.bbox);\n }\n return [lon(), lat()];\n}\n\nfunction checkBBox(bbox?: BBox | { bbox: BBox }) {\n if (bbox == null) {\n return;\n } else if (Array.isArray(bbox)) {\n validateBBox(bbox);\n } else if (bbox.bbox != null) {\n validateBBox(bbox.bbox);\n }\n}\n\n/**\n * Returns a random {@link point}.\n *\n * @function\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @returns {FeatureCollection<Point>} GeoJSON FeatureCollection of points\n * @throws {Error} if bbox is invalid\n * @example\n * var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})\n * // => points\n */\nfunction randomPoint(\n count?: number,\n options: {\n bbox?: BBox;\n } = {}\n): FeatureCollection<Point, any> {\n checkBBox(options.bbox);\n if (count === undefined || count === null) {\n count = 1;\n }\n const features = [];\n for (let i = 0; i < count; i++) {\n features.push(point(randomPositionUnchecked(options.bbox)));\n }\n return featureCollection(features);\n}\n\n/**\n * Returns a random {@link polygon}.\n *\n * @function\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.\n * @param {number} [options.max_radial_length=10] is the maximum number of decimal degrees latitude or longitude that a\n * vertex can reach out of the center of the Polygon.\n * @returns {FeatureCollection<Polygon>} GeoJSON FeatureCollection of polygons\n * @throws {Error} if bbox is invalid\n * @example\n * var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})\n * // => polygons\n */\nfunction randomPolygon(\n count?: number,\n options: {\n bbox?: BBox;\n num_vertices?: number;\n max_radial_length?: number;\n } = {}\n): FeatureCollection<Polygon, any> {\n checkBBox(options.bbox);\n\n // Default param\n if (count === undefined || count === null) {\n count = 1;\n }\n if (options.bbox === undefined || options.bbox === null) {\n options.bbox = [-180, -90, 180, 90];\n }\n if (!isNumber(options.num_vertices) || options.num_vertices === undefined) {\n options.num_vertices = 10;\n }\n if (\n !isNumber(options.max_radial_length) ||\n options.max_radial_length === undefined\n ) {\n options.max_radial_length = 10;\n }\n\n const bboxWidth = Math.abs(options.bbox[0] - options.bbox[2]);\n const bboxHeight = Math.abs(options.bbox[1] - options.bbox[3]);\n\n const maxRadius = Math.min(bboxWidth / 2, bboxHeight / 2);\n\n if (options.max_radial_length > maxRadius) {\n throw new Error(\"max_radial_length is greater than the radius of the bbox\");\n }\n\n // Create a padded bbox to avoid the polygons to be too close to the border\n const paddedBbox = [\n options.bbox[0] + options.max_radial_length,\n options.bbox[1] + options.max_radial_length,\n options.bbox[2] - options.max_radial_length,\n options.bbox[3] - options.max_radial_length,\n ] as BBox;\n\n const features = [];\n for (let i = 0; i < count; i++) {\n let vertices: number[][] = [];\n const circleOffsets = [...Array(options.num_vertices + 1)].map(Math.random);\n\n // Sum Offsets\n circleOffsets.forEach((cur, index, arr) => {\n arr[index] = index > 0 ? cur + arr[index - 1] : cur;\n });\n\n // scaleOffsets\n circleOffsets.forEach((cur) => {\n cur = (cur * 2 * Math.PI) / circleOffsets[circleOffsets.length - 1];\n const radialScaler = Math.random();\n vertices.push([\n radialScaler * (options.max_radial_length || 10) * Math.sin(cur),\n radialScaler * (options.max_radial_length || 10) * Math.cos(cur),\n ]);\n });\n vertices[vertices.length - 1] = vertices[0]; // close the ring\n\n // center the polygon around something\n vertices = vertices\n .reverse() // Make counter-clockwise to adhere to right hand rule.\n .map(vertexToCoordinate(randomPositionUnchecked(paddedBbox)));\n features.push(polygon([vertices]));\n }\n return featureCollection(features);\n}\n\n/**\n * Returns a random {@link LineString}.\n *\n * @function\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.\n * @param {number} [options.max_length=0.0001] is the maximum number of decimal degrees that a\n * vertex can be from its predecessor\n * @param {number} [options.max_rotation=Math.PI / 8] is the maximum number of radians that a\n * line segment can turn from the previous segment.\n * @returns {FeatureCollection<LineString>} GeoJSON FeatureCollection of linestrings\n * @throws {Error} if bbox is invalid\n * @example\n * var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})\n * // => lineStrings\n */\nfunction randomLineString(\n count?: number,\n options: {\n bbox?: BBox;\n num_vertices?: number;\n max_length?: number;\n max_rotation?: number;\n } = {}\n): FeatureCollection<LineString, any> {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) {\n throw new Error(\"options is invalid\");\n }\n const bbox = options.bbox;\n checkBBox(bbox);\n let num_vertices = options.num_vertices;\n let max_length = options.max_length;\n let max_rotation = options.max_rotation;\n if (count === undefined || count === null) {\n count = 1;\n }\n\n // Default parameters\n if (\n !isNumber(num_vertices) ||\n num_vertices === undefined ||\n num_vertices < 2\n ) {\n num_vertices = 10;\n }\n if (!isNumber(max_length) || max_length === undefined) {\n max_length = 0.0001;\n }\n if (!isNumber(max_rotation) || max_rotation === undefined) {\n max_rotation = Math.PI / 8;\n }\n\n const features = [];\n for (let i = 0; i < count; i++) {\n const startingPoint = randomPositionUnchecked(bbox);\n const vertices = [startingPoint];\n for (let j = 0; j < num_vertices - 1; j++) {\n const priorAngle =\n j === 0\n ? Math.random() * 2 * Math.PI\n : Math.tan(\n (vertices[j][1] - vertices[j - 1][1]) /\n (vertices[j][0] - vertices[j - 1][0])\n );\n const angle = priorAngle + (Math.random() - 0.5) * max_rotation * 2;\n const distance = Math.random() * max_length;\n vertices.push([\n vertices[j][0] + distance * Math.cos(angle),\n vertices[j][1] + distance * Math.sin(angle),\n ]);\n }\n features.push(lineString(vertices));\n }\n\n return featureCollection(features);\n}\n\nfunction vertexToCoordinate(hub: number[]) {\n return (cur: number[]) => {\n return [cur[0] + hub[0], cur[1] + hub[1]];\n };\n}\n\nfunction rnd() {\n return Math.random() - 0.5;\n}\nfunction lon() {\n return rnd() * 360;\n}\nfunction lat() {\n return rnd() * 180;\n}\n\nfunction coordInBBox(bbox: BBox) {\n return [\n Math.random() * (bbox[2] - bbox[0]) + bbox[0],\n Math.random() * (bbox[3] - bbox[1]) + bbox[1],\n ];\n}\n\nexport { randomPosition, randomPoint, randomPolygon, randomLineString };\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BBox, Position, FeatureCollection, Point, Polygon, LineString } from 'geojson';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Returns a random position within a {@link bounding box}.
|
|
4
|
+
* Returns a random position within a {@link BBox|bounding box}.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
7
|
-
* @param {
|
|
8
|
-
* @returns {
|
|
6
|
+
* @function
|
|
7
|
+
* @param {BBox} [bbox=[-180, -90, 180, 90]] a bounding box inside of which positions are placed.
|
|
8
|
+
* @returns {Position} Position [longitude, latitude]
|
|
9
9
|
* @throws {Error} if bbox is invalid
|
|
10
10
|
* @example
|
|
11
11
|
* var position = turf.randomPosition([-180, -90, 180, 90])
|
|
@@ -17,10 +17,10 @@ declare function randomPosition(bbox?: BBox | {
|
|
|
17
17
|
/**
|
|
18
18
|
* Returns a random {@link point}.
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @function
|
|
21
21
|
* @param {number} [count=1] how many geometries will be generated
|
|
22
22
|
* @param {Object} [options={}] Optional parameters
|
|
23
|
-
* @param {
|
|
23
|
+
* @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
|
|
24
24
|
* @returns {FeatureCollection<Point>} GeoJSON FeatureCollection of points
|
|
25
25
|
* @throws {Error} if bbox is invalid
|
|
26
26
|
* @example
|
|
@@ -33,10 +33,10 @@ declare function randomPoint(count?: number, options?: {
|
|
|
33
33
|
/**
|
|
34
34
|
* Returns a random {@link polygon}.
|
|
35
35
|
*
|
|
36
|
-
* @
|
|
36
|
+
* @function
|
|
37
37
|
* @param {number} [count=1] how many geometries will be generated
|
|
38
38
|
* @param {Object} [options={}] Optional parameters
|
|
39
|
-
* @param {
|
|
39
|
+
* @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
|
|
40
40
|
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
|
|
41
41
|
* @param {number} [options.max_radial_length=10] is the maximum number of decimal degrees latitude or longitude that a
|
|
42
42
|
* vertex can reach out of the center of the Polygon.
|
|
@@ -52,12 +52,12 @@ declare function randomPolygon(count?: number, options?: {
|
|
|
52
52
|
max_radial_length?: number;
|
|
53
53
|
}): FeatureCollection<Polygon, any>;
|
|
54
54
|
/**
|
|
55
|
-
* Returns a random {@link
|
|
55
|
+
* Returns a random {@link LineString}.
|
|
56
56
|
*
|
|
57
|
-
* @
|
|
57
|
+
* @function
|
|
58
58
|
* @param {number} [count=1] how many geometries will be generated
|
|
59
59
|
* @param {Object} [options={}] Optional parameters
|
|
60
|
-
* @param {
|
|
60
|
+
* @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
|
|
61
61
|
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
|
|
62
62
|
* @param {number} [options.max_length=0.0001] is the maximum number of decimal degrees that a
|
|
63
63
|
* vertex can be from its predecessor
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BBox, Position, FeatureCollection, Point, Polygon, LineString } from 'geojson';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Returns a random position within a {@link bounding box}.
|
|
4
|
+
* Returns a random position within a {@link BBox|bounding box}.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
7
|
-
* @param {
|
|
8
|
-
* @returns {
|
|
6
|
+
* @function
|
|
7
|
+
* @param {BBox} [bbox=[-180, -90, 180, 90]] a bounding box inside of which positions are placed.
|
|
8
|
+
* @returns {Position} Position [longitude, latitude]
|
|
9
9
|
* @throws {Error} if bbox is invalid
|
|
10
10
|
* @example
|
|
11
11
|
* var position = turf.randomPosition([-180, -90, 180, 90])
|
|
@@ -17,10 +17,10 @@ declare function randomPosition(bbox?: BBox | {
|
|
|
17
17
|
/**
|
|
18
18
|
* Returns a random {@link point}.
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @function
|
|
21
21
|
* @param {number} [count=1] how many geometries will be generated
|
|
22
22
|
* @param {Object} [options={}] Optional parameters
|
|
23
|
-
* @param {
|
|
23
|
+
* @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
|
|
24
24
|
* @returns {FeatureCollection<Point>} GeoJSON FeatureCollection of points
|
|
25
25
|
* @throws {Error} if bbox is invalid
|
|
26
26
|
* @example
|
|
@@ -33,10 +33,10 @@ declare function randomPoint(count?: number, options?: {
|
|
|
33
33
|
/**
|
|
34
34
|
* Returns a random {@link polygon}.
|
|
35
35
|
*
|
|
36
|
-
* @
|
|
36
|
+
* @function
|
|
37
37
|
* @param {number} [count=1] how many geometries will be generated
|
|
38
38
|
* @param {Object} [options={}] Optional parameters
|
|
39
|
-
* @param {
|
|
39
|
+
* @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
|
|
40
40
|
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
|
|
41
41
|
* @param {number} [options.max_radial_length=10] is the maximum number of decimal degrees latitude or longitude that a
|
|
42
42
|
* vertex can reach out of the center of the Polygon.
|
|
@@ -52,12 +52,12 @@ declare function randomPolygon(count?: number, options?: {
|
|
|
52
52
|
max_radial_length?: number;
|
|
53
53
|
}): FeatureCollection<Polygon, any>;
|
|
54
54
|
/**
|
|
55
|
-
* Returns a random {@link
|
|
55
|
+
* Returns a random {@link LineString}.
|
|
56
56
|
*
|
|
57
|
-
* @
|
|
57
|
+
* @function
|
|
58
58
|
* @param {number} [count=1] how many geometries will be generated
|
|
59
59
|
* @param {Object} [options={}] Optional parameters
|
|
60
|
-
* @param {
|
|
60
|
+
* @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
|
|
61
61
|
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
|
|
62
62
|
* @param {number} [options.max_length=0.0001] is the maximum number of decimal degrees that a
|
|
63
63
|
* vertex can be from its predecessor
|
|
@@ -83,9 +83,7 @@ function randomPolygon(count, options = {}) {
|
|
|
83
83
|
]);
|
|
84
84
|
});
|
|
85
85
|
vertices[vertices.length - 1] = vertices[0];
|
|
86
|
-
vertices = vertices.map(
|
|
87
|
-
vertexToCoordinate(randomPositionUnchecked(paddedBbox))
|
|
88
|
-
);
|
|
86
|
+
vertices = vertices.reverse().map(vertexToCoordinate(randomPositionUnchecked(paddedBbox)));
|
|
89
87
|
features.push(polygon([vertices]));
|
|
90
88
|
}
|
|
91
89
|
return featureCollection(features);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n FeatureCollection,\n LineString,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport {\n featureCollection,\n isNumber,\n isObject,\n lineString,\n point,\n polygon,\n validateBBox,\n} from \"@turf/helpers\";\n\n/**\n * Returns a random position within a {@link bounding box}.\n *\n * @name randomPosition\n * @param {Array<number>} [bbox=[-180, -90, 180, 90]] a bounding box inside of which positions are placed.\n * @returns {Array<number>} Position [longitude, latitude]\n * @throws {Error} if bbox is invalid\n * @example\n * var position = turf.randomPosition([-180, -90, 180, 90])\n * // => position\n */\nfunction randomPosition(bbox?: BBox | { bbox: BBox }): Position {\n checkBBox(bbox);\n return randomPositionUnchecked(bbox);\n}\n\n// does not check bbox for validity, that is handled by the exported functions\nfunction randomPositionUnchecked(bbox?: BBox | { bbox: BBox }): Position {\n if (Array.isArray(bbox)) {\n return coordInBBox(bbox);\n }\n if (bbox && bbox.bbox) {\n return coordInBBox(bbox.bbox);\n }\n return [lon(), lat()];\n}\n\nfunction checkBBox(bbox?: BBox | { bbox: BBox }) {\n if (bbox == null) {\n return;\n } else if (Array.isArray(bbox)) {\n validateBBox(bbox);\n } else if (bbox.bbox != null) {\n validateBBox(bbox.bbox);\n }\n}\n\n/**\n * Returns a random {@link point}.\n *\n * @name randomPoint\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @returns {FeatureCollection<Point>} GeoJSON FeatureCollection of points\n * @throws {Error} if bbox is invalid\n * @example\n * var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})\n * // => points\n */\nfunction randomPoint(\n count?: number,\n options: {\n bbox?: BBox;\n } = {}\n): FeatureCollection<Point, any> {\n checkBBox(options.bbox);\n if (count === undefined || count === null) {\n count = 1;\n }\n const features = [];\n for (let i = 0; i < count; i++) {\n features.push(point(randomPositionUnchecked(options.bbox)));\n }\n return featureCollection(features);\n}\n\n/**\n * Returns a random {@link polygon}.\n *\n * @name randomPolygon\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.\n * @param {number} [options.max_radial_length=10] is the maximum number of decimal degrees latitude or longitude that a\n * vertex can reach out of the center of the Polygon.\n * @returns {FeatureCollection<Polygon>} GeoJSON FeatureCollection of polygons\n * @throws {Error} if bbox is invalid\n * @example\n * var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})\n * // => polygons\n */\nfunction randomPolygon(\n count?: number,\n options: {\n bbox?: BBox;\n num_vertices?: number;\n max_radial_length?: number;\n } = {}\n): FeatureCollection<Polygon, any> {\n checkBBox(options.bbox);\n\n // Default param\n if (count === undefined || count === null) {\n count = 1;\n }\n if (options.bbox === undefined || options.bbox === null) {\n options.bbox = [-180, -90, 180, 90];\n }\n if (!isNumber(options.num_vertices) || options.num_vertices === undefined) {\n options.num_vertices = 10;\n }\n if (\n !isNumber(options.max_radial_length) ||\n options.max_radial_length === undefined\n ) {\n options.max_radial_length = 10;\n }\n\n const bboxWidth = Math.abs(options.bbox[0] - options.bbox[2]);\n const bboxHeight = Math.abs(options.bbox[1] - options.bbox[3]);\n\n const maxRadius = Math.min(bboxWidth / 2, bboxHeight / 2);\n\n if (options.max_radial_length > maxRadius) {\n throw new Error(\"max_radial_length is greater than the radius of the bbox\");\n }\n\n // Create a padded bbox to avoid the polygons to be too close to the border\n const paddedBbox = [\n options.bbox[0] + options.max_radial_length,\n options.bbox[1] + options.max_radial_length,\n options.bbox[2] - options.max_radial_length,\n options.bbox[3] - options.max_radial_length,\n ] as BBox;\n\n const features = [];\n for (let i = 0; i < count; i++) {\n let vertices: any[] = [];\n const circleOffsets = [...Array(options.num_vertices + 1)].map(Math.random);\n\n // Sum Offsets\n circleOffsets.forEach((cur: any, index: number, arr: any[]) => {\n arr[index] = index > 0 ? cur + arr[index - 1] : cur;\n });\n\n // scaleOffsets\n circleOffsets.forEach((cur: any) => {\n cur = (cur * 2 * Math.PI) / circleOffsets[circleOffsets.length - 1];\n const radialScaler = Math.random();\n vertices.push([\n radialScaler * (options.max_radial_length || 10) * Math.sin(cur),\n radialScaler * (options.max_radial_length || 10) * Math.cos(cur),\n ]);\n });\n vertices[vertices.length - 1] = vertices[0]; // close the ring\n\n // center the polygon around something\n vertices = vertices.map(\n vertexToCoordinate(randomPositionUnchecked(paddedBbox))\n );\n features.push(polygon([vertices]));\n }\n return featureCollection(features);\n}\n\n/**\n * Returns a random {@link linestring}.\n *\n * @name randomLineString\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.\n * @param {number} [options.max_length=0.0001] is the maximum number of decimal degrees that a\n * vertex can be from its predecessor\n * @param {number} [options.max_rotation=Math.PI / 8] is the maximum number of radians that a\n * line segment can turn from the previous segment.\n * @returns {FeatureCollection<LineString>} GeoJSON FeatureCollection of linestrings\n * @throws {Error} if bbox is invalid\n * @example\n * var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})\n * // => lineStrings\n */\nfunction randomLineString(\n count?: number,\n options: {\n bbox?: BBox;\n num_vertices?: number;\n max_length?: number;\n max_rotation?: number;\n } = {}\n): FeatureCollection<LineString, any> {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) {\n throw new Error(\"options is invalid\");\n }\n const bbox = options.bbox;\n checkBBox(bbox);\n let num_vertices = options.num_vertices;\n let max_length = options.max_length;\n let max_rotation = options.max_rotation;\n if (count === undefined || count === null) {\n count = 1;\n }\n\n // Default parameters\n if (\n !isNumber(num_vertices) ||\n num_vertices === undefined ||\n num_vertices < 2\n ) {\n num_vertices = 10;\n }\n if (!isNumber(max_length) || max_length === undefined) {\n max_length = 0.0001;\n }\n if (!isNumber(max_rotation) || max_rotation === undefined) {\n max_rotation = Math.PI / 8;\n }\n\n const features = [];\n for (let i = 0; i < count; i++) {\n const startingPoint = randomPositionUnchecked(bbox);\n const vertices = [startingPoint];\n for (let j = 0; j < num_vertices - 1; j++) {\n const priorAngle =\n j === 0\n ? Math.random() * 2 * Math.PI\n : Math.tan(\n (vertices[j][1] - vertices[j - 1][1]) /\n (vertices[j][0] - vertices[j - 1][0])\n );\n const angle = priorAngle + (Math.random() - 0.5) * max_rotation * 2;\n const distance = Math.random() * max_length;\n vertices.push([\n vertices[j][0] + distance * Math.cos(angle),\n vertices[j][1] + distance * Math.sin(angle),\n ]);\n }\n features.push(lineString(vertices));\n }\n\n return featureCollection(features);\n}\n\nfunction vertexToCoordinate(hub: number[]) {\n return (cur: number[]) => {\n return [cur[0] + hub[0], cur[1] + hub[1]];\n };\n}\n\nfunction rnd() {\n return Math.random() - 0.5;\n}\nfunction lon() {\n return rnd() * 360;\n}\nfunction lat() {\n return rnd() * 180;\n}\n\nfunction coordInBBox(bbox: BBox) {\n return [\n Math.random() * (bbox[2] - bbox[0]) + bbox[0],\n Math.random() * (bbox[3] - bbox[1]) + bbox[1],\n ];\n}\n\nexport { randomPosition, randomPoint, randomPolygon, randomLineString };\n"],"mappings":";AAQA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,SAAS,eAAe,MAAwC;AAC9D,YAAU,IAAI;AACd,SAAO,wBAAwB,IAAI;AACrC;AAGA,SAAS,wBAAwB,MAAwC;AACvE,MAAI,MAAM,QAAQ,IAAI,GAAG;AACvB,WAAO,YAAY,IAAI;AAAA,EACzB;AACA,MAAI,QAAQ,KAAK,MAAM;AACrB,WAAO,YAAY,KAAK,IAAI;AAAA,EAC9B;AACA,SAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACtB;AAEA,SAAS,UAAU,MAA8B;AAC/C,MAAI,QAAQ,MAAM;AAChB;AAAA,EACF,WAAW,MAAM,QAAQ,IAAI,GAAG;AAC9B,iBAAa,IAAI;AAAA,EACnB,WAAW,KAAK,QAAQ,MAAM;AAC5B,iBAAa,KAAK,IAAI;AAAA,EACxB;AACF;AAeA,SAAS,YACP,OACA,UAEI,CAAC,GAC0B;AAC/B,YAAU,QAAQ,IAAI;AACtB,MAAI,UAAU,UAAa,UAAU,MAAM;AACzC,YA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C;AAAA,IAC5C,KAAK,OAAO,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC;AAAA,EAC9C;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n FeatureCollection,\n LineString,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport {\n featureCollection,\n isNumber,\n isObject,\n lineString,\n point,\n polygon,\n validateBBox,\n} from \"@turf/helpers\";\n\n/**\n * Returns a random position within a {@link BBox|bounding box}.\n *\n * @function\n * @param {BBox} [bbox=[-180, -90, 180, 90]] a bounding box inside of which positions are placed.\n * @returns {Position} Position [longitude, latitude]\n * @throws {Error} if bbox is invalid\n * @example\n * var position = turf.randomPosition([-180, -90, 180, 90])\n * // => position\n */\nfunction randomPosition(bbox?: BBox | { bbox: BBox }): Position {\n checkBBox(bbox);\n return randomPositionUnchecked(bbox);\n}\n\n// does not check bbox for validity, that is handled by the exported functions\nfunction randomPositionUnchecked(bbox?: BBox | { bbox: BBox }): Position {\n if (Array.isArray(bbox)) {\n return coordInBBox(bbox);\n }\n if (bbox && bbox.bbox) {\n return coordInBBox(bbox.bbox);\n }\n return [lon(), lat()];\n}\n\nfunction checkBBox(bbox?: BBox | { bbox: BBox }) {\n if (bbox == null) {\n return;\n } else if (Array.isArray(bbox)) {\n validateBBox(bbox);\n } else if (bbox.bbox != null) {\n validateBBox(bbox.bbox);\n }\n}\n\n/**\n * Returns a random {@link point}.\n *\n * @function\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @returns {FeatureCollection<Point>} GeoJSON FeatureCollection of points\n * @throws {Error} if bbox is invalid\n * @example\n * var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})\n * // => points\n */\nfunction randomPoint(\n count?: number,\n options: {\n bbox?: BBox;\n } = {}\n): FeatureCollection<Point, any> {\n checkBBox(options.bbox);\n if (count === undefined || count === null) {\n count = 1;\n }\n const features = [];\n for (let i = 0; i < count; i++) {\n features.push(point(randomPositionUnchecked(options.bbox)));\n }\n return featureCollection(features);\n}\n\n/**\n * Returns a random {@link polygon}.\n *\n * @function\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.\n * @param {number} [options.max_radial_length=10] is the maximum number of decimal degrees latitude or longitude that a\n * vertex can reach out of the center of the Polygon.\n * @returns {FeatureCollection<Polygon>} GeoJSON FeatureCollection of polygons\n * @throws {Error} if bbox is invalid\n * @example\n * var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})\n * // => polygons\n */\nfunction randomPolygon(\n count?: number,\n options: {\n bbox?: BBox;\n num_vertices?: number;\n max_radial_length?: number;\n } = {}\n): FeatureCollection<Polygon, any> {\n checkBBox(options.bbox);\n\n // Default param\n if (count === undefined || count === null) {\n count = 1;\n }\n if (options.bbox === undefined || options.bbox === null) {\n options.bbox = [-180, -90, 180, 90];\n }\n if (!isNumber(options.num_vertices) || options.num_vertices === undefined) {\n options.num_vertices = 10;\n }\n if (\n !isNumber(options.max_radial_length) ||\n options.max_radial_length === undefined\n ) {\n options.max_radial_length = 10;\n }\n\n const bboxWidth = Math.abs(options.bbox[0] - options.bbox[2]);\n const bboxHeight = Math.abs(options.bbox[1] - options.bbox[3]);\n\n const maxRadius = Math.min(bboxWidth / 2, bboxHeight / 2);\n\n if (options.max_radial_length > maxRadius) {\n throw new Error(\"max_radial_length is greater than the radius of the bbox\");\n }\n\n // Create a padded bbox to avoid the polygons to be too close to the border\n const paddedBbox = [\n options.bbox[0] + options.max_radial_length,\n options.bbox[1] + options.max_radial_length,\n options.bbox[2] - options.max_radial_length,\n options.bbox[3] - options.max_radial_length,\n ] as BBox;\n\n const features = [];\n for (let i = 0; i < count; i++) {\n let vertices: number[][] = [];\n const circleOffsets = [...Array(options.num_vertices + 1)].map(Math.random);\n\n // Sum Offsets\n circleOffsets.forEach((cur, index, arr) => {\n arr[index] = index > 0 ? cur + arr[index - 1] : cur;\n });\n\n // scaleOffsets\n circleOffsets.forEach((cur) => {\n cur = (cur * 2 * Math.PI) / circleOffsets[circleOffsets.length - 1];\n const radialScaler = Math.random();\n vertices.push([\n radialScaler * (options.max_radial_length || 10) * Math.sin(cur),\n radialScaler * (options.max_radial_length || 10) * Math.cos(cur),\n ]);\n });\n vertices[vertices.length - 1] = vertices[0]; // close the ring\n\n // center the polygon around something\n vertices = vertices\n .reverse() // Make counter-clockwise to adhere to right hand rule.\n .map(vertexToCoordinate(randomPositionUnchecked(paddedBbox)));\n features.push(polygon([vertices]));\n }\n return featureCollection(features);\n}\n\n/**\n * Returns a random {@link LineString}.\n *\n * @function\n * @param {number} [count=1] how many geometries will be generated\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.\n * @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.\n * @param {number} [options.max_length=0.0001] is the maximum number of decimal degrees that a\n * vertex can be from its predecessor\n * @param {number} [options.max_rotation=Math.PI / 8] is the maximum number of radians that a\n * line segment can turn from the previous segment.\n * @returns {FeatureCollection<LineString>} GeoJSON FeatureCollection of linestrings\n * @throws {Error} if bbox is invalid\n * @example\n * var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})\n * // => lineStrings\n */\nfunction randomLineString(\n count?: number,\n options: {\n bbox?: BBox;\n num_vertices?: number;\n max_length?: number;\n max_rotation?: number;\n } = {}\n): FeatureCollection<LineString, any> {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) {\n throw new Error(\"options is invalid\");\n }\n const bbox = options.bbox;\n checkBBox(bbox);\n let num_vertices = options.num_vertices;\n let max_length = options.max_length;\n let max_rotation = options.max_rotation;\n if (count === undefined || count === null) {\n count = 1;\n }\n\n // Default parameters\n if (\n !isNumber(num_vertices) ||\n num_vertices === undefined ||\n num_vertices < 2\n ) {\n num_vertices = 10;\n }\n if (!isNumber(max_length) || max_length === undefined) {\n max_length = 0.0001;\n }\n if (!isNumber(max_rotation) || max_rotation === undefined) {\n max_rotation = Math.PI / 8;\n }\n\n const features = [];\n for (let i = 0; i < count; i++) {\n const startingPoint = randomPositionUnchecked(bbox);\n const vertices = [startingPoint];\n for (let j = 0; j < num_vertices - 1; j++) {\n const priorAngle =\n j === 0\n ? Math.random() * 2 * Math.PI\n : Math.tan(\n (vertices[j][1] - vertices[j - 1][1]) /\n (vertices[j][0] - vertices[j - 1][0])\n );\n const angle = priorAngle + (Math.random() - 0.5) * max_rotation * 2;\n const distance = Math.random() * max_length;\n vertices.push([\n vertices[j][0] + distance * Math.cos(angle),\n vertices[j][1] + distance * Math.sin(angle),\n ]);\n }\n features.push(lineString(vertices));\n }\n\n return featureCollection(features);\n}\n\nfunction vertexToCoordinate(hub: number[]) {\n return (cur: number[]) => {\n return [cur[0] + hub[0], cur[1] + hub[1]];\n };\n}\n\nfunction rnd() {\n return Math.random() - 0.5;\n}\nfunction lon() {\n return rnd() * 360;\n}\nfunction lat() {\n return rnd() * 180;\n}\n\nfunction coordInBBox(bbox: BBox) {\n return [\n Math.random() * (bbox[2] - bbox[0]) + bbox[0],\n Math.random() * (bbox[3] - bbox[1]) + bbox[1],\n ];\n}\n\nexport { randomPosition, randomPoint, randomPolygon, randomLineString };\n"],"mappings":";AAQA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,SAAS,eAAe,MAAwC;AAC9D,YAAU,IAAI;AACd,SAAO,wBAAwB,IAAI;AACrC;AAGA,SAAS,wBAAwB,MAAwC;AACvE,MAAI,MAAM,QAAQ,IAAI,GAAG;AACvB,WAAO,YAAY,IAAI;AAAA,EACzB;AACA,MAAI,QAAQ,KAAK,MAAM;AAC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,mBAAmB,KAAe;AACzC,SAAO,CAAC,QAAkB;AACxB,WAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;AAAA,EAC1C;AACF;AAEA,SAAS,MAAM;AACb,SAAO,KAAK,OAAO,IAAI;AACzB;AACA,SAAS,MAAM;AACb,SAAO,IAAI,IAAI;AACjB;AACA,SAAS,MAAM;AACb,SAAO,IAAI,IAAI;AACjB;AAEA,SAAS,YAAY,MAAY;AAC/B,SAAO;AAAA,IACL,KAAK,OAAO,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC;AAAA,IAC5C,KAAK,OAAO,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC;AAAA,EAC9C;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/random",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "turf random module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
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
|
"glob": "^10.3.10",
|
|
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
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@turf/helpers": "^7.
|
|
63
|
+
"@turf/helpers": "^7.2.0",
|
|
64
64
|
"@types/geojson": "^7946.0.10",
|
|
65
|
-
"tslib": "^2.
|
|
65
|
+
"tslib": "^2.8.1"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
|
|
68
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-rectangle-grid/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACAA,6DAA+C;AAS/C;AACE;AACA;AACA;AAAA,wCAEK;AA4BP,SAAS,aAAA,CACP,IAAA,EACA,SAAA,EACA,UAAA,EACA,QAAA,EAII,CAAC,CAAA,EAC0B;AAE/B,EAAA,MAAM,QAAA,EAAU,CAAC,CAAA;AACjB,EAAA,MAAM,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACnB,EAAA,MAAM,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AACpB,EAAA,MAAM,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACnB,EAAA,MAAM,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AAEpB,EAAA,MAAM,UAAA,EAAY,KAAA,EAAO,IAAA;AACzB,EAAA,MAAM,aAAA,EAAe,oCAAA,SAAc,EAAW,OAAA,CAAQ,KAAA,EAAO,SAAS,CAAA;AAEtE,EAAA,MAAM,WAAA,EAAa,MAAA,EAAQ,KAAA;AAC3B,EAAA,MAAM,cAAA,EAAgB,oCAAA,UAAc,EAAY,OAAA,CAAQ,KAAA,EAAO,SAAS,CAAA;AAExE,EAAA,MAAM,QAAA,EAAU,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,SAAS,EAAA,EAAI,YAAY,CAAA;AAC7D,EAAA,MAAM,KAAA,EAAO,IAAA,CAAK,KAAA,CAAM,IAAA,CA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A;AAAA,EACd;AACA,EAAA,OAAO,wCAAA,OAAyB,CAAA;AAClC;AAGA,IAAO,4BAAA,EAAQ,aAAA;ADtDf;AACE;AACA;AACF,qFAAC","file":"/home/runner/work/turf/turf/packages/turf-rectangle-grid/dist/cjs/index.cjs","sourcesContent":[null,"import { booleanIntersects as intersect } from \"@turf/boolean-intersects\";\nimport {\n BBox,\n Feature,\n FeatureCollection,\n MultiPolygon,\n Polygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport {\n convertLength,\n featureCollection,\n polygon,\n Units,\n} from \"@turf/helpers\";\n/**\n * Creates a grid of rectangular polygons with width and height consistent in degrees\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.\n * @param {number} cellWidth width of each cell, in units\n * @param {number} cellHeight height of each cell, in units\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cell width and height value.\n * Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}.\n * If you are looking for rectangles with equal width and height in linear units (e.g. kilometers) this is not the module for you.\n * The cellWidth and cellHeight is converted from units provided to degrees internally, so the width and height of resulting polygons will be consistent only in degrees.\n * @param {Feature<Polygon|MultiPolygon>} [options.mask] if passed a Polygon or MultiPolygon,\n * the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} a grid of polygons\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellWidth = 50;\n * var cellHeight = 20;\n * var options = {units: 'miles'};\n *\n * var rectangleGrid = turf.rectangleGrid(bbox, cellWidth, cellHeight, options);\n *\n * //addToMap\n * var addToMap = [rectangleGrid]\n */\nfunction rectangleGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellWidth: number,\n cellHeight: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n // Containers\n const results = [];\n const west = bbox[0];\n const south = bbox[1];\n const east = bbox[2];\n const north = bbox[3];\n\n const bboxWidth = east - west;\n const cellWidthDeg = convertLength(cellWidth, options.units, \"degrees\");\n\n const bboxHeight = north - south;\n const cellHeightDeg = convertLength(cellHeight, options.units, \"degrees\");\n\n const columns = Math.floor(Math.abs(bboxWidth) / cellWidthDeg);\n const rows = Math.floor(Math.abs(bboxHeight) / cellHeightDeg);\n\n // if the grid does not fill the bbox perfectly, center it.\n const deltaX = (bboxWidth - columns * cellWidthDeg) / 2;\n const deltaY = (bboxHeight - rows * cellHeightDeg) / 2;\n\n // iterate over columns & rows\n let currentX = west + deltaX;\n for (let column = 0; column < columns; column++) {\n let currentY = south + deltaY;\n for (let row = 0; row < rows; row++) {\n const cellPoly = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeightDeg],\n [currentX + cellWidthDeg, currentY + cellHeightDeg],\n [currentX + cellWidthDeg, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n if (options.mask) {\n if (intersect(options.mask, cellPoly)) {\n results.push(cellPoly);\n }\n } else {\n results.push(cellPoly);\n }\n\n currentY += cellHeightDeg;\n }\n currentX += cellWidthDeg;\n }\n return featureCollection(results);\n}\n\nexport { rectangleGrid };\nexport default rectangleGrid;\n"]}
|
|
@@ -4,7 +4,7 @@ import { Units } from '@turf/helpers';
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates a grid of rectangular polygons with width and height consistent in degrees
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @function
|
|
8
8
|
* @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.
|
|
9
9
|
* @param {number} cellWidth width of each cell, in units
|
|
10
10
|
* @param {number} cellHeight height of each cell, in units
|
|
@@ -4,7 +4,7 @@ import { Units } from '@turf/helpers';
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates a grid of rectangular polygons with width and height consistent in degrees
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @function
|
|
8
8
|
* @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.
|
|
9
9
|
* @param {number} cellWidth width of each cell, in units
|
|
10
10
|
* @param {number} cellHeight height of each cell, in units
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { booleanIntersects as intersect } from \"@turf/boolean-intersects\";\nimport {\n BBox,\n Feature,\n FeatureCollection,\n MultiPolygon,\n Polygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport {\n convertLength,\n featureCollection,\n polygon,\n Units,\n} from \"@turf/helpers\";\n/**\n * Creates a grid of rectangular polygons with width and height consistent in degrees\n *\n * @
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { booleanIntersects as intersect } from \"@turf/boolean-intersects\";\nimport {\n BBox,\n Feature,\n FeatureCollection,\n MultiPolygon,\n Polygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport {\n convertLength,\n featureCollection,\n polygon,\n Units,\n} from \"@turf/helpers\";\n/**\n * Creates a grid of rectangular polygons with width and height consistent in degrees\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.\n * @param {number} cellWidth width of each cell, in units\n * @param {number} cellHeight height of each cell, in units\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cell width and height value.\n * Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}.\n * If you are looking for rectangles with equal width and height in linear units (e.g. kilometers) this is not the module for you.\n * The cellWidth and cellHeight is converted from units provided to degrees internally, so the width and height of resulting polygons will be consistent only in degrees.\n * @param {Feature<Polygon|MultiPolygon>} [options.mask] if passed a Polygon or MultiPolygon,\n * the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection<Polygon>} a grid of polygons\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellWidth = 50;\n * var cellHeight = 20;\n * var options = {units: 'miles'};\n *\n * var rectangleGrid = turf.rectangleGrid(bbox, cellWidth, cellHeight, options);\n *\n * //addToMap\n * var addToMap = [rectangleGrid]\n */\nfunction rectangleGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellWidth: number,\n cellHeight: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n // Containers\n const results = [];\n const west = bbox[0];\n const south = bbox[1];\n const east = bbox[2];\n const north = bbox[3];\n\n const bboxWidth = east - west;\n const cellWidthDeg = convertLength(cellWidth, options.units, \"degrees\");\n\n const bboxHeight = north - south;\n const cellHeightDeg = convertLength(cellHeight, options.units, \"degrees\");\n\n const columns = Math.floor(Math.abs(bboxWidth) / cellWidthDeg);\n const rows = Math.floor(Math.abs(bboxHeight) / cellHeightDeg);\n\n // if the grid does not fill the bbox perfectly, center it.\n const deltaX = (bboxWidth - columns * cellWidthDeg) / 2;\n const deltaY = (bboxHeight - rows * cellHeightDeg) / 2;\n\n // iterate over columns & rows\n let currentX = west + deltaX;\n for (let column = 0; column < columns; column++) {\n let currentY = south + deltaY;\n for (let row = 0; row < rows; row++) {\n const cellPoly = polygon(\n [\n [\n [currentX, currentY],\n [currentX, currentY + cellHeightDeg],\n [currentX + cellWidthDeg, currentY + cellHeightDeg],\n [currentX + cellWidthDeg, currentY],\n [currentX, currentY],\n ],\n ],\n options.properties\n );\n if (options.mask) {\n if (intersect(options.mask, cellPoly)) {\n results.push(cellPoly);\n }\n } else {\n results.push(cellPoly);\n }\n\n currentY += cellHeightDeg;\n }\n currentX += cellWidthDeg;\n }\n return featureCollection(results);\n}\n\nexport { rectangleGrid };\nexport default rectangleGrid;\n"],"mappings":";AAAA,SAAS,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ACd;AACA,SAAO,kBAAkB,OAAO;AAClC;AAGA,IAAO,8BAAQ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/rectangle-grid",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "turf rectangle-grid module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -55,25 +55,25 @@
|
|
|
55
55
|
"test:tape": "tsx test.ts"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@turf/bbox-polygon": "^7.
|
|
59
|
-
"@turf/truncate": "^7.
|
|
58
|
+
"@turf/bbox-polygon": "^7.2.0",
|
|
59
|
+
"@turf/truncate": "^7.2.0",
|
|
60
60
|
"@types/benchmark": "^2.1.5",
|
|
61
|
-
"@types/tape": "^4.
|
|
61
|
+
"@types/tape": "^4.13.4",
|
|
62
62
|
"benchmark": "^2.1.4",
|
|
63
63
|
"load-json-file": "^7.0.1",
|
|
64
64
|
"npm-run-all": "^4.1.5",
|
|
65
|
-
"tape": "^5.
|
|
66
|
-
"tsup": "^8.
|
|
67
|
-
"tsx": "^4.
|
|
68
|
-
"typescript": "^5.
|
|
65
|
+
"tape": "^5.9.0",
|
|
66
|
+
"tsup": "^8.3.5",
|
|
67
|
+
"tsx": "^4.19.2",
|
|
68
|
+
"typescript": "^5.5.4",
|
|
69
69
|
"write-json-file": "^5.0.0"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@turf/boolean-intersects": "^7.
|
|
73
|
-
"@turf/distance": "^7.
|
|
74
|
-
"@turf/helpers": "^7.
|
|
72
|
+
"@turf/boolean-intersects": "^7.2.0",
|
|
73
|
+
"@turf/distance": "^7.2.0",
|
|
74
|
+
"@turf/helpers": "^7.2.0",
|
|
75
75
|
"@types/geojson": "^7946.0.10",
|
|
76
|
-
"tslib": "^2.
|
|
76
|
+
"tslib": "^2.8.1"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
|
|
79
79
|
}
|
|
@@ -7,12 +7,10 @@ var _helpers = require('@turf/helpers');
|
|
|
7
7
|
function rewind(geojson, options = {}) {
|
|
8
8
|
var _a, _b;
|
|
9
9
|
options = options || {};
|
|
10
|
-
if (!_helpers.isObject.call(void 0, options))
|
|
11
|
-
throw new Error("options is invalid");
|
|
10
|
+
if (!_helpers.isObject.call(void 0, options)) throw new Error("options is invalid");
|
|
12
11
|
const mutate = (_a = options.mutate) != null ? _a : false;
|
|
13
12
|
const reverse = (_b = options.reverse) != null ? _b : false;
|
|
14
|
-
if (!geojson)
|
|
15
|
-
throw new Error("<geojson> is required");
|
|
13
|
+
if (!geojson) throw new Error("<geojson> is required");
|
|
16
14
|
if (typeof reverse !== "boolean")
|
|
17
15
|
throw new Error("<reverse> must be a boolean");
|
|
18
16
|
if (typeof mutate !== "boolean")
|
|
@@ -68,8 +66,7 @@ function rewindFeature(geojson, reverse) {
|
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
68
|
function rewindLineString(coords, reverse) {
|
|
71
|
-
if (_booleanclockwise.booleanClockwise.call(void 0, coords) === reverse)
|
|
72
|
-
coords.reverse();
|
|
69
|
+
if (_booleanclockwise.booleanClockwise.call(void 0, coords) === reverse) coords.reverse();
|
|
73
70
|
}
|
|
74
71
|
function rewindPolygon(coords, reverse) {
|
|
75
72
|
if (_booleanclockwise.booleanClockwise.call(void 0, coords[0]) !== reverse) {
|