node-red-contrib-tak-registration 0.16.0 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@turf/along/README.md +3 -1
- package/node_modules/@turf/along/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/along/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/along/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/along/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/along/dist/esm/index.js +2 -2
- package/node_modules/@turf/along/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/along/package.json +12 -12
- package/node_modules/@turf/angle/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/angle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/angle/dist/esm/index.js +2 -2
- package/node_modules/@turf/angle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/angle/package.json +16 -16
- package/node_modules/@turf/area/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/area/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/area/dist/esm/index.js +2 -2
- package/node_modules/@turf/area/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/area/package.json +10 -10
- package/node_modules/@turf/bbox/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bbox/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox/dist/esm/index.js +2 -2
- package/node_modules/@turf/bbox/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox/package.json +9 -9
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-clip/dist/esm/index.js +2 -2
- package/node_modules/@turf/bbox-clip/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox-clip/package.json +11 -11
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/bbox-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox-polygon/package.json +8 -8
- package/node_modules/@turf/bearing/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bearing/dist/esm/index.js +2 -2
- package/node_modules/@turf/bearing/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bearing/package.json +11 -11
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bezier-spline/dist/esm/index.js +2 -2
- package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bezier-spline/package.json +10 -10
- package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-clockwise/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-clockwise/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-clockwise/package.json +10 -10
- package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-concave/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-concave/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-concave/package.json +10 -10
- package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-contains/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-contains/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-contains/package.json +13 -13
- package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-crosses/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-crosses/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-crosses/package.json +13 -13
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-disjoint/package.json +12 -12
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-equal/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-equal/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-equal/package.json +11 -11
- package/node_modules/@turf/boolean-intersects/README.md +1 -1
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-intersects/package.json +10 -10
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-overlap/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-overlap/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-overlap/package.json +13 -13
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-parallel/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-parallel/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-parallel/package.json +12 -12
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/package.json +9 -9
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-point-on-line/package.json +11 -11
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-touches/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-touches/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-touches/package.json +12 -12
- package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-valid/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-valid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-valid/package.json +17 -17
- package/node_modules/@turf/boolean-within/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-within/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-within/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-within/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-within/package.json +13 -13
- package/node_modules/@turf/buffer/README.md +3 -3
- package/node_modules/@turf/buffer/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/buffer/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/buffer/dist/esm/index.js +2 -2
- package/node_modules/@turf/buffer/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/buffer/package.json +13 -13
- package/node_modules/@turf/center/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center/dist/esm/index.js +2 -2
- package/node_modules/@turf/center/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center/package.json +13 -13
- package/node_modules/@turf/center-mean/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center-mean/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-mean/dist/esm/index.js +2 -2
- package/node_modules/@turf/center-mean/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-mean/package.json +14 -14
- package/node_modules/@turf/center-median/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center-median/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-median/dist/esm/index.js +2 -2
- package/node_modules/@turf/center-median/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-median/package.json +17 -17
- package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-of-mass/dist/esm/index.js +2 -2
- package/node_modules/@turf/center-of-mass/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-of-mass/package.json +14 -14
- package/node_modules/@turf/centroid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/centroid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/centroid/dist/esm/index.js +2 -2
- package/node_modules/@turf/centroid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/centroid/package.json +11 -11
- package/node_modules/@turf/circle/README.md +13 -13
- package/node_modules/@turf/circle/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/circle/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/circle/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/circle/dist/esm/index.js +2 -2
- package/node_modules/@turf/circle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/circle/package.json +11 -11
- package/node_modules/@turf/clean-coords/dist/cjs/index.cjs +33 -49
- package/node_modules/@turf/clean-coords/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clean-coords/dist/esm/index.js +33 -49
- package/node_modules/@turf/clean-coords/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clean-coords/package.json +15 -12
- package/node_modules/@turf/clone/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/clone/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clone/dist/esm/index.js +2 -2
- package/node_modules/@turf/clone/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clone/package.json +9 -9
- package/node_modules/@turf/clusters/package.json +9 -9
- package/node_modules/@turf/clusters-dbscan/README.md +2 -2
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs +3 -8
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js +4 -9
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters-dbscan/package.json +15 -15
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.js +2 -2
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters-kmeans/package.json +15 -15
- package/node_modules/@turf/collect/dist/cjs/index.cjs +3 -8
- package/node_modules/@turf/collect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/collect/dist/esm/index.js +3 -8
- package/node_modules/@turf/collect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/collect/package.json +11 -11
- package/node_modules/@turf/combine/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/combine/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/combine/dist/esm/index.js +2 -2
- package/node_modules/@turf/combine/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/combine/package.json +9 -9
- package/node_modules/@turf/concave/README.md +2 -2
- package/node_modules/@turf/concave/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/concave/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/concave/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/concave/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/concave/dist/esm/index.js +2 -2
- package/node_modules/@turf/concave/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/concave/package.json +14 -14
- package/node_modules/@turf/convex/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/convex/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/convex/dist/esm/index.js +2 -2
- package/node_modules/@turf/convex/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/convex/package.json +11 -11
- package/node_modules/@turf/destination/README.md +2 -2
- package/node_modules/@turf/destination/dist/cjs/index.cjs +5 -2
- package/node_modules/@turf/destination/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/destination/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/destination/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/destination/dist/esm/index.js +5 -2
- package/node_modules/@turf/destination/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/destination/package.json +14 -11
- package/node_modules/@turf/difference/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/difference/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/difference/dist/esm/index.js +2 -2
- package/node_modules/@turf/difference/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/difference/package.json +11 -11
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/dissolve/dist/esm/index.js +2 -2
- package/node_modules/@turf/dissolve/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/dissolve/package.json +12 -12
- package/node_modules/@turf/distance/README.md +2 -2
- package/node_modules/@turf/distance/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/distance/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/distance/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/distance/dist/esm/index.js +2 -2
- package/node_modules/@turf/distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/distance/package.json +10 -10
- package/node_modules/@turf/distance-weight/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/distance-weight/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/distance-weight/dist/esm/index.js +2 -2
- package/node_modules/@turf/distance-weight/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/distance-weight/package.json +12 -12
- package/node_modules/@turf/ellipse/README.md +2 -2
- package/node_modules/@turf/ellipse/dist/cjs/index.cjs +62 -39
- package/node_modules/@turf/ellipse/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/ellipse/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/ellipse/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/ellipse/dist/esm/index.js +64 -41
- package/node_modules/@turf/ellipse/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/ellipse/package.json +21 -18
- package/node_modules/@turf/envelope/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/envelope/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/envelope/dist/esm/index.js +2 -2
- package/node_modules/@turf/envelope/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/envelope/package.json +10 -10
- package/node_modules/@turf/explode/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/explode/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/explode/dist/esm/index.js +2 -2
- package/node_modules/@turf/explode/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/explode/package.json +10 -10
- package/node_modules/@turf/flatten/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/flatten/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flatten/dist/esm/index.js +2 -2
- package/node_modules/@turf/flatten/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/flatten/package.json +10 -10
- package/node_modules/@turf/flip/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/flip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flip/dist/esm/index.js +2 -2
- package/node_modules/@turf/flip/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/flip/package.json +11 -11
- package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js +2 -2
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/geojson-rbush/package.json +12 -12
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/great-circle/dist/esm/index.js +3 -3
- package/node_modules/@turf/great-circle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/great-circle/package.json +10 -10
- package/node_modules/@turf/helpers/README.md +1 -1
- package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/helpers/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/helpers/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/helpers/package.json +7 -7
- package/node_modules/@turf/hex-grid/README.md +7 -5
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/hex-grid/dist/cjs/index.d.cts +4 -4
- package/node_modules/@turf/hex-grid/dist/esm/index.d.ts +4 -4
- package/node_modules/@turf/hex-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/hex-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/hex-grid/package.json +14 -14
- package/node_modules/@turf/interpolate/README.md +7 -5
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/interpolate/dist/esm/index.js +2 -2
- package/node_modules/@turf/interpolate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/interpolate/package.json +19 -19
- package/node_modules/@turf/intersect/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/intersect/dist/esm/index.js +2 -2
- package/node_modules/@turf/intersect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/intersect/package.json +11 -11
- package/node_modules/@turf/invariant/package.json +8 -8
- package/node_modules/@turf/isobands/README.md +1 -1
- package/node_modules/@turf/isobands/dist/cjs/index.cjs +313 -9
- package/node_modules/@turf/isobands/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/isobands/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/isobands/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/isobands/dist/esm/index.js +313 -9
- package/node_modules/@turf/isobands/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isobands/package.json +22 -22
- package/node_modules/@turf/isolines/README.md +1 -1
- package/node_modules/@turf/isolines/dist/cjs/index.cjs +192 -7
- package/node_modules/@turf/isolines/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/isolines/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/isolines/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/isolines/dist/esm/index.js +192 -7
- package/node_modules/@turf/isolines/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isolines/package.json +19 -19
- package/node_modules/@turf/kinks/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/kinks/dist/esm/index.js +2 -2
- package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/kinks/package.json +10 -10
- package/node_modules/@turf/length/README.md +2 -2
- package/node_modules/@turf/length/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/length/dist/esm/index.js +2 -2
- package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/length/package.json +11 -11
- package/node_modules/@turf/line-arc/README.md +2 -2
- package/node_modules/@turf/line-arc/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/line-arc/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-arc/package.json +12 -12
- package/node_modules/@turf/line-chunk/README.md +2 -2
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-chunk/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-chunk/package.json +12 -12
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-intersect/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-intersect/package.json +10 -10
- package/node_modules/@turf/line-offset/README.md +2 -2
- package/node_modules/@turf/line-offset/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-offset/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-offset/package.json +11 -11
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-overlap/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-overlap/package.json +15 -15
- package/node_modules/@turf/line-segment/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-segment/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-segment/package.json +11 -11
- package/node_modules/@turf/line-slice/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-slice/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-slice/package.json +11 -11
- package/node_modules/@turf/line-slice-along/README.md +2 -2
- package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-slice-along/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-slice-along/package.json +12 -12
- package/node_modules/@turf/line-split/README.md +4 -1
- package/node_modules/@turf/line-split/dist/cjs/index.cjs +2 -7
- package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-split/dist/esm/index.js +2 -7
- package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-split/package.json +16 -17
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-to-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-to-polygon/package.json +12 -12
- package/node_modules/@turf/mask/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/mask/dist/esm/index.js +2 -2
- package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/mask/package.json +10 -10
- package/node_modules/@turf/meta/package.json +7 -7
- package/node_modules/@turf/midpoint/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/midpoint/dist/esm/index.js +2 -2
- package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/midpoint/package.json +11 -11
- package/node_modules/@turf/moran-index/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/moran-index/dist/esm/index.js +2 -2
- package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/moran-index/package.json +11 -11
- package/node_modules/@turf/nearest-neighbor-analysis/README.md +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
- package/node_modules/@turf/nearest-point/README.md +2 -2
- package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +6 -7
- package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +6 -7
- package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -2
- package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point/package.json +12 -12
- package/node_modules/@turf/nearest-point-on-line/README.md +6 -2
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +45 -52
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +5 -1
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +5 -1
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +45 -52
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point-on-line/package.json +20 -15
- package/node_modules/@turf/nearest-point-to-line/README.md +2 -2
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js +2 -2
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
- package/node_modules/@turf/planepoint/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/planepoint/dist/esm/index.js +2 -2
- package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/planepoint/package.json +9 -9
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-grid/package.json +14 -14
- package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-on-feature/dist/esm/index.js +2 -2
- package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-on-feature/package.json +15 -15
- package/node_modules/@turf/point-to-line-distance/README.md +5 -4
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +1 -2
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +1 -2
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +2 -2
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-to-line-distance/package.json +18 -18
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +3 -3
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-to-polygon-distance/package.json +14 -14
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/points-within-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/points-within-polygon/package.json +10 -10
- package/node_modules/@turf/polygon-smooth/README.md +1 -1
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/polygon-smooth/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-smooth/package.json +11 -11
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-tangents/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-tangents/package.json +14 -14
- package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-to-line/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-to-line/package.json +10 -10
- package/node_modules/@turf/polygonize/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygonize/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygonize/package.json +13 -13
- package/node_modules/@turf/projection/package.json +12 -12
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/quadrat-analysis/dist/esm/index.js +2 -2
- package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/quadrat-analysis/package.json +18 -18
- package/node_modules/@turf/random/package.json +9 -9
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rectangle-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rectangle-grid/package.json +13 -13
- package/node_modules/@turf/rewind/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rewind/dist/esm/index.js +2 -2
- package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rewind/package.json +13 -13
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/esm/index.js +2 -2
- package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-bearing/package.json +11 -11
- package/node_modules/@turf/rhumb-destination/README.md +2 -2
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/rhumb-destination/dist/esm/index.js +2 -2
- package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-destination/package.json +11 -11
- package/node_modules/@turf/rhumb-distance/README.md +8 -9
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +2 -3
- package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +2 -3
- package/node_modules/@turf/rhumb-distance/dist/esm/index.js +2 -2
- package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-distance/package.json +11 -11
- package/node_modules/@turf/sample/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/sample/dist/esm/index.js +2 -2
- package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/sample/package.json +8 -8
- package/node_modules/@turf/sector/README.md +2 -2
- package/node_modules/@turf/sector/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/sector/dist/esm/index.js +2 -2
- package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/sector/package.json +14 -14
- package/node_modules/@turf/shortest-path/README.md +5 -3
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +10 -14
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/shortest-path/dist/esm/index.js +10 -14
- package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/shortest-path/package.json +20 -19
- package/node_modules/@turf/simplify/README.md +13 -13
- package/node_modules/@turf/simplify/dist/cjs/index.cjs +6 -3
- package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/simplify/dist/cjs/index.d.cts +11 -12
- package/node_modules/@turf/simplify/dist/esm/index.d.ts +11 -12
- package/node_modules/@turf/simplify/dist/esm/index.js +6 -3
- package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/simplify/package.json +13 -13
- package/node_modules/@turf/square/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/square/dist/esm/index.js +2 -2
- package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/square/package.json +9 -9
- package/node_modules/@turf/square-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/square-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/square-grid/package.json +12 -12
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +2 -2
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
- package/node_modules/@turf/tag/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tag/dist/esm/index.js +2 -2
- package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tag/package.json +11 -11
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tesselate/dist/esm/index.js +2 -2
- package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tesselate/package.json +8 -8
- package/node_modules/@turf/tin/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tin/dist/esm/index.js +2 -2
- package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tin/package.json +8 -8
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-rotate/dist/esm/index.js +2 -2
- package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-rotate/package.json +17 -17
- package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-scale/dist/esm/index.js +2 -2
- package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-scale/package.json +21 -21
- package/node_modules/@turf/transform-translate/README.md +8 -3
- package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +4 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +4 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.js +2 -2
- package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-translate/package.json +14 -14
- package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/triangle-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/triangle-grid/package.json +13 -13
- package/node_modules/@turf/truncate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/truncate/dist/esm/index.js +2 -2
- package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/truncate/package.json +10 -10
- package/node_modules/@turf/turf/package.json +125 -125
- package/node_modules/@turf/turf/turf.min.js +2 -11
- package/node_modules/@turf/union/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/union/dist/esm/index.js +2 -2
- package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/union/package.json +11 -11
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/unkink-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/unkink-polygon/package.json +13 -13
- package/node_modules/@turf/voronoi/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/voronoi/dist/esm/index.js +2 -2
- package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/voronoi/package.json +12 -12
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert/strict.d.ts +105 -2
- package/node_modules/@types/node/assert.d.ts +162 -101
- package/node_modules/@types/node/async_hooks.d.ts +26 -6
- package/node_modules/@types/node/buffer.buffer.d.ts +9 -0
- package/node_modules/@types/node/buffer.d.ts +15 -7
- package/node_modules/@types/node/child_process.d.ts +91 -164
- package/node_modules/@types/node/cluster.d.ts +19 -20
- package/node_modules/@types/node/console.d.ts +19 -18
- package/node_modules/@types/node/crypto.d.ts +1264 -356
- package/node_modules/@types/node/dgram.d.ts +10 -9
- package/node_modules/@types/node/diagnostics_channel.d.ts +18 -15
- package/node_modules/@types/node/dns/promises.d.ts +36 -9
- package/node_modules/@types/node/dns.d.ts +95 -37
- package/node_modules/@types/node/domain.d.ts +1 -1
- package/node_modules/@types/node/events.d.ts +81 -36
- package/node_modules/@types/node/fs/promises.d.ts +104 -59
- package/node_modules/@types/node/fs.d.ts +414 -137
- package/node_modules/@types/node/globals.d.ts +149 -350
- package/node_modules/@types/node/globals.typedarray.d.ts +20 -0
- package/node_modules/@types/node/http.d.ts +191 -37
- package/node_modules/@types/node/http2.d.ts +266 -67
- package/node_modules/@types/node/https.d.ts +97 -63
- package/node_modules/@types/node/index.d.ts +16 -7
- package/node_modules/@types/node/inspector.d.ts +206 -3931
- package/node_modules/@types/node/inspector.generated.d.ts +4233 -0
- package/node_modules/@types/node/module.d.ts +153 -31
- package/node_modules/@types/node/net.d.ts +36 -17
- package/node_modules/@types/node/os.d.ts +22 -10
- package/node_modules/@types/node/package.json +14 -84
- package/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/node/perf_hooks.d.ts +30 -18
- package/node_modules/@types/node/process.d.ts +40 -34
- package/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/node/readline/promises.d.ts +1 -2
- package/node_modules/@types/node/readline.d.ts +13 -13
- package/node_modules/@types/node/repl.d.ts +25 -17
- package/node_modules/@types/node/sea.d.ts +10 -1
- package/node_modules/@types/node/sqlite.d.ts +438 -9
- package/node_modules/@types/node/stream/consumers.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +13 -54
- package/node_modules/@types/node/stream.d.ts +68 -47
- package/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/node_modules/@types/node/test.d.ts +2034 -1975
- package/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/node/timers.d.ts +1 -3
- package/node_modules/@types/node/tls.d.ts +124 -114
- package/node_modules/@types/node/trace_events.d.ts +6 -6
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +17 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +18 -7
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
- package/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/node/url.d.ts +119 -34
- package/node_modules/@types/node/util.d.ts +46 -305
- package/node_modules/@types/node/v8.d.ts +100 -37
- package/node_modules/@types/node/vm.d.ts +299 -110
- package/node_modules/@types/node/wasi.d.ts +23 -2
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +225 -75
- package/node_modules/@types/node/zlib.d.ts +44 -33
- package/node_modules/axios/CHANGELOG.md +410 -288
- package/node_modules/axios/README.md +156 -51
- package/node_modules/axios/dist/axios.js +471 -330
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +407 -265
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +407 -265
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +723 -305
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +16 -5
- package/node_modules/axios/index.d.ts +17 -4
- package/node_modules/axios/lib/adapters/adapters.js +89 -42
- package/node_modules/axios/lib/adapters/fetch.js +221 -162
- package/node_modules/axios/lib/adapters/http.js +242 -42
- package/node_modules/axios/lib/adapters/xhr.js +11 -8
- package/node_modules/axios/lib/core/Axios.js +0 -2
- package/node_modules/axios/lib/core/AxiosError.js +10 -3
- package/node_modules/axios/lib/core/InterceptorManager.js +1 -1
- package/node_modules/axios/lib/core/dispatchRequest.js +1 -1
- package/node_modules/axios/lib/core/mergeConfig.js +4 -4
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +6 -0
- package/node_modules/axios/lib/helpers/bind.js +7 -0
- package/node_modules/axios/lib/helpers/buildURL.js +1 -3
- package/node_modules/axios/lib/helpers/cookies.js +24 -13
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
- package/node_modules/axios/lib/utils.js +5 -3
- package/node_modules/axios/package.json +26 -15
- package/node_modules/bignumber.js/CHANGELOG.md +6 -1
- package/node_modules/bignumber.js/README.md +5 -4
- package/node_modules/bignumber.js/bignumber.js +2 -2
- package/node_modules/bignumber.js/bignumber.mjs +2 -2
- package/node_modules/bignumber.js/package.json +1 -1
- package/node_modules/fast-xml-parser/CHANGELOG.md +9 -0
- package/node_modules/fast-xml-parser/README.md +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.d.cts +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
- package/node_modules/fast-xml-parser/package.json +1 -1
- package/node_modules/fast-xml-parser/src/fxp.d.ts +2 -2
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +1 -1
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +4 -4
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +297 -287
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +24 -12
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +4 -4
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/form-data/CHANGELOG.md +60 -2
- package/node_modules/form-data/README.md +4 -4
- package/node_modules/form-data/lib/form_data.js +2 -2
- package/node_modules/form-data/package.json +4 -4
- package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.min.js +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.json +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +2 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/undici-types/agent.d.ts +12 -11
- package/node_modules/undici-types/api.d.ts +24 -24
- package/node_modules/undici-types/balanced-pool.d.ts +11 -11
- package/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +18 -18
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/node_modules/undici-types/dispatcher.d.ts +119 -99
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +66 -54
- package/node_modules/undici-types/eventsource.d.ts +9 -4
- package/node_modules/undici-types/fetch.d.ts +18 -16
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +56 -47
- package/node_modules/undici-types/interceptors.d.ts +30 -8
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +21 -20
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +14 -12
- package/node_modules/undici-types/proxy-agent.d.ts +5 -4
- package/node_modules/undici-types/readable.d.ts +18 -15
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +142 -29
- package/node_modules/undici-types/websocket.d.ts +38 -2
- package/node_modules/uuid/README.md +8 -19
- package/node_modules/uuid/dist/{esm-browser/uuid-bin.js → uuid-bin.js} +1 -1
- package/node_modules/uuid/dist/{esm-browser/v4.js → v4.js} +7 -4
- package/node_modules/uuid/{dist/esm → dist-node}/md5.js +1 -1
- package/node_modules/uuid/dist-node/native.js +2 -0
- package/node_modules/uuid/{dist/esm → dist-node}/rng.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/sha1.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/uuid-bin.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/v4.js +7 -4
- package/node_modules/uuid/package.json +28 -41
- package/package.json +7 -7
- package/tak-registration.bak +557 -0
- package/tak-registration.js +19 -19
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/marchingsquares/.eslintrc.json +0 -81
- package/node_modules/marchingsquares/Changelog.md +0 -81
- package/node_modules/marchingsquares/LICENSE.md +0 -37
- package/node_modules/marchingsquares/README.md +0 -312
- package/node_modules/marchingsquares/VERSION +0 -1
- package/node_modules/marchingsquares/agpl-3.0.txt +0 -661
- package/node_modules/marchingsquares/dist/marchingsquares-esm.js +0 -3410
- package/node_modules/marchingsquares/dist/marchingsquares-isobands.js +0 -2513
- package/node_modules/marchingsquares/dist/marchingsquares-isobands.min.js +0 -9
- package/node_modules/marchingsquares/dist/marchingsquares-isocontours.js +0 -1209
- package/node_modules/marchingsquares/dist/marchingsquares-isocontours.min.js +0 -9
- package/node_modules/marchingsquares/dist/marchingsquares-isolines.js +0 -1209
- package/node_modules/marchingsquares/dist/marchingsquares-isolines.min.js +0 -9
- package/node_modules/marchingsquares/dist/marchingsquares.js +0 -3424
- package/node_modules/marchingsquares/dist/marchingsquares.min.js +0 -9
- package/node_modules/marchingsquares/examples/contour/index.html +0 -117
- package/node_modules/marchingsquares/examples/editor/draw-lines.js +0 -60
- package/node_modules/marchingsquares/examples/editor/index.html +0 -39
- package/node_modules/marchingsquares/examples/editor/script.js +0 -110
- package/node_modules/marchingsquares/examples/editor/styles.css +0 -37
- package/node_modules/marchingsquares/examples/require/app.js +0 -9
- package/node_modules/marchingsquares/examples/require/index.html +0 -14
- package/node_modules/marchingsquares/examples/require/main.js +0 -98
- package/node_modules/marchingsquares/examples/require/require.js +0 -5
- package/node_modules/marchingsquares/examples/simple/index.html +0 -115
- package/node_modules/marchingsquares/examples/vienna/index.html +0 -229
- package/node_modules/marchingsquares/examples/vienna/vienna_basin.png +0 -0
- package/node_modules/marchingsquares/examples/vienna/vienna_data.js +0 -514
- package/node_modules/marchingsquares/package.json +0 -47
- package/node_modules/marchingsquares/rollup.config.js +0 -122
- package/node_modules/marchingsquares/rollup.config.test.js +0 -14
- package/node_modules/marchingsquares/src/interpolation.js +0 -84
- package/node_modules/marchingsquares/src/isobands.js +0 -1883
- package/node_modules/marchingsquares/src/isolines.js +0 -638
- package/node_modules/marchingsquares/src/main.js +0 -4
- package/node_modules/marchingsquares/src/options.js +0 -80
- package/node_modules/marchingsquares/src/polygons.js +0 -531
- package/node_modules/marchingsquares/src/quadtree.js +0 -228
- package/node_modules/marchingsquares/test/data/in/isoBands-example-case.json +0 -14
- package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-0_3.json +0 -12
- package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-3_5.json +0 -12
- package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-5_7.json +0 -12
- package/node_modules/marchingsquares/test/data/in/isoBands-minimal.json +0 -8
- package/node_modules/marchingsquares/test/data/in/isoBands-simple.json +0 -9
- package/node_modules/marchingsquares/test/data/in/isoLines-example-case.json +0 -13
- package/node_modules/marchingsquares/test/data/in/isoLines-simple.json +0 -8
- package/node_modules/marchingsquares/test/data/out/isoBands-example-case.json +0 -72
- package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-0_3.json +0 -9
- package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-3_5.json +0 -36
- package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-5_7.json +0 -8
- package/node_modules/marchingsquares/test/data/out/isoBands-minimal.json +0 -10
- package/node_modules/marchingsquares/test/data/out/isoBands-simple.json +0 -25
- package/node_modules/marchingsquares/test/data/out/isoLines-example-case.json +0 -481
- package/node_modules/marchingsquares/test/data/out/isoLines-simple.json +0 -8
- package/node_modules/marchingsquares/test/test.js +0 -152
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/uuid/dist/cjs/index.d.ts +0 -15
- package/node_modules/uuid/dist/cjs/index.js +0 -31
- package/node_modules/uuid/dist/cjs/max.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/max.js +0 -3
- package/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/md5.js +0 -13
- package/node_modules/uuid/dist/cjs/native.d.ts +0 -6
- package/node_modules/uuid/dist/cjs/native.js +0 -4
- package/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/nil.js +0 -3
- package/node_modules/uuid/dist/cjs/package.json +0 -1
- package/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/parse.js +0 -11
- package/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/regex.js +0 -3
- package/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/rng.js +0 -13
- package/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/sha1.js +0 -13
- package/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/cjs/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs/types.d.ts +0 -21
- package/node_modules/uuid/dist/cjs/types.js +0 -2
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
- package/node_modules/uuid/dist/cjs/v1.js +0 -87
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v3.js +0 -14
- package/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
- package/node_modules/uuid/dist/cjs/v35.js +0 -41
- package/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v4.js +0 -29
- package/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v5.js +0 -14
- package/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v6.js +0 -19
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v7.js +0 -69
- package/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/validate.js +0 -7
- package/node_modules/uuid/dist/cjs/version.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/version.js +0 -10
- package/node_modules/uuid/dist/cjs-browser/index.js +0 -31
- package/node_modules/uuid/dist/cjs-browser/max.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
- package/node_modules/uuid/dist/cjs-browser/native.js +0 -4
- package/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/package.json +0 -1
- package/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
- package/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs-browser/types.js +0 -2
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v35.js +0 -41
- package/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
- package/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v6.js +0 -19
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
- package/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
- package/node_modules/uuid/dist/cjs-browser/version.js +0 -10
- package/node_modules/uuid/dist/esm/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm/md5.d.ts +0 -4
- package/node_modules/uuid/dist/esm/native.d.ts +0 -6
- package/node_modules/uuid/dist/esm/native.js +0 -2
- package/node_modules/uuid/dist/esm/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm/version.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
- /package/node_modules/uuid/dist/{cjs-browser/index.d.ts → index.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/index.js → index.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/max.d.ts → max.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/max.js → max.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/md5.d.ts → md5.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/md5.js → md5.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/native.d.ts → native.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/native.js → native.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/nil.d.ts → nil.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/nil.js → nil.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/parse.d.ts → parse.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/parse.js → parse.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/regex.d.ts → regex.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/regex.js → regex.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/rng.d.ts → rng.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/rng.js → rng.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/sha1.d.ts → sha1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/sha1.js → sha1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/stringify.d.ts → stringify.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/stringify.js → stringify.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/types.d.ts → types.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/types.js → types.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/uuid-bin.d.ts → uuid-bin.d.ts} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v1.d.ts → v1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v1.js → v1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v1ToV6.d.ts → v1ToV6.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v1ToV6.js → v1ToV6.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v3.d.ts → v3.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v3.js → v3.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v35.d.ts → v35.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v35.js → v35.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v4.d.ts → v4.d.ts} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v5.d.ts → v5.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v5.js → v5.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v6.d.ts → v6.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v6.js → v6.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v6ToV1.d.ts → v6ToV1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v6ToV1.js → v6ToV1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v7.d.ts → v7.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v7.js → v7.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/validate.d.ts → validate.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/validate.js → validate.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/version.d.ts → version.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/version.js → version.js} +0 -0
- /package/node_modules/uuid/{dist/esm → dist-node}/bin/uuid +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/index.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/max.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/nil.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/parse.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/regex.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/stringify.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/types.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1ToV6.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v3.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v35.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v5.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6ToV1.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v7.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/validate.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/version.js +0 -0
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { AllGeoJSON } from '@turf/helpers';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* [simplify-js](
|
|
6
|
-
*
|
|
4
|
+
* Simplifies the geometries in a GeoJSON object. Uses the 2d version of
|
|
5
|
+
* [simplify-js](https://mourner.github.io/simplify-js/).
|
|
7
6
|
*
|
|
8
7
|
* @function
|
|
9
|
-
* @param {GeoJSON} geojson object to be simplified
|
|
8
|
+
* @param {GeoJSON} geojson GeoJSON object to be simplified
|
|
10
9
|
* @param {Object} [options={}] Optional parameters
|
|
11
|
-
* @param {number} [options.tolerance=1]
|
|
12
|
-
* @param {boolean} [options.highQuality=false]
|
|
13
|
-
* @param {boolean} [options.mutate=false]
|
|
14
|
-
* @returns {GeoJSON}
|
|
10
|
+
* @param {number} [options.tolerance=1] Simplification tolerance
|
|
11
|
+
* @param {boolean} [options.highQuality=false] Produce a higher-quality simplification using a slower algorithm
|
|
12
|
+
* @param {boolean} [options.mutate=false] Allow GeoJSON input to be mutated (significant performance improvement if true)
|
|
13
|
+
* @returns {GeoJSON} Simplified GeoJSON
|
|
15
14
|
* @example
|
|
16
|
-
*
|
|
15
|
+
* const geojson = turf.polygon([[
|
|
17
16
|
* [-70.603637, -33.399918],
|
|
18
17
|
* [-70.614624, -33.395332],
|
|
19
18
|
* [-70.639343, -33.392466],
|
|
@@ -35,11 +34,11 @@ import { AllGeoJSON } from '@turf/helpers';
|
|
|
35
34
|
* [-70.594711, -33.406224],
|
|
36
35
|
* [-70.603637, -33.399918]
|
|
37
36
|
* ]]);
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* const result0_01 = turf.simplify(geojson, {tolerance: 0.01 });
|
|
38
|
+
* const result0_005 = turf.simplify(geojson, {tolerance: 0.005 });
|
|
40
39
|
*
|
|
41
40
|
* //addToMap
|
|
42
|
-
*
|
|
41
|
+
* const addToMap = [geojson, result0_01, result0_005]
|
|
43
42
|
*/
|
|
44
43
|
declare function simplify<T extends AllGeoJSON>(geojson: T, options?: {
|
|
45
44
|
tolerance?: number;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { AllGeoJSON } from '@turf/helpers';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* [simplify-js](
|
|
6
|
-
*
|
|
4
|
+
* Simplifies the geometries in a GeoJSON object. Uses the 2d version of
|
|
5
|
+
* [simplify-js](https://mourner.github.io/simplify-js/).
|
|
7
6
|
*
|
|
8
7
|
* @function
|
|
9
|
-
* @param {GeoJSON} geojson object to be simplified
|
|
8
|
+
* @param {GeoJSON} geojson GeoJSON object to be simplified
|
|
10
9
|
* @param {Object} [options={}] Optional parameters
|
|
11
|
-
* @param {number} [options.tolerance=1]
|
|
12
|
-
* @param {boolean} [options.highQuality=false]
|
|
13
|
-
* @param {boolean} [options.mutate=false]
|
|
14
|
-
* @returns {GeoJSON}
|
|
10
|
+
* @param {number} [options.tolerance=1] Simplification tolerance
|
|
11
|
+
* @param {boolean} [options.highQuality=false] Produce a higher-quality simplification using a slower algorithm
|
|
12
|
+
* @param {boolean} [options.mutate=false] Allow GeoJSON input to be mutated (significant performance improvement if true)
|
|
13
|
+
* @returns {GeoJSON} Simplified GeoJSON
|
|
15
14
|
* @example
|
|
16
|
-
*
|
|
15
|
+
* const geojson = turf.polygon([[
|
|
17
16
|
* [-70.603637, -33.399918],
|
|
18
17
|
* [-70.614624, -33.395332],
|
|
19
18
|
* [-70.639343, -33.392466],
|
|
@@ -35,11 +34,11 @@ import { AllGeoJSON } from '@turf/helpers';
|
|
|
35
34
|
* [-70.594711, -33.406224],
|
|
36
35
|
* [-70.603637, -33.399918]
|
|
37
36
|
* ]]);
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* const result0_01 = turf.simplify(geojson, {tolerance: 0.01 });
|
|
38
|
+
* const result0_005 = turf.simplify(geojson, {tolerance: 0.005 });
|
|
40
39
|
*
|
|
41
40
|
* //addToMap
|
|
42
|
-
*
|
|
41
|
+
* const addToMap = [geojson, result0_01, result0_005]
|
|
43
42
|
*/
|
|
44
43
|
declare function simplify<T extends AllGeoJSON>(geojson: T, options?: {
|
|
45
44
|
tolerance?: number;
|
|
@@ -125,10 +125,13 @@ function simplifyPolygon(coordinates, tolerance, highQuality) {
|
|
|
125
125
|
}
|
|
126
126
|
let ringTolerance = tolerance;
|
|
127
127
|
let simpleRing = simplify(ring, ringTolerance, highQuality);
|
|
128
|
-
while (!checkValidity(simpleRing)) {
|
|
128
|
+
while (!checkValidity(simpleRing) && ringTolerance >= Number.EPSILON) {
|
|
129
129
|
ringTolerance -= ringTolerance * 0.01;
|
|
130
130
|
simpleRing = simplify(ring, ringTolerance, highQuality);
|
|
131
131
|
}
|
|
132
|
+
if (!checkValidity(simpleRing)) {
|
|
133
|
+
return ring;
|
|
134
|
+
}
|
|
132
135
|
if (simpleRing[simpleRing.length - 1][0] !== simpleRing[0][0] || simpleRing[simpleRing.length - 1][1] !== simpleRing[0][1]) {
|
|
133
136
|
simpleRing.push(simpleRing[0]);
|
|
134
137
|
}
|
|
@@ -139,9 +142,9 @@ function checkValidity(ring) {
|
|
|
139
142
|
if (ring.length < 3) return false;
|
|
140
143
|
return !(ring.length === 3 && ring[2][0] === ring[0][0] && ring[2][1] === ring[0][1]);
|
|
141
144
|
}
|
|
142
|
-
var
|
|
145
|
+
var index_default = simplify2;
|
|
143
146
|
export {
|
|
144
|
-
|
|
147
|
+
index_default as default,
|
|
145
148
|
simplify2 as simplify
|
|
146
149
|
};
|
|
147
150
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../lib/simplify.js"],"sourcesContent":["import { Geometry, Position } from \"geojson\";\nimport { cleanCoords } from \"@turf/clean-coords\";\nimport { clone } from \"@turf/clone\";\nimport { geomEach } from \"@turf/meta\";\nimport { AllGeoJSON, isObject } from \"@turf/helpers\";\nimport { simplify as simplifyJS } from \"./lib/simplify.js\";\n\n/**\n * Takes a {@link GeoJSON} object and returns a simplified version. Internally uses the 2d version of\n * [simplify-js](http://mourner.github.io/simplify-js/) to perform simplification using the Ramer-Douglas-Peucker algorithm.\n *\n *\n * @function\n * @param {GeoJSON} geojson object to be simplified\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.tolerance=1] simplification tolerance\n * @param {boolean} [options.highQuality=false] whether or not to spend more time to create a higher-quality simplification with a different algorithm\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON} a simplified GeoJSON\n * @example\n * var geojson = turf.polygon([[\n * [-70.603637, -33.399918],\n * [-70.614624, -33.395332],\n * [-70.639343, -33.392466],\n * [-70.659942, -33.394759],\n * [-70.683975, -33.404504],\n * [-70.697021, -33.419406],\n * [-70.701141, -33.434306],\n * [-70.700454, -33.446339],\n * [-70.694274, -33.458369],\n * [-70.682601, -33.465816],\n * [-70.668869, -33.472117],\n * [-70.646209, -33.473835],\n * [-70.624923, -33.472117],\n * [-70.609817, -33.468107],\n * [-70.595397, -33.458369],\n * [-70.587158, -33.442901],\n * [-70.587158, -33.426283],\n * [-70.590591, -33.414248],\n * [-70.594711, -33.406224],\n * [-70.603637, -33.399918]\n * ]]);\n * var options = {tolerance: 0.01, highQuality: false};\n * var simplified = turf.simplify(geojson, options);\n *\n * //addToMap\n * var addToMap = [geojson, simplified]\n */\nfunction simplify<T extends AllGeoJSON>(\n geojson: T,\n options: {\n tolerance?: number;\n highQuality?: boolean;\n mutate?: boolean;\n } = {}\n): T {\n // Optional parameters\n options = options ?? {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const tolerance = options.tolerance ?? 1;\n const highQuality = options.highQuality ?? false;\n const mutate = options.mutate ?? false;\n\n if (!geojson) throw new Error(\"geojson is required\");\n if (tolerance && tolerance < 0) throw new Error(\"invalid tolerance\");\n\n // Clone geojson to avoid side effects\n if (mutate !== true) geojson = clone(geojson);\n\n geomEach(geojson, function (geom) {\n simplifyGeom(geom, tolerance, highQuality);\n });\n return geojson;\n}\n\n/**\n * Simplifies a feature's coordinates\n *\n * @private\n * @param {Geometry} geometry to be simplified\n * @param {number} [tolerance=1] simplification tolerance\n * @param {boolean} [highQuality=false] whether or not to spend more time to create a higher-quality simplification with a different algorithm\n * @returns {Geometry} output\n */\nfunction simplifyGeom(\n geometry: Geometry,\n tolerance: number,\n highQuality: boolean\n) {\n const type = geometry.type;\n\n // \"unsimplyfiable\" geometry types\n if (type === \"Point\" || type === \"MultiPoint\") return geometry;\n\n // Remove any extra coordinates\n cleanCoords(geometry, { mutate: true });\n\n if (type !== \"GeometryCollection\") {\n // TODO should this cater for GeometryCollections too?\n switch (type) {\n case \"LineString\":\n geometry.coordinates = simplifyJS(\n geometry.coordinates,\n tolerance,\n highQuality\n );\n break;\n case \"MultiLineString\":\n geometry.coordinates = geometry.coordinates.map((lines) =>\n simplifyJS(lines, tolerance, highQuality)\n );\n break;\n case \"Polygon\":\n geometry.coordinates = simplifyPolygon(\n geometry.coordinates,\n tolerance,\n highQuality\n );\n break;\n case \"MultiPolygon\":\n geometry.coordinates = geometry.coordinates.map((rings) =>\n simplifyPolygon(rings, tolerance, highQuality)\n );\n }\n }\n\n return geometry;\n}\n\n/**\n * Simplifies the coordinates of a Polygon with simplify-js\n *\n * @private\n * @param {Array<number>} coordinates to be processed\n * @param {number} tolerance simplification tolerance\n * @param {boolean} highQuality whether or not to spend more time to create a higher-quality\n * @returns {Array<Array<Array<number>>>} simplified coords\n */\nfunction simplifyPolygon(\n coordinates: Position[][],\n tolerance: number,\n highQuality: boolean\n) {\n return coordinates.map(function (ring) {\n if (ring.length < 4) {\n throw new Error(\"invalid polygon\");\n }\n let ringTolerance = tolerance;\n let simpleRing = simplifyJS(ring, ringTolerance, highQuality);\n // remove 1 percent of tolerance until enough points to make a triangle\n while (!checkValidity(simpleRing)) {\n ringTolerance -= ringTolerance * 0.01;\n simpleRing = simplifyJS(ring, ringTolerance, highQuality);\n }\n if (\n simpleRing[simpleRing.length - 1][0] !== simpleRing[0][0] ||\n simpleRing[simpleRing.length - 1][1] !== simpleRing[0][1]\n ) {\n simpleRing.push(simpleRing[0]);\n }\n return simpleRing;\n });\n}\n\n/**\n * Returns true if ring has at least 3 coordinates and its first coordinate is the same as its last\n *\n * @private\n * @param {Array<number>} ring coordinates to be checked\n * @returns {boolean} true if valid\n */\nfunction checkValidity(ring: Position[]) {\n if (ring.length < 3) return false;\n //if the last point is the same as the first, it's not a triangle\n return !(\n ring.length === 3 &&\n ring[2][0] === ring[0][0] &&\n ring[2][1] === ring[0][1]\n );\n}\n\nexport { simplify };\nexport default simplify;\n","/*\n (c) 2013, Vladimir Agafonkin\n Simplify.js, a high-performance JS polyline simplification library\n mourner.github.io/simplify-js\n*/\n\n// to suit your point format, run search/replace for '.x' and '.y';\n// for 3D version, see 3d branch (configurability would draw significant performance overhead)\n\n// square distance between 2 points\nfunction getSqDist(p1, p2) {\n var dx = p1[0] - p2[0],\n dy = p1[1] - p2[1];\n\n return dx * dx + dy * dy;\n}\n\n// square distance from a point to a segment\nfunction getSqSegDist(p, p1, p2) {\n var x = p1[0],\n y = p1[1],\n dx = p2[0] - x,\n dy = p2[1] - y;\n\n if (dx !== 0 || dy !== 0) {\n var t = ((p[0] - x) * dx + (p[1] - y) * dy) / (dx * dx + dy * dy);\n\n if (t > 1) {\n x = p2[0];\n y = p2[1];\n } else if (t > 0) {\n x += dx * t;\n y += dy * t;\n }\n }\n\n dx = p[0] - x;\n dy = p[1] - y;\n\n return dx * dx + dy * dy;\n}\n// rest of the code doesn't care about point format\n\n// basic distance-based simplification\nfunction simplifyRadialDist(points, sqTolerance) {\n var prevPoint = points[0],\n newPoints = [prevPoint],\n point;\n\n for (var i = 1, len = points.length; i < len; i++) {\n point = points[i];\n\n if (getSqDist(point, prevPoint) > sqTolerance) {\n newPoints.push(point);\n prevPoint = point;\n }\n }\n\n if (prevPoint !== point) newPoints.push(point);\n\n return newPoints;\n}\n\nfunction simplifyDPStep(points, first, last, sqTolerance, simplified) {\n var maxSqDist = sqTolerance,\n index;\n\n for (var i = first + 1; i < last; i++) {\n var sqDist = getSqSegDist(points[i], points[first], points[last]);\n\n if (sqDist > maxSqDist) {\n index = i;\n maxSqDist = sqDist;\n }\n }\n\n if (maxSqDist > sqTolerance) {\n if (index - first > 1)\n simplifyDPStep(points, first, index, sqTolerance, simplified);\n simplified.push(points[index]);\n if (last - index > 1)\n simplifyDPStep(points, index, last, sqTolerance, simplified);\n }\n}\n\n// simplification using Ramer-Douglas-Peucker algorithm\nfunction simplifyDouglasPeucker(points, sqTolerance) {\n var last = points.length - 1;\n\n var simplified = [points[0]];\n simplifyDPStep(points, 0, last, sqTolerance, simplified);\n simplified.push(points[last]);\n\n return simplified;\n}\n\n// both algorithms combined for awesome performance\nfunction simplify(points, tolerance, highestQuality) {\n if (points.length <= 2) return points;\n\n var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;\n\n points = highestQuality ? points : simplifyRadialDist(points, sqTolerance);\n points = simplifyDouglasPeucker(points, sqTolerance);\n\n return points;\n}\n\nexport { simplify };\nexport default simplify;\n"],"mappings":";AACA,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAqB,gBAAgB;;;ACMrC,SAAS,UAAU,IAAI,IAAI;AACzB,MAAI,KAAK,GAAG,CAAC,IAAI,GAAG,CAAC,GACnB,KAAK,GAAG,CAAC,IAAI,GAAG,CAAC;AAEnB,SAAO,KAAK,KAAK,KAAK;AACxB;AAGA,SAAS,aAAa,G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AGA,IAAO,wBAAQC;","names":["simplify","simplify"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../lib/simplify.js"],"sourcesContent":["import { Geometry, Position } from \"geojson\";\nimport { cleanCoords } from \"@turf/clean-coords\";\nimport { clone } from \"@turf/clone\";\nimport { geomEach } from \"@turf/meta\";\nimport { AllGeoJSON, isObject } from \"@turf/helpers\";\nimport { simplify as simplifyJS } from \"./lib/simplify.js\";\n\n/**\n * Simplifies the geometries in a GeoJSON object. Uses the 2d version of\n * [simplify-js](https://mourner.github.io/simplify-js/).\n *\n * @function\n * @param {GeoJSON} geojson GeoJSON object to be simplified\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.tolerance=1] Simplification tolerance\n * @param {boolean} [options.highQuality=false] Produce a higher-quality simplification using a slower algorithm\n * @param {boolean} [options.mutate=false] Allow GeoJSON input to be mutated (significant performance improvement if true)\n * @returns {GeoJSON} Simplified GeoJSON\n * @example\n * const geojson = turf.polygon([[\n * [-70.603637, -33.399918],\n * [-70.614624, -33.395332],\n * [-70.639343, -33.392466],\n * [-70.659942, -33.394759],\n * [-70.683975, -33.404504],\n * [-70.697021, -33.419406],\n * [-70.701141, -33.434306],\n * [-70.700454, -33.446339],\n * [-70.694274, -33.458369],\n * [-70.682601, -33.465816],\n * [-70.668869, -33.472117],\n * [-70.646209, -33.473835],\n * [-70.624923, -33.472117],\n * [-70.609817, -33.468107],\n * [-70.595397, -33.458369],\n * [-70.587158, -33.442901],\n * [-70.587158, -33.426283],\n * [-70.590591, -33.414248],\n * [-70.594711, -33.406224],\n * [-70.603637, -33.399918]\n * ]]);\n * const result0_01 = turf.simplify(geojson, {tolerance: 0.01 });\n * const result0_005 = turf.simplify(geojson, {tolerance: 0.005 });\n *\n * //addToMap\n * const addToMap = [geojson, result0_01, result0_005]\n */\nfunction simplify<T extends AllGeoJSON>(\n geojson: T,\n options: {\n tolerance?: number;\n highQuality?: boolean;\n mutate?: boolean;\n } = {}\n): T {\n // Optional parameters\n options = options ?? {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const tolerance = options.tolerance ?? 1;\n const highQuality = options.highQuality ?? false;\n const mutate = options.mutate ?? false;\n\n if (!geojson) throw new Error(\"geojson is required\");\n if (tolerance && tolerance < 0) throw new Error(\"invalid tolerance\");\n\n // Clone geojson to avoid side effects\n if (mutate !== true) geojson = clone(geojson);\n\n geomEach(geojson, function (geom) {\n simplifyGeom(geom, tolerance, highQuality);\n });\n return geojson;\n}\n\n/**\n * Simplifies a feature's coordinates\n *\n * @private\n * @param {Geometry} geometry to be simplified\n * @param {number} [tolerance=1] simplification tolerance\n * @param {boolean} [highQuality=false] whether or not to spend more time to create a higher-quality simplification with a different algorithm\n * @returns {Geometry} output\n */\nfunction simplifyGeom(\n geometry: Geometry,\n tolerance: number,\n highQuality: boolean\n) {\n const type = geometry.type;\n\n // \"unsimplyfiable\" geometry types\n if (type === \"Point\" || type === \"MultiPoint\") return geometry;\n\n // Remove any extra coordinates\n cleanCoords(geometry, { mutate: true });\n\n if (type !== \"GeometryCollection\") {\n // TODO should this cater for GeometryCollections too?\n switch (type) {\n case \"LineString\":\n geometry.coordinates = simplifyJS(\n geometry.coordinates,\n tolerance,\n highQuality\n );\n break;\n case \"MultiLineString\":\n geometry.coordinates = geometry.coordinates.map((lines) =>\n simplifyJS(lines, tolerance, highQuality)\n );\n break;\n case \"Polygon\":\n geometry.coordinates = simplifyPolygon(\n geometry.coordinates,\n tolerance,\n highQuality\n );\n break;\n case \"MultiPolygon\":\n geometry.coordinates = geometry.coordinates.map((rings) =>\n simplifyPolygon(rings, tolerance, highQuality)\n );\n }\n }\n\n return geometry;\n}\n\n/**\n * Simplifies the coordinates of a Polygon with simplify-js\n *\n * @private\n * @param {Array<number>} coordinates to be processed\n * @param {number} tolerance simplification tolerance\n * @param {boolean} highQuality whether or not to spend more time to create a higher-quality\n * @returns {Array<Array<Array<number>>>} simplified coords\n */\nfunction simplifyPolygon(\n coordinates: Position[][],\n tolerance: number,\n highQuality: boolean\n) {\n return coordinates.map(function (ring) {\n if (ring.length < 4) {\n throw new Error(\"invalid polygon\");\n }\n let ringTolerance = tolerance;\n let simpleRing = simplifyJS(ring, ringTolerance, highQuality);\n\n // If simplified ring isn't valid (has been over simplified) reduce the\n // tolerance by 1% and try again.\n while (!checkValidity(simpleRing) && ringTolerance >= Number.EPSILON) {\n ringTolerance -= ringTolerance * 0.01;\n simpleRing = simplifyJS(ring, ringTolerance, highQuality);\n }\n\n // If ring wasn't able to be simplified in a valid way, return it unchanged.\n if (!checkValidity(simpleRing)) {\n return ring;\n }\n\n // Close the ring if it wasn't already.\n if (\n simpleRing[simpleRing.length - 1][0] !== simpleRing[0][0] ||\n simpleRing[simpleRing.length - 1][1] !== simpleRing[0][1]\n ) {\n simpleRing.push(simpleRing[0]);\n }\n return simpleRing;\n });\n}\n\n/**\n * Returns true if ring has at least 3 coordinates and its first coordinate is the same as its last\n *\n * @private\n * @param {Array<number>} ring coordinates to be checked\n * @returns {boolean} true if valid\n */\nfunction checkValidity(ring: Position[]) {\n if (ring.length < 3) return false;\n //if the last point is the same as the first, it's not a triangle\n return !(\n ring.length === 3 &&\n ring[2][0] === ring[0][0] &&\n ring[2][1] === ring[0][1]\n );\n}\n\nexport { simplify };\nexport default simplify;\n","/*\n (c) 2013, Vladimir Agafonkin\n Simplify.js, a high-performance JS polyline simplification library\n mourner.github.io/simplify-js\n*/\n\n// to suit your point format, run search/replace for '.x' and '.y';\n// for 3D version, see 3d branch (configurability would draw significant performance overhead)\n\n// square distance between 2 points\nfunction getSqDist(p1, p2) {\n var dx = p1[0] - p2[0],\n dy = p1[1] - p2[1];\n\n return dx * dx + dy * dy;\n}\n\n// square distance from a point to a segment\nfunction getSqSegDist(p, p1, p2) {\n var x = p1[0],\n y = p1[1],\n dx = p2[0] - x,\n dy = p2[1] - y;\n\n if (dx !== 0 || dy !== 0) {\n var t = ((p[0] - x) * dx + (p[1] - y) * dy) / (dx * dx + dy * dy);\n\n if (t > 1) {\n x = p2[0];\n y = p2[1];\n } else if (t > 0) {\n x += dx * t;\n y += dy * t;\n }\n }\n\n dx = p[0] - x;\n dy = p[1] - y;\n\n return dx * dx + dy * dy;\n}\n// rest of the code doesn't care about point format\n\n// basic distance-based simplification\nfunction simplifyRadialDist(points, sqTolerance) {\n var prevPoint = points[0],\n newPoints = [prevPoint],\n point;\n\n for (var i = 1, len = points.length; i < len; i++) {\n point = points[i];\n\n if (getSqDist(point, prevPoint) > sqTolerance) {\n newPoints.push(point);\n prevPoint = point;\n }\n }\n\n if (prevPoint !== point) newPoints.push(point);\n\n return newPoints;\n}\n\nfunction simplifyDPStep(points, first, last, sqTolerance, simplified) {\n var maxSqDist = sqTolerance,\n index;\n\n for (var i = first + 1; i < last; i++) {\n var sqDist = getSqSegDist(points[i], points[first], points[last]);\n\n if (sqDist > maxSqDist) {\n index = i;\n maxSqDist = sqDist;\n }\n }\n\n if (maxSqDist > sqTolerance) {\n if (index - first > 1)\n simplifyDPStep(points, first, index, sqTolerance, simplified);\n simplified.push(points[index]);\n if (last - index > 1)\n simplifyDPStep(points, index, last, sqTolerance, simplified);\n }\n}\n\n// simplification using Ramer-Douglas-Peucker algorithm\nfunction simplifyDouglasPeucker(points, sqTolerance) {\n var last = points.length - 1;\n\n var simplified = [points[0]];\n simplifyDPStep(points, 0, last, sqTolerance, simplified);\n simplified.push(points[last]);\n\n return simplified;\n}\n\n// both algorithms combined for awesome performance\nfunction simplify(points, tolerance, highestQuality) {\n if (points.length <= 2) return points;\n\n var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;\n\n points = highestQuality ? points : simplifyRadialDist(points, sqTolerance);\n points = simplifyDouglasPeucker(points, sqTolerance);\n\n return points;\n}\n\nexport { simplify };\nexport default simplify;\n"],"mappings":";AACA,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAqB,gBAAgB;;;ACMrC,SAAS,UAAU,IAAI,IAAI;AACzB,MAAI,KAAK,GAAG,CAAC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AkB;AACvC,MAAI,KAAK,SAAS,EAAG,QAAO;AAE5B,SAAO,EACL,KAAK,WAAW,KAChB,KAAK,CAAC,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC,KACxB,KAAK,CAAC,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;AAE5B;AAGA,IAAO,gBAAQC;","names":["simplify","simplify"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/simplify",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"description": "Reduces the number of points in a shape while keeping its overall look.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Vladimir Agafonkin <@mourner>",
|
|
@@ -58,25 +58,25 @@
|
|
|
58
58
|
"test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@turf/truncate": "
|
|
61
|
+
"@turf/truncate": "7.3.0",
|
|
62
62
|
"@types/benchmark": "^2.1.5",
|
|
63
|
-
"@types/tape": "^
|
|
63
|
+
"@types/tape": "^5.8.1",
|
|
64
64
|
"benchmark": "^2.1.4",
|
|
65
65
|
"load-json-file": "^7.0.1",
|
|
66
66
|
"npm-run-all": "^4.1.5",
|
|
67
67
|
"tape": "^5.9.0",
|
|
68
|
-
"tsup": "^8.
|
|
69
|
-
"tsx": "^4.19.
|
|
70
|
-
"typescript": "^5.
|
|
71
|
-
"write-json-file": "^
|
|
68
|
+
"tsup": "^8.4.0",
|
|
69
|
+
"tsx": "^4.19.4",
|
|
70
|
+
"typescript": "^5.8.3",
|
|
71
|
+
"write-json-file": "^6.0.0"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@turf/clean-coords": "
|
|
75
|
-
"@turf/clone": "
|
|
76
|
-
"@turf/helpers": "
|
|
77
|
-
"@turf/meta": "
|
|
74
|
+
"@turf/clean-coords": "7.3.0",
|
|
75
|
+
"@turf/clone": "7.3.0",
|
|
76
|
+
"@turf/helpers": "7.3.0",
|
|
77
|
+
"@turf/meta": "7.3.0",
|
|
78
78
|
"@types/geojson": "^7946.0.10",
|
|
79
79
|
"tslib": "^2.8.1"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
|
|
82
82
|
}
|
|
@@ -25,9 +25,9 @@ function square(bbox) {
|
|
|
25
25
|
];
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
var
|
|
28
|
+
var index_default = square;
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
exports.default =
|
|
32
|
+
exports.default = index_default; exports.square = square;
|
|
33
33
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-square/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACAA,0CAAyB;AAiBzB,SAAS,MAAA,CAAO,IAAA,EAAkB;AAChC,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACjB,EAAA,IAAI,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AAClB,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,CAAC,CAAA;AACjB,EAAA,IAAI,MAAA,EAAQ,IAAA,CAAK,CAAC,CAAA;AAElB,EAAA,IAAI,mBAAA,EAAqB,gCAAA,IAAS,CAAK,KAAA,CAAM,CAAA,EAAG,CAAC,CAAA,EAAG,CAAC,IAAA,EAAM,KAAK,CAAC,CAAA;AACjE,EAAA,IAAI,iBAAA,EAAmB,gCAAA,IAAS,CAAK,KAAA,CAAM,CAAA,EAAG,CAAC,CAAA,EAAG,CAAC,IAAA,EAAM,KAAK,CAAC,CAAA;AAC/D,EAAA,GAAA,CAAI,m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C,IAAA,EAAM,KAAK,CAAC,CAAA;AAC/D,EAAA,GAAA,CAAI,mBAAA,GAAsB,gBAAA,EAAkB;AAC1C,IAAA,IAAI,iBAAA,EAAA,CAAoB,MAAA,EAAQ,KAAA,EAAA,EAAS,CAAA;AACzC,IAAA,OAAO;AAAA,MACL,IAAA;AAAA,MACA,iBAAA,EAAA,CAAoB,KAAA,EAAO,IAAA,EAAA,EAAQ,CAAA;AAAA,MACnC,IAAA;AAAA,MACA,iBAAA,EAAA,CAAoB,KAAA,EAAO,IAAA,EAAA,EAAQ;AAAA,IACrC,CAAA;AAAA,EACF,EAAA,KAAO;AACL,IAAA,IAAI,mBAAA,EAAA,CAAsB,KAAA,EAAO,IAAA,EAAA,EAAQ,CAAA;AACzC,IAAA,OAAO;AAAA,MACL,mBAAA,EAAA,CAAsB,MAAA,EAAQ,KAAA,EAAA,EAAS,CAAA;AAAA,MACvC,KAAA;AAAA,MACA,mBAAA,EAAA,CAAsB,MAAA,EAAQ,KAAA,EAAA,EAAS,CAAA;AAAA,MACvC;AAAA,IACF,CAAA;AAAA,EACF;AACF;AAGA,IAAO,cAAA,EAAQ,MAAA;ADjBf;AACE;AACA;AACF,yDAAC","file":"/home/runner/work/turf/turf/packages/turf-square/dist/cjs/index.cjs","sourcesContent":[null,"import { distance } from \"@turf/distance\";\nimport { BBox } from \"geojson\";\n\n/**\n * Takes a bounding box and calculates the minimum square bounding box that\n * would contain the input.\n *\n * @function\n * @param {BBox} bbox extent in [west, south, east, north] order\n * @returns {BBox} a square surrounding `bbox`\n * @example\n * const bbox = [-20, -20, -15, 0];\n * const squared = turf.square(bbox);\n *\n * //addToMap\n * const addToMap = [turf.bboxPolygon(bbox), turf.bboxPolygon(squared)]\n */\nfunction square(bbox: BBox): BBox {\n var west = bbox[0];\n var south = bbox[1];\n var east = bbox[2];\n var north = bbox[3];\n\n var horizontalDistance = distance(bbox.slice(0, 2), [east, south]);\n var verticalDistance = distance(bbox.slice(0, 2), [west, north]);\n if (horizontalDistance >= verticalDistance) {\n var verticalMidpoint = (south + north) / 2;\n return [\n west,\n verticalMidpoint - (east - west) / 2,\n east,\n verticalMidpoint + (east - west) / 2,\n ];\n } else {\n var horizontalMidpoint = (west + east) / 2;\n return [\n horizontalMidpoint - (north - south) / 2,\n south,\n horizontalMidpoint + (north - south) / 2,\n north,\n ];\n }\n}\n\nexport { square };\nexport default square;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { distance } from \"@turf/distance\";\nimport { BBox } from \"geojson\";\n\n/**\n * Takes a bounding box and calculates the minimum square bounding box that\n * would contain the input.\n *\n * @function\n * @param {BBox} bbox extent in [west, south, east, north] order\n * @returns {BBox} a square surrounding `bbox`\n * @example\n * const bbox = [-20, -20, -15, 0];\n * const squared = turf.square(bbox);\n *\n * //addToMap\n * const addToMap = [turf.bboxPolygon(bbox), turf.bboxPolygon(squared)]\n */\nfunction square(bbox: BBox): BBox {\n var west = bbox[0];\n var south = bbox[1];\n var east = bbox[2];\n var north = bbox[3];\n\n var horizontalDistance = distance(bbox.slice(0, 2), [east, south]);\n var verticalDistance = distance(bbox.slice(0, 2), [west, north]);\n if (horizontalDistance >= verticalDistance) {\n var verticalMidpoint = (south + north) / 2;\n return [\n west,\n verticalMidpoint - (east - west) / 2,\n east,\n verticalMidpoint + (east - west) / 2,\n ];\n } else {\n var horizontalMidpoint = (west + east) / 2;\n return [\n horizontalMidpoint - (north - south) / 2,\n south,\n horizontalMidpoint + (north - south) / 2,\n north,\n ];\n }\n}\n\nexport { square };\nexport default square;\n"],"mappings":";AAAA,SAAS,gBAAgB;AAiBzB,SAAS,OAAO,MAAkB;AAChC,MAAI,OAAO,KAAK,CAAC;AACjB,MAAI,QAAQ,KAAK,CAAC;AAClB,MAAI,OAAO,KAAK,CAAC;AACjB,MAAI,QAAQ,KAAK,CAAC;AAElB,MAAI,qBAAqB,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC;AACjE,MAAI,mBAAmB,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC;AAC/D,MAAI,sBAAsB,kBAAkB;AAC1C,QAAI,oBAAoB,QAAQ,SAAS;AACzC,WAAO;AAAA,MACL;AAAA,MACA,oBAAoB,OAAO,QAAQ;AAAA,MACnC;AAAA,MACA,oBAAoB,OAAO,QAAQ;AAAA,IACrC;AAAA,EACF,OAAO;AACL,QAAI,sBAAsB,OAAO,QAAQ;AACzC,WAAO;AAAA,MACL,sBAAsB,QAAQ,SAAS;AAAA,MACvC;AAAA,MACA,sBAAsB,QAAQ,SAAS;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AACF;AAGA,IAAO,
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { distance } from \"@turf/distance\";\nimport { BBox } from \"geojson\";\n\n/**\n * Takes a bounding box and calculates the minimum square bounding box that\n * would contain the input.\n *\n * @function\n * @param {BBox} bbox extent in [west, south, east, north] order\n * @returns {BBox} a square surrounding `bbox`\n * @example\n * const bbox = [-20, -20, -15, 0];\n * const squared = turf.square(bbox);\n *\n * //addToMap\n * const addToMap = [turf.bboxPolygon(bbox), turf.bboxPolygon(squared)]\n */\nfunction square(bbox: BBox): BBox {\n var west = bbox[0];\n var south = bbox[1];\n var east = bbox[2];\n var north = bbox[3];\n\n var horizontalDistance = distance(bbox.slice(0, 2), [east, south]);\n var verticalDistance = distance(bbox.slice(0, 2), [west, north]);\n if (horizontalDistance >= verticalDistance) {\n var verticalMidpoint = (south + north) / 2;\n return [\n west,\n verticalMidpoint - (east - west) / 2,\n east,\n verticalMidpoint + (east - west) / 2,\n ];\n } else {\n var horizontalMidpoint = (west + east) / 2;\n return [\n horizontalMidpoint - (north - south) / 2,\n south,\n horizontalMidpoint + (north - south) / 2,\n north,\n ];\n }\n}\n\nexport { square };\nexport default square;\n"],"mappings":";AAAA,SAAS,gBAAgB;AAiBzB,SAAS,OAAO,MAAkB;AAChC,MAAI,OAAO,KAAK,CAAC;AACjB,MAAI,QAAQ,KAAK,CAAC;AAClB,MAAI,OAAO,KAAK,CAAC;AACjB,MAAI,QAAQ,KAAK,CAAC;AAElB,MAAI,qBAAqB,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC;AACjE,MAAI,mBAAmB,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC;AAC/D,MAAI,sBAAsB,kBAAkB;AAC1C,QAAI,oBAAoB,QAAQ,SAAS;AACzC,WAAO;AAAA,MACL;AAAA,MACA,oBAAoB,OAAO,QAAQ;AAAA,MACnC;AAAA,MACA,oBAAoB,OAAO,QAAQ;AAAA,IACrC;AAAA,EACF,OAAO;AACL,QAAI,sBAAsB,OAAO,QAAQ;AACzC,WAAO;AAAA,MACL,sBAAsB,QAAQ,SAAS;AAAA,MACvC;AAAA,MACA,sBAAsB,QAAQ,SAAS;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AACF;AAGA,IAAO,gBAAQ;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/square",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"description": "Takes a bounding box and calculates the minimum square bounding box that would contain the input.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bugs": {
|
|
@@ -52,19 +52,19 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/benchmark": "^2.1.5",
|
|
55
|
-
"@types/tape": "^
|
|
55
|
+
"@types/tape": "^5.8.1",
|
|
56
56
|
"benchmark": "^2.1.4",
|
|
57
57
|
"npm-run-all": "^4.1.5",
|
|
58
58
|
"tape": "^5.9.0",
|
|
59
|
-
"tsup": "^8.
|
|
60
|
-
"tsx": "^4.19.
|
|
61
|
-
"typescript": "^5.
|
|
59
|
+
"tsup": "^8.4.0",
|
|
60
|
+
"tsx": "^4.19.4",
|
|
61
|
+
"typescript": "^5.8.3"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@turf/distance": "
|
|
65
|
-
"@turf/helpers": "
|
|
64
|
+
"@turf/distance": "7.3.0",
|
|
65
|
+
"@turf/helpers": "7.3.0",
|
|
66
66
|
"@types/geojson": "^7946.0.10",
|
|
67
67
|
"tslib": "^2.8.1"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
|
|
70
70
|
}
|
|
@@ -3,9 +3,9 @@ var _rectanglegrid = require('@turf/rectangle-grid');
|
|
|
3
3
|
function squareGrid(bbox, cellSide, options = {}) {
|
|
4
4
|
return _rectanglegrid.rectangleGrid.call(void 0, bbox, cellSide, cellSide, options);
|
|
5
5
|
}
|
|
6
|
-
var
|
|
6
|
+
var index_default = squareGrid;
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.default =
|
|
10
|
+
exports.default = index_default; exports.squareGrid = squareGrid;
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-square-grid/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACSA,qDAA8B;AA4B9B,SAAS,UAAA,CACP,IAAA,EACA,QAAA,EACA,QAAA,EAII,CAAC,CAAA,EAC0B;AAC/B,EAAA,OAAO,0CAAA,IAAc,EAAM,QAAA,EAAU,QAAA,EAAU,OAAO,CAAA;AACxD;AAGA,IAAO,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-square-grid/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACSA,qDAA8B;AA4B9B,SAAS,UAAA,CACP,IAAA,EACA,QAAA,EACA,QAAA,EAII,CAAC,CAAA,EAC0B;AAC/B,EAAA,OAAO,0CAAA,IAAc,EAAM,QAAA,EAAU,QAAA,EAAU,OAAO,CAAA;AACxD;AAGA,IAAO,cAAA,EAAQ,UAAA;AD5Cf;AACE;AACA;AACF,iEAAC","file":"/home/runner/work/turf/turf/packages/turf-square-grid/dist/cjs/index.cjs","sourcesContent":[null,"import {\n FeatureCollection,\n Polygon,\n BBox,\n Feature,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { rectangleGrid } from \"@turf/rectangle-grid\";\n\n/**\n * Creates a grid of square polygons with cell length 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} cellSide length of each cell side.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cellSide 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 squares with sides of equal lengths in linear units (e.g. kilometers) this is not the module for you.\n * The cellSide 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 with equal width and height in degrees.\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var squareGrid = turf.squareGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [squareGrid]\n */\n\nfunction squareGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"]}
|
|
@@ -3,9 +3,9 @@ import { rectangleGrid } from "@turf/rectangle-grid";
|
|
|
3
3
|
function squareGrid(bbox, cellSide, options = {}) {
|
|
4
4
|
return rectangleGrid(bbox, cellSide, cellSide, options);
|
|
5
5
|
}
|
|
6
|
-
var
|
|
6
|
+
var index_default = squareGrid;
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
index_default as default,
|
|
9
9
|
squareGrid
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n FeatureCollection,\n Polygon,\n BBox,\n Feature,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { rectangleGrid } from \"@turf/rectangle-grid\";\n\n/**\n * Creates a grid of square polygons with cell length 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} cellSide length of each cell side.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cellSide 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 squares with sides of equal lengths in linear units (e.g. kilometers) this is not the module for you.\n * The cellSide 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 with equal width and height in degrees.\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var squareGrid = turf.squareGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [squareGrid]\n */\n\nfunction squareGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"],"mappings":";AASA,SAAS,qBAAqB;AA4B9B,SAAS,WACP,MACA,UACA,UAII,CAAC,GAC0B;AAC/B,SAAO,cAAc,MAAM,UAAU,UAAU,OAAO;AACxD;AAGA,IAAO,
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n FeatureCollection,\n Polygon,\n BBox,\n Feature,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { rectangleGrid } from \"@turf/rectangle-grid\";\n\n/**\n * Creates a grid of square polygons with cell length 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} cellSide length of each cell side.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cellSide 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 squares with sides of equal lengths in linear units (e.g. kilometers) this is not the module for you.\n * The cellSide 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 with equal width and height in degrees.\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var squareGrid = turf.squareGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [squareGrid]\n */\n\nfunction squareGrid<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"],"mappings":";AASA,SAAS,qBAAqB;AA4B9B,SAAS,WACP,MACA,UACA,UAII,CAAC,GAC0B;AAC/B,SAAO,cAAc,MAAM,UAAU,UAAU,OAAO;AACxD;AAGA,IAAO,gBAAQ;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/square-grid",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"description": "Creates a square grid within a bounding box.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bugs": {
|
|
@@ -52,23 +52,23 @@
|
|
|
52
52
|
"test:tape": "tsx test.ts"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@turf/bbox-polygon": "
|
|
56
|
-
"@turf/truncate": "
|
|
55
|
+
"@turf/bbox-polygon": "7.3.0",
|
|
56
|
+
"@turf/truncate": "7.3.0",
|
|
57
57
|
"@types/benchmark": "^2.1.5",
|
|
58
|
-
"@types/tape": "^
|
|
58
|
+
"@types/tape": "^5.8.1",
|
|
59
59
|
"benchmark": "^2.1.4",
|
|
60
60
|
"npm-run-all": "^4.1.5",
|
|
61
61
|
"tape": "^5.9.0",
|
|
62
|
-
"tsup": "^8.
|
|
63
|
-
"tsx": "^4.19.
|
|
64
|
-
"typescript": "^5.
|
|
65
|
-
"write-json-file": "^
|
|
62
|
+
"tsup": "^8.4.0",
|
|
63
|
+
"tsx": "^4.19.4",
|
|
64
|
+
"typescript": "^5.8.3",
|
|
65
|
+
"write-json-file": "^6.0.0"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@turf/helpers": "
|
|
69
|
-
"@turf/rectangle-grid": "
|
|
68
|
+
"@turf/helpers": "7.3.0",
|
|
69
|
+
"@turf/rectangle-grid": "7.3.0",
|
|
70
70
|
"@types/geojson": "^7946.0.10",
|
|
71
71
|
"tslib": "^2.8.1"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
|
|
74
74
|
}
|
|
@@ -79,9 +79,9 @@ function getDeviations(coordinates, center) {
|
|
|
79
79
|
y: coordinates[1] - center[1]
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
var
|
|
82
|
+
var index_default = standardDeviationalEllipse;
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
exports.default =
|
|
86
|
+
exports.default = index_default; exports.standardDeviationalEllipse = standardDeviationalEllipse;
|
|
87
87
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-standard-deviational-ellipse/dist/cjs/index.cjs","../../index.ts"],"names":["_a"],"mappings":"AAAA;ACQA,kCAAsC;AACtC,4CAA0B;AAC1B,wCAAsD;AACtD,+CAA2B;AAC3B,kEAAoC;AACpC,wCAAwB;AAwDxB,SAAS,0BAAA,CACP,MAAA,EACA,OAAA,EAK4B;AA5E9B,EAAA,IAAA,EAAA;AA8EE,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,MAAM,MAAA,EAAQ,OAAA,CAAQ,MAAA,GAAS,EAAA;AAC/B,EAAA,MAAM,WAAA,EAAa,OAAA,CAAQ,MAAA;AAC3B,EAAA,MAAM,WAAA,EAAa,OAAA,CAAQ,WAAA,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B,CAAA,EAAG,WAAA,CAAY,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC;AAAA,EAC9B,CAAA;AACF;AAGA,IAAO,0CAAA,EAAQ,0BAAA;AD3Gf;AACE;AACA;AACF,6HAAC","file":"/home/runner/work/turf/turf/packages/turf-standard-deviational-ellipse/dist/cjs/index.cjs","sourcesContent":[null,"import {\n FeatureCollection,\n Feature,\n Position,\n Polygon,\n GeoJsonProperties,\n Point,\n} from \"geojson\";\nimport { coordAll, featureEach } from \"@turf/meta\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureCollection, isObject, isNumber } from \"@turf/helpers\";\nimport { centerMean } from \"@turf/center-mean\";\nimport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nimport { ellipse } from \"@turf/ellipse\";\n\ndeclare interface SDEProps {\n meanCenterCoordinates: Position;\n semiMajorAxis: number;\n semiMinorAxis: number;\n numberOfFeatures: number;\n angle: number;\n percentageWithinEllipse: number;\n}\n\ndeclare interface StandardDeviationalEllipse extends Feature<Polygon> {\n properties: {\n standardDeviationalEllipse: SDEProps;\n [key: string]: any;\n } | null;\n}\n\n/**\n * Takes a collection of features and returns a standard deviational ellipse,\n * also known as a “directional distribution.” The standard deviational ellipse\n * aims to show the direction and the distribution of a dataset by drawing\n * an ellipse that contains about one standard deviation’s worth (~ 70%) of the\n * data.\n *\n * This module mirrors the functionality of {@link http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/directional-distribution.htm|Directional Distribution}\n * in ArcGIS and the {@link http://arken.nmbu.no/~havatv/gis/qgisplugins/SDEllipse/|QGIS Standard Deviational Ellipse Plugin}\n *\n * **Bibliography**\n *\n * • Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for\n * Spatial Description,” _Geografiska Annaler_ 53, no. 1 (1971): 28–39,\n * doi:{@link https://doi.org/10.2307/490885|10.2307/490885}.\n *\n * • Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”\n * _American Journal of Sociology_ 33, no. 1 (1927): 94—98,\n * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.\n *\n *\n * @function\n * @param {FeatureCollection<Point>} points GeoJSON points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.weight] the property name used to weight the center\n * @param {number} [options.steps=64] number of steps for the polygon\n * @param {Object} [options.properties={}] properties to pass to the resulting ellipse\n * @returns {Feature<Polygon>} an elliptical Polygon that includes approximately 1 SD of the dataset within it.\n * @example\n *\n * const bbox = [-74, 40.72, -73.98, 40.74];\n * const points = turf.randomPoint(400, {bbox: bbox});\n * const sdEllipse = turf.standardDeviationalEllipse(points);\n *\n * //addToMap\n * const addToMap = [points, sdEllipse];\n *\n */\nfunction standardDeviationalEllipse(\n points: FeatureCollection<Point>,\n options?: {\n properties?: GeoJsonProperties;\n weight?: string;\n steps?: number;\n }\n): StandardDeviationalEllipse {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const steps = options.steps || 64;\n const weightTerm = options.weight;\n const properties = options.properties || {};\n\n // Validation:\n if (!isNumber(steps)) throw new Error(\"steps must be a number\");\n if (!isObject(properties)) throw new Error(\"properties must be a number\");\n\n // Calculate mean center & number of features:\n const numberOfFeatures = coordAll(points).length;\n const meanCenter = centerMean(points, { weight: weightTerm });\n\n // Calculate angle of rotation:\n // [X, Y] = mean center of all [x, y].\n // theta = arctan( (A + B) / C )\n // A = sum((x - X)^2) - sum((y - Y)^2)\n // B = sqrt(A^2 + 4(sum((x - X)(y - Y))^2))\n // C = 2(sum((x - X)(y - Y)))\n\n let xDeviationSquaredSum = 0;\n let yDeviationSquaredSum = 0;\n let xyDeviationSum = 0;\n\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n xDeviationSquaredSum += Math.pow(deviation.x, 2) * weight;\n yDeviationSquaredSum += Math.pow(deviation.y, 2) * weight;\n xyDeviationSum += deviation.x * deviation.y * weight;\n });\n\n const bigA = xDeviationSquaredSum - yDeviationSquaredSum;\n const bigB = Math.sqrt(Math.pow(bigA, 2) + 4 * Math.pow(xyDeviationSum, 2));\n const bigC = 2 * xyDeviationSum;\n const theta = Math.atan((bigA + bigB) / bigC);\n const thetaDeg = (theta * 180) / Math.PI;\n\n // Calculate axes:\n // sigmaX = sqrt((1 / n - 2) * sum((((x - X) * cos(theta)) - ((y - Y) * sin(theta)))^2))\n // sigmaY = sqrt((1 / n - 2) * sum((((x - X) * sin(theta)) - ((y - Y) * cos(theta)))^2))\n let sigmaXsum = 0;\n let sigmaYsum = 0;\n let weightsum = 0;\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n sigmaXsum +=\n Math.pow(\n deviation.x * Math.cos(theta) - deviation.y * Math.sin(theta),\n 2\n ) * weight;\n sigmaYsum +=\n Math.pow(\n deviation.x * Math.sin(theta) + deviation.y * Math.cos(theta),\n 2\n ) * weight;\n weightsum += weight;\n });\n\n const sigmaX = Math.sqrt((2 * sigmaXsum) / weightsum);\n const sigmaY = Math.sqrt((2 * sigmaYsum) / weightsum);\n\n const theEllipse: Feature<Polygon> = ellipse(meanCenter, sigmaX, sigmaY, {\n units: \"degrees\",\n angle: thetaDeg,\n steps: steps,\n properties: properties,\n });\n const pointsWithinEllipse = pointsWithinPolygon(\n points,\n featureCollection([theEllipse])\n );\n const standardDeviationalEllipseProperties = {\n meanCenterCoordinates: getCoords(meanCenter),\n semiMajorAxis: sigmaX,\n semiMinorAxis: sigmaY,\n numberOfFeatures: numberOfFeatures,\n angle: thetaDeg,\n percentageWithinEllipse:\n (100 * coordAll(pointsWithinEllipse).length) / numberOfFeatures,\n };\n // Make sure properties object exists.\n theEllipse.properties = theEllipse.properties ?? {};\n theEllipse.properties.standardDeviationalEllipse =\n standardDeviationalEllipseProperties;\n\n // We have added the StandardDeviationalEllipse specific properties, so\n // confirm this to Typescript with a cast.\n return theEllipse as StandardDeviationalEllipse;\n}\n\n/**\n * Get x_i - X and y_i - Y\n *\n * @private\n * @param {Position} coordinates Array of [x_i, y_i]\n * @param {Position} center Array of [X, Y]\n * @returns {Object} { x: n, y: m }\n */\nfunction getDeviations(coordinates: Position, center: Position) {\n return {\n x: coordinates[0] - center[0],\n y: coordinates[1] - center[1],\n };\n}\n\nexport { standardDeviationalEllipse, SDEProps, StandardDeviationalEllipse };\nexport default standardDeviationalEllipse;\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-standard-deviational-ellipse/dist/cjs/index.cjs","../../index.ts"],"names":["_a"],"mappings":"AAAA;ACQA,kCAAsC;AACtC,4CAA0B;AAC1B,wCAAsD;AACtD,+CAA2B;AAC3B,kEAAoC;AACpC,wCAAwB;AAwDxB,SAAS,0BAAA,CACP,MAAA,EACA,OAAA,EAK4B;AA5E9B,EAAA,IAAA,EAAA;AA8EE,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,MAAM,MAAA,EAAQ,OAAA,CAAQ,MAAA,GAAS,EAAA;AAC/B,EAAA,MAAM,WAAA,EAAa,OAAA,CAAQ,MAAA;AAC3B,EAAA,MAAM,WAAA,EAAa,OAAA,CAAQ,WAAA,GAAc,CAAC,CAAA;AAG1C,EAAA,GAAA,CAAI,CAAC,+BAAA,KAAc,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,wBAAwB,CAAA;AAC9D,EAAA,GAAA,CAAI,CAAC,+BAAA,UAAmB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,6BAA6B,CAAA;AAGxE,EAAA,MAAM,iBAAA,EAAmB,4BAAA,MAAe,CAAA,CAAE,MAAA;AAC1C,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AAA;AAEpD,EAAA,MAAM,WAAA,EAA+B,8BAAA,UAAQ,EAAY,MAAA,EAAQ,MAAA,EAAQ;AAAA,IACvE,KAAA,EAAO,SAAA;AAAA,IACP,KAAA,EAAO,QAAA;AAAA,IACP,KAAA;AAAA,IACA;AAAA,EACF,CAAC,CAAA;AACD,EAAA,MAAM,oBAAA,EAAsB,sDAAA;AAAA,IAC1B,MAAA;AAAA,IACA,wCAAA,CAAmB,UAAU,CAAC;AAAA,EAChC,CAAA;AACA,EAAA,MAAM,qCAAA,EAAuC;AAAA,IAC3C,qBAAA,EAAuB,kCAAA,UAAoB,CAAA;AAAA,IAC3C,aAAA,EAAe,MAAA;AAAA,IACf,aAAA,EAAe,MAAA;AAAA,IACf,gBAAA;AAAA,IACA,KAAA,EAAO,QAAA;AAAA,IACP,uBAAA,EACG,IAAA,EAAM,4BAAA,mBAA4B,CAAA,CAAE,OAAA,EAAU;AAAA,EACnD,CAAA;AAEA,EAAA,UAAA,CAAW,WAAA,EAAA,CAAa,GAAA,EAAA,UAAA,CAAW,UAAA,EAAA,GAAX,KAAA,EAAA,GAAA,EAAyB,CAAC,CAAA;AAClD,EAAA,UAAA,CAAW,UAAA,CAAW,2BAAA,EACpB,oCAAA;AAIF,EAAA,OAAO,UAAA;AACT;AAUA,SAAS,aAAA,CAAc,WAAA,EAAuB,MAAA,EAAkB;AAC9D,EAAA,OAAO;AAAA,IACL,CAAA,EAAG,WAAA,CAAY,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA;AAAA,IAC5B,CAAA,EAAG,WAAA,CAAY,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC;AAAA,EAC9B,CAAA;AACF;AAGA,IAAO,cAAA,EAAQ,0BAAA;AD3Gf;AACE;AACA;AACF,iGAAC","file":"/home/runner/work/turf/turf/packages/turf-standard-deviational-ellipse/dist/cjs/index.cjs","sourcesContent":[null,"import {\n FeatureCollection,\n Feature,\n Position,\n Polygon,\n GeoJsonProperties,\n Point,\n} from \"geojson\";\nimport { coordAll, featureEach } from \"@turf/meta\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureCollection, isObject, isNumber } from \"@turf/helpers\";\nimport { centerMean } from \"@turf/center-mean\";\nimport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nimport { ellipse } from \"@turf/ellipse\";\n\ndeclare interface SDEProps {\n meanCenterCoordinates: Position;\n semiMajorAxis: number;\n semiMinorAxis: number;\n numberOfFeatures: number;\n angle: number;\n percentageWithinEllipse: number;\n}\n\ndeclare interface StandardDeviationalEllipse extends Feature<Polygon> {\n properties: {\n standardDeviationalEllipse: SDEProps;\n [key: string]: any;\n } | null;\n}\n\n/**\n * Takes a collection of features and returns a standard deviational ellipse,\n * also known as a “directional distribution.” The standard deviational ellipse\n * aims to show the direction and the distribution of a dataset by drawing\n * an ellipse that contains about one standard deviation’s worth (~ 70%) of the\n * data.\n *\n * This module mirrors the functionality of {@link http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/directional-distribution.htm|Directional Distribution}\n * in ArcGIS and the {@link http://arken.nmbu.no/~havatv/gis/qgisplugins/SDEllipse/|QGIS Standard Deviational Ellipse Plugin}\n *\n * **Bibliography**\n *\n * • Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for\n * Spatial Description,” _Geografiska Annaler_ 53, no. 1 (1971): 28–39,\n * doi:{@link https://doi.org/10.2307/490885|10.2307/490885}.\n *\n * • Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”\n * _American Journal of Sociology_ 33, no. 1 (1927): 94—98,\n * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.\n *\n *\n * @function\n * @param {FeatureCollection<Point>} points GeoJSON points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.weight] the property name used to weight the center\n * @param {number} [options.steps=64] number of steps for the polygon\n * @param {Object} [options.properties={}] properties to pass to the resulting ellipse\n * @returns {Feature<Polygon>} an elliptical Polygon that includes approximately 1 SD of the dataset within it.\n * @example\n *\n * const bbox = [-74, 40.72, -73.98, 40.74];\n * const points = turf.randomPoint(400, {bbox: bbox});\n * const sdEllipse = turf.standardDeviationalEllipse(points);\n *\n * //addToMap\n * const addToMap = [points, sdEllipse];\n *\n */\nfunction standardDeviationalEllipse(\n points: FeatureCollection<Point>,\n options?: {\n properties?: GeoJsonProperties;\n weight?: string;\n steps?: number;\n }\n): StandardDeviationalEllipse {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const steps = options.steps || 64;\n const weightTerm = options.weight;\n const properties = options.properties || {};\n\n // Validation:\n if (!isNumber(steps)) throw new Error(\"steps must be a number\");\n if (!isObject(properties)) throw new Error(\"properties must be a number\");\n\n // Calculate mean center & number of features:\n const numberOfFeatures = coordAll(points).length;\n const meanCenter = centerMean(points, { weight: weightTerm });\n\n // Calculate angle of rotation:\n // [X, Y] = mean center of all [x, y].\n // theta = arctan( (A + B) / C )\n // A = sum((x - X)^2) - sum((y - Y)^2)\n // B = sqrt(A^2 + 4(sum((x - X)(y - Y))^2))\n // C = 2(sum((x - X)(y - Y)))\n\n let xDeviationSquaredSum = 0;\n let yDeviationSquaredSum = 0;\n let xyDeviationSum = 0;\n\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n xDeviationSquaredSum += Math.pow(deviation.x, 2) * weight;\n yDeviationSquaredSum += Math.pow(deviation.y, 2) * weight;\n xyDeviationSum += deviation.x * deviation.y * weight;\n });\n\n const bigA = xDeviationSquaredSum - yDeviationSquaredSum;\n const bigB = Math.sqrt(Math.pow(bigA, 2) + 4 * Math.pow(xyDeviationSum, 2));\n const bigC = 2 * xyDeviationSum;\n const theta = Math.atan((bigA + bigB) / bigC);\n const thetaDeg = (theta * 180) / Math.PI;\n\n // Calculate axes:\n // sigmaX = sqrt((1 / n - 2) * sum((((x - X) * cos(theta)) - ((y - Y) * sin(theta)))^2))\n // sigmaY = sqrt((1 / n - 2) * sum((((x - X) * sin(theta)) - ((y - Y) * cos(theta)))^2))\n let sigmaXsum = 0;\n let sigmaYsum = 0;\n let weightsum = 0;\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n sigmaXsum +=\n Math.pow(\n deviation.x * Math.cos(theta) - deviation.y * Math.sin(theta),\n 2\n ) * weight;\n sigmaYsum +=\n Math.pow(\n deviation.x * Math.sin(theta) + deviation.y * Math.cos(theta),\n 2\n ) * weight;\n weightsum += weight;\n });\n\n const sigmaX = Math.sqrt((2 * sigmaXsum) / weightsum);\n const sigmaY = Math.sqrt((2 * sigmaYsum) / weightsum);\n\n const theEllipse: Feature<Polygon> = ellipse(meanCenter, sigmaX, sigmaY, {\n units: \"degrees\",\n angle: thetaDeg,\n steps: steps,\n properties: properties,\n });\n const pointsWithinEllipse = pointsWithinPolygon(\n points,\n featureCollection([theEllipse])\n );\n const standardDeviationalEllipseProperties = {\n meanCenterCoordinates: getCoords(meanCenter),\n semiMajorAxis: sigmaX,\n semiMinorAxis: sigmaY,\n numberOfFeatures: numberOfFeatures,\n angle: thetaDeg,\n percentageWithinEllipse:\n (100 * coordAll(pointsWithinEllipse).length) / numberOfFeatures,\n };\n // Make sure properties object exists.\n theEllipse.properties = theEllipse.properties ?? {};\n theEllipse.properties.standardDeviationalEllipse =\n standardDeviationalEllipseProperties;\n\n // We have added the StandardDeviationalEllipse specific properties, so\n // confirm this to Typescript with a cast.\n return theEllipse as StandardDeviationalEllipse;\n}\n\n/**\n * Get x_i - X and y_i - Y\n *\n * @private\n * @param {Position} coordinates Array of [x_i, y_i]\n * @param {Position} center Array of [X, Y]\n * @returns {Object} { x: n, y: m }\n */\nfunction getDeviations(coordinates: Position, center: Position) {\n return {\n x: coordinates[0] - center[0],\n y: coordinates[1] - center[1],\n };\n}\n\nexport { standardDeviationalEllipse, SDEProps, StandardDeviationalEllipse };\nexport default standardDeviationalEllipse;\n"]}
|
|
@@ -79,9 +79,9 @@ function getDeviations(coordinates, center) {
|
|
|
79
79
|
y: coordinates[1] - center[1]
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
var
|
|
82
|
+
var index_default = standardDeviationalEllipse;
|
|
83
83
|
export {
|
|
84
|
-
|
|
84
|
+
index_default as default,
|
|
85
85
|
standardDeviationalEllipse
|
|
86
86
|
};
|
|
87
87
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n FeatureCollection,\n Feature,\n Position,\n Polygon,\n GeoJsonProperties,\n Point,\n} from \"geojson\";\nimport { coordAll, featureEach } from \"@turf/meta\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureCollection, isObject, isNumber } from \"@turf/helpers\";\nimport { centerMean } from \"@turf/center-mean\";\nimport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nimport { ellipse } from \"@turf/ellipse\";\n\ndeclare interface SDEProps {\n meanCenterCoordinates: Position;\n semiMajorAxis: number;\n semiMinorAxis: number;\n numberOfFeatures: number;\n angle: number;\n percentageWithinEllipse: number;\n}\n\ndeclare interface StandardDeviationalEllipse extends Feature<Polygon> {\n properties: {\n standardDeviationalEllipse: SDEProps;\n [key: string]: any;\n } | null;\n}\n\n/**\n * Takes a collection of features and returns a standard deviational ellipse,\n * also known as a “directional distribution.” The standard deviational ellipse\n * aims to show the direction and the distribution of a dataset by drawing\n * an ellipse that contains about one standard deviation’s worth (~ 70%) of the\n * data.\n *\n * This module mirrors the functionality of {@link http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/directional-distribution.htm|Directional Distribution}\n * in ArcGIS and the {@link http://arken.nmbu.no/~havatv/gis/qgisplugins/SDEllipse/|QGIS Standard Deviational Ellipse Plugin}\n *\n * **Bibliography**\n *\n * • Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for\n * Spatial Description,” _Geografiska Annaler_ 53, no. 1 (1971): 28–39,\n * doi:{@link https://doi.org/10.2307/490885|10.2307/490885}.\n *\n * • Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”\n * _American Journal of Sociology_ 33, no. 1 (1927): 94—98,\n * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.\n *\n *\n * @function\n * @param {FeatureCollection<Point>} points GeoJSON points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.weight] the property name used to weight the center\n * @param {number} [options.steps=64] number of steps for the polygon\n * @param {Object} [options.properties={}] properties to pass to the resulting ellipse\n * @returns {Feature<Polygon>} an elliptical Polygon that includes approximately 1 SD of the dataset within it.\n * @example\n *\n * const bbox = [-74, 40.72, -73.98, 40.74];\n * const points = turf.randomPoint(400, {bbox: bbox});\n * const sdEllipse = turf.standardDeviationalEllipse(points);\n *\n * //addToMap\n * const addToMap = [points, sdEllipse];\n *\n */\nfunction standardDeviationalEllipse(\n points: FeatureCollection<Point>,\n options?: {\n properties?: GeoJsonProperties;\n weight?: string;\n steps?: number;\n }\n): StandardDeviationalEllipse {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const steps = options.steps || 64;\n const weightTerm = options.weight;\n const properties = options.properties || {};\n\n // Validation:\n if (!isNumber(steps)) throw new Error(\"steps must be a number\");\n if (!isObject(properties)) throw new Error(\"properties must be a number\");\n\n // Calculate mean center & number of features:\n const numberOfFeatures = coordAll(points).length;\n const meanCenter = centerMean(points, { weight: weightTerm });\n\n // Calculate angle of rotation:\n // [X, Y] = mean center of all [x, y].\n // theta = arctan( (A + B) / C )\n // A = sum((x - X)^2) - sum((y - Y)^2)\n // B = sqrt(A^2 + 4(sum((x - X)(y - Y))^2))\n // C = 2(sum((x - X)(y - Y)))\n\n let xDeviationSquaredSum = 0;\n let yDeviationSquaredSum = 0;\n let xyDeviationSum = 0;\n\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n xDeviationSquaredSum += Math.pow(deviation.x, 2) * weight;\n yDeviationSquaredSum += Math.pow(deviation.y, 2) * weight;\n xyDeviationSum += deviation.x * deviation.y * weight;\n });\n\n const bigA = xDeviationSquaredSum - yDeviationSquaredSum;\n const bigB = Math.sqrt(Math.pow(bigA, 2) + 4 * Math.pow(xyDeviationSum, 2));\n const bigC = 2 * xyDeviationSum;\n const theta = Math.atan((bigA + bigB) / bigC);\n const thetaDeg = (theta * 180) / Math.PI;\n\n // Calculate axes:\n // sigmaX = sqrt((1 / n - 2) * sum((((x - X) * cos(theta)) - ((y - Y) * sin(theta)))^2))\n // sigmaY = sqrt((1 / n - 2) * sum((((x - X) * sin(theta)) - ((y - Y) * cos(theta)))^2))\n let sigmaXsum = 0;\n let sigmaYsum = 0;\n let weightsum = 0;\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n sigmaXsum +=\n Math.pow(\n deviation.x * Math.cos(theta) - deviation.y * Math.sin(theta),\n 2\n ) * weight;\n sigmaYsum +=\n Math.pow(\n deviation.x * Math.sin(theta) + deviation.y * Math.cos(theta),\n 2\n ) * weight;\n weightsum += weight;\n });\n\n const sigmaX = Math.sqrt((2 * sigmaXsum) / weightsum);\n const sigmaY = Math.sqrt((2 * sigmaYsum) / weightsum);\n\n const theEllipse: Feature<Polygon> = ellipse(meanCenter, sigmaX, sigmaY, {\n units: \"degrees\",\n angle: thetaDeg,\n steps: steps,\n properties: properties,\n });\n const pointsWithinEllipse = pointsWithinPolygon(\n points,\n featureCollection([theEllipse])\n );\n const standardDeviationalEllipseProperties = {\n meanCenterCoordinates: getCoords(meanCenter),\n semiMajorAxis: sigmaX,\n semiMinorAxis: sigmaY,\n numberOfFeatures: numberOfFeatures,\n angle: thetaDeg,\n percentageWithinEllipse:\n (100 * coordAll(pointsWithinEllipse).length) / numberOfFeatures,\n };\n // Make sure properties object exists.\n theEllipse.properties = theEllipse.properties ?? {};\n theEllipse.properties.standardDeviationalEllipse =\n standardDeviationalEllipseProperties;\n\n // We have added the StandardDeviationalEllipse specific properties, so\n // confirm this to Typescript with a cast.\n return theEllipse as StandardDeviationalEllipse;\n}\n\n/**\n * Get x_i - X and y_i - Y\n *\n * @private\n * @param {Position} coordinates Array of [x_i, y_i]\n * @param {Position} center Array of [X, Y]\n * @returns {Object} { x: n, y: m }\n */\nfunction getDeviations(coordinates: Position, center: Position) {\n return {\n x: coordinates[0] - center[0],\n y: coordinates[1] - center[1],\n };\n}\n\nexport { standardDeviationalEllipse, SDEProps, StandardDeviationalEllipse };\nexport default standardDeviationalEllipse;\n"],"mappings":";AAQA,SAAS,UAAU,mBAAmB;AACtC,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB,UAAU,gBAAgB;AACtD,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,eAAe;AAwDxB,SAAS,2BACP,QACA,SAK4B;AA5E9B;AA8EE,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO,EAAG,OAAM,IAAI,MAAM,oBAAoB;AAC5D,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,aAAa,QAAQ;AAC3B,QAAM,aAAa,QAAQ,cAAc,CAAC;AAG1C,MAAI,CAAC,SAAS,KAAK,EAAG,OAAM,IAAI,MAAM,wBAAwB;AAC9D,MAAI,CAAC,SAAS,UAAU,EAAG,OAAM,IAAI,MAAM,6BAA6B;AAGxE,QAAM,mBAAmB,SAAS,MAAM,EAAE;AAC1C,QAAM,aAAa,WAAW,QAAQ,EAAE,QAAQ,WAAW,CAAC;AAS5D,MAAI,uBAAuB;AAC3B,MAAI,uBAAuB;AAC3B,MAAI,iBAAiB;AA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AAA,IACvE,OAAO;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,sBAAsB;AAAA,IAC1B;AAAA,IACA,kBAAkB,CAAC,UAAU,CAAC;AAAA,EAChC;AACA,QAAM,uCAAuC;AAAA,IAC3C,uBAAuB,UAAU,UAAU;AAAA,IAC3C,eAAe;AAAA,IACf,eAAe;AAAA,IACf;AAAA,IACA,OAAO;AAAA,IACP,yBACG,MAAM,SAAS,mBAAmB,EAAE,SAAU;AAAA,EACnD;AAEA,aAAW,cAAa,gBAAW,eAAX,YAAyB,CAAC;AAClD,aAAW,WAAW,6BACpB;AAIF,SAAO;AACT;AAUA,SAAS,cAAc,aAAuB,QAAkB;AAC9D,SAAO;AAAA,IACL,GAAG,YAAY,CAAC,IAAI,OAAO,CAAC;AAAA,IAC5B,GAAG,YAAY,CAAC,IAAI,OAAO,CAAC;AAAA,EAC9B;AACF;AAGA,IAAO,
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n FeatureCollection,\n Feature,\n Position,\n Polygon,\n GeoJsonProperties,\n Point,\n} from \"geojson\";\nimport { coordAll, featureEach } from \"@turf/meta\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureCollection, isObject, isNumber } from \"@turf/helpers\";\nimport { centerMean } from \"@turf/center-mean\";\nimport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nimport { ellipse } from \"@turf/ellipse\";\n\ndeclare interface SDEProps {\n meanCenterCoordinates: Position;\n semiMajorAxis: number;\n semiMinorAxis: number;\n numberOfFeatures: number;\n angle: number;\n percentageWithinEllipse: number;\n}\n\ndeclare interface StandardDeviationalEllipse extends Feature<Polygon> {\n properties: {\n standardDeviationalEllipse: SDEProps;\n [key: string]: any;\n } | null;\n}\n\n/**\n * Takes a collection of features and returns a standard deviational ellipse,\n * also known as a “directional distribution.” The standard deviational ellipse\n * aims to show the direction and the distribution of a dataset by drawing\n * an ellipse that contains about one standard deviation’s worth (~ 70%) of the\n * data.\n *\n * This module mirrors the functionality of {@link http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/directional-distribution.htm|Directional Distribution}\n * in ArcGIS and the {@link http://arken.nmbu.no/~havatv/gis/qgisplugins/SDEllipse/|QGIS Standard Deviational Ellipse Plugin}\n *\n * **Bibliography**\n *\n * • Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for\n * Spatial Description,” _Geografiska Annaler_ 53, no. 1 (1971): 28–39,\n * doi:{@link https://doi.org/10.2307/490885|10.2307/490885}.\n *\n * • Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”\n * _American Journal of Sociology_ 33, no. 1 (1927): 94—98,\n * doi:{@link https://doi.org/10.1086/214336|10.1086/214336}.\n *\n *\n * @function\n * @param {FeatureCollection<Point>} points GeoJSON points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.weight] the property name used to weight the center\n * @param {number} [options.steps=64] number of steps for the polygon\n * @param {Object} [options.properties={}] properties to pass to the resulting ellipse\n * @returns {Feature<Polygon>} an elliptical Polygon that includes approximately 1 SD of the dataset within it.\n * @example\n *\n * const bbox = [-74, 40.72, -73.98, 40.74];\n * const points = turf.randomPoint(400, {bbox: bbox});\n * const sdEllipse = turf.standardDeviationalEllipse(points);\n *\n * //addToMap\n * const addToMap = [points, sdEllipse];\n *\n */\nfunction standardDeviationalEllipse(\n points: FeatureCollection<Point>,\n options?: {\n properties?: GeoJsonProperties;\n weight?: string;\n steps?: number;\n }\n): StandardDeviationalEllipse {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const steps = options.steps || 64;\n const weightTerm = options.weight;\n const properties = options.properties || {};\n\n // Validation:\n if (!isNumber(steps)) throw new Error(\"steps must be a number\");\n if (!isObject(properties)) throw new Error(\"properties must be a number\");\n\n // Calculate mean center & number of features:\n const numberOfFeatures = coordAll(points).length;\n const meanCenter = centerMean(points, { weight: weightTerm });\n\n // Calculate angle of rotation:\n // [X, Y] = mean center of all [x, y].\n // theta = arctan( (A + B) / C )\n // A = sum((x - X)^2) - sum((y - Y)^2)\n // B = sqrt(A^2 + 4(sum((x - X)(y - Y))^2))\n // C = 2(sum((x - X)(y - Y)))\n\n let xDeviationSquaredSum = 0;\n let yDeviationSquaredSum = 0;\n let xyDeviationSum = 0;\n\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n xDeviationSquaredSum += Math.pow(deviation.x, 2) * weight;\n yDeviationSquaredSum += Math.pow(deviation.y, 2) * weight;\n xyDeviationSum += deviation.x * deviation.y * weight;\n });\n\n const bigA = xDeviationSquaredSum - yDeviationSquaredSum;\n const bigB = Math.sqrt(Math.pow(bigA, 2) + 4 * Math.pow(xyDeviationSum, 2));\n const bigC = 2 * xyDeviationSum;\n const theta = Math.atan((bigA + bigB) / bigC);\n const thetaDeg = (theta * 180) / Math.PI;\n\n // Calculate axes:\n // sigmaX = sqrt((1 / n - 2) * sum((((x - X) * cos(theta)) - ((y - Y) * sin(theta)))^2))\n // sigmaY = sqrt((1 / n - 2) * sum((((x - X) * sin(theta)) - ((y - Y) * cos(theta)))^2))\n let sigmaXsum = 0;\n let sigmaYsum = 0;\n let weightsum = 0;\n featureEach(points, function (point) {\n // weightTerm or point.properties might be undefined, hence this check.\n const weight = weightTerm ? point.properties?.[weightTerm] || 1 : 1;\n const deviation = getDeviations(getCoords(point), getCoords(meanCenter));\n sigmaXsum +=\n Math.pow(\n deviation.x * Math.cos(theta) - deviation.y * Math.sin(theta),\n 2\n ) * weight;\n sigmaYsum +=\n Math.pow(\n deviation.x * Math.sin(theta) + deviation.y * Math.cos(theta),\n 2\n ) * weight;\n weightsum += weight;\n });\n\n const sigmaX = Math.sqrt((2 * sigmaXsum) / weightsum);\n const sigmaY = Math.sqrt((2 * sigmaYsum) / weightsum);\n\n const theEllipse: Feature<Polygon> = ellipse(meanCenter, sigmaX, sigmaY, {\n units: \"degrees\",\n angle: thetaDeg,\n steps: steps,\n properties: properties,\n });\n const pointsWithinEllipse = pointsWithinPolygon(\n points,\n featureCollection([theEllipse])\n );\n const standardDeviationalEllipseProperties = {\n meanCenterCoordinates: getCoords(meanCenter),\n semiMajorAxis: sigmaX,\n semiMinorAxis: sigmaY,\n numberOfFeatures: numberOfFeatures,\n angle: thetaDeg,\n percentageWithinEllipse:\n (100 * coordAll(pointsWithinEllipse).length) / numberOfFeatures,\n };\n // Make sure properties object exists.\n theEllipse.properties = theEllipse.properties ?? {};\n theEllipse.properties.standardDeviationalEllipse =\n standardDeviationalEllipseProperties;\n\n // We have added the StandardDeviationalEllipse specific properties, so\n // confirm this to Typescript with a cast.\n return theEllipse as StandardDeviationalEllipse;\n}\n\n/**\n * Get x_i - X and y_i - Y\n *\n * @private\n * @param {Position} coordinates Array of [x_i, y_i]\n * @param {Position} center Array of [X, Y]\n * @returns {Object} { x: n, y: m }\n */\nfunction getDeviations(coordinates: Position, center: Position) {\n return {\n x: coordinates[0] - center[0],\n y: coordinates[1] - center[1],\n };\n}\n\nexport { standardDeviationalEllipse, SDEProps, StandardDeviationalEllipse };\nexport default standardDeviationalEllipse;\n"],"mappings":";AAQA,SAAS,UAAU,mBAAmB;AACtC,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB,UAAU,gBAAgB;AACtD,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,eAAe;AAwDxB,SAAS,2BACP,QACA,SAK4B;AA5E9B;AA8EE,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO,EAAG,OAAM,IAAI,MAAM,oBAAoB;AAC5D,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,aAAa,QAAQ;AAC3B,QAAM,aAAa,QAAQ,cAAc,CAAC;AAG1C,MAAI,CAAC,SAAS,KAAK,EAAG,OAAM,IAAI,MAAM,wBAAwB;AAC9D,MAAI,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