node-red-contrib-tak-registration 0.16.1 → 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 +1 -1
- package/node_modules/@types/node/assert/strict.d.ts +105 -2
- package/node_modules/@types/node/assert.d.ts +154 -95
- package/node_modules/@types/node/buffer.buffer.d.ts +9 -0
- package/node_modules/@types/node/buffer.d.ts +8 -4
- package/node_modules/@types/node/child_process.d.ts +65 -42
- package/node_modules/@types/node/cluster.d.ts +4 -5
- package/node_modules/@types/node/console.d.ts +3 -2
- package/node_modules/@types/node/crypto.d.ts +1173 -322
- package/node_modules/@types/node/dgram.d.ts +9 -8
- package/node_modules/@types/node/diagnostics_channel.d.ts +0 -2
- package/node_modules/@types/node/dns.d.ts +6 -1
- package/node_modules/@types/node/events.d.ts +80 -34
- package/node_modules/@types/node/fs/promises.d.ts +39 -21
- package/node_modules/@types/node/fs.d.ts +328 -87
- package/node_modules/@types/node/globals.d.ts +2 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +19 -0
- package/node_modules/@types/node/http.d.ts +119 -31
- package/node_modules/@types/node/http2.d.ts +178 -52
- package/node_modules/@types/node/https.d.ts +96 -62
- package/node_modules/@types/node/index.d.ts +3 -1
- package/node_modules/@types/node/inspector.d.ts +205 -4139
- package/node_modules/@types/node/inspector.generated.d.ts +4233 -0
- package/node_modules/@types/node/net.d.ts +33 -11
- package/node_modules/@types/node/os.d.ts +14 -3
- package/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/node/perf_hooks.d.ts +6 -8
- package/node_modules/@types/node/process.d.ts +19 -23
- package/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/node_modules/@types/node/sea.d.ts +9 -0
- package/node_modules/@types/node/sqlite.d.ts +233 -10
- package/node_modules/@types/node/stream/consumers.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +6 -55
- package/node_modules/@types/node/stream.d.ts +38 -23
- package/node_modules/@types/node/string_decoder.d.ts +2 -2
- package/node_modules/@types/node/test.d.ts +31 -26
- package/node_modules/@types/node/tls.d.ts +122 -66
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +3 -1
- package/node_modules/@types/node/ts5.7/index.d.ts +3 -1
- package/node_modules/@types/node/url.d.ts +48 -16
- package/node_modules/@types/node/util.d.ts +23 -7
- package/node_modules/@types/node/v8.d.ts +38 -5
- package/node_modules/@types/node/vm.d.ts +169 -88
- package/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/events.d.ts +3 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +142 -51
- package/node_modules/@types/node/zlib.d.ts +31 -24
- package/node_modules/axios/CHANGELOG.md +410 -346
- package/node_modules/axios/README.md +79 -51
- package/node_modules/axios/dist/axios.js +121 -46
- 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 +126 -57
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +126 -57
- 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 +351 -97
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +4 -0
- package/node_modules/axios/index.d.ts +4 -0
- package/node_modules/axios/lib/adapters/adapters.js +85 -40
- package/node_modules/axios/lib/adapters/fetch.js +1 -1
- package/node_modules/axios/lib/adapters/http.js +224 -42
- package/node_modules/axios/lib/core/InterceptorManager.js +1 -1
- package/node_modules/axios/lib/core/mergeConfig.js +4 -4
- 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/cookies.js +24 -13
- package/node_modules/axios/package.json +9 -4
- 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/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/undici-types/agent.d.ts +1 -4
- package/node_modules/undici-types/client.d.ts +0 -2
- package/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
- package/node_modules/undici-types/dispatcher.d.ts +0 -6
- package/node_modules/undici-types/errors.d.ts +5 -15
- package/node_modules/undici-types/eventsource.d.ts +6 -1
- package/node_modules/undici-types/h2c-client.d.ts +0 -2
- package/node_modules/undici-types/index.d.ts +6 -1
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +0 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/webidl.d.ts +92 -21
- package/node_modules/undici-types/websocket.d.ts +2 -0
- package/package.json +5 -5
- package/tak-registration.js +11 -11
- 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
|
@@ -20,7 +20,6 @@ var _bbox = require('@turf/bbox');
|
|
|
20
20
|
var _meta = require('@turf/meta');
|
|
21
21
|
var _invariant = require('@turf/invariant');
|
|
22
22
|
var _helpers = require('@turf/helpers');
|
|
23
|
-
var _marchingsquares = require('marchingsquares');
|
|
24
23
|
|
|
25
24
|
// lib/grid-to-matrix.js
|
|
26
25
|
|
|
@@ -84,6 +83,15 @@ function isolines(pointGrid, breaks, options) {
|
|
|
84
83
|
if (!Array.isArray(breaksProperties))
|
|
85
84
|
throw new Error("breaksProperties must be an Array");
|
|
86
85
|
const matrix = gridToMatrix(pointGrid, { zProperty, flip: true });
|
|
86
|
+
const dx = matrix[0].length;
|
|
87
|
+
if (matrix.length < 2 || dx < 2) {
|
|
88
|
+
throw new Error("Matrix of points must be at least 2x2");
|
|
89
|
+
}
|
|
90
|
+
for (let i = 1; i < matrix.length; i++) {
|
|
91
|
+
if (matrix[i].length !== dx) {
|
|
92
|
+
throw new Error("Matrix of points is not uniform in the x dimension");
|
|
93
|
+
}
|
|
94
|
+
}
|
|
87
95
|
const createdIsoLines = createIsoLines(
|
|
88
96
|
matrix,
|
|
89
97
|
breaks,
|
|
@@ -100,14 +108,191 @@ function createIsoLines(matrix, breaks, zProperty, commonProperties, breaksPrope
|
|
|
100
108
|
const threshold = +breaks[i];
|
|
101
109
|
const properties = __spreadValues(__spreadValues({}, commonProperties), breaksProperties[i]);
|
|
102
110
|
properties[zProperty] = threshold;
|
|
103
|
-
const isoline = _helpers.multiLineString.call(void 0,
|
|
104
|
-
_marchingsquares.isoContours.call(void 0, matrix, threshold, { linearRing: false, noFrame: true }),
|
|
105
|
-
properties
|
|
106
|
-
);
|
|
111
|
+
const isoline = _helpers.multiLineString.call(void 0, isoContours(matrix, threshold), properties);
|
|
107
112
|
results.push(isoline);
|
|
108
113
|
}
|
|
109
114
|
return results;
|
|
110
115
|
}
|
|
116
|
+
function isoContours(matrix, threshold) {
|
|
117
|
+
const segments = [];
|
|
118
|
+
const dy = matrix.length;
|
|
119
|
+
const dx = matrix[0].length;
|
|
120
|
+
for (let y = 0; y < dy - 1; y++) {
|
|
121
|
+
for (let x = 0; x < dx - 1; x++) {
|
|
122
|
+
const tr = matrix[y + 1][x + 1];
|
|
123
|
+
const br = matrix[y][x + 1];
|
|
124
|
+
const bl = matrix[y][x];
|
|
125
|
+
const tl = matrix[y + 1][x];
|
|
126
|
+
let grid = (tl >= threshold ? 8 : 0) | (tr >= threshold ? 4 : 0) | (br >= threshold ? 2 : 0) | (bl >= threshold ? 1 : 0);
|
|
127
|
+
switch (grid) {
|
|
128
|
+
case 0:
|
|
129
|
+
continue;
|
|
130
|
+
case 1:
|
|
131
|
+
segments.push([
|
|
132
|
+
[x + frac(bl, br), y],
|
|
133
|
+
[x, y + frac(bl, tl)]
|
|
134
|
+
]);
|
|
135
|
+
break;
|
|
136
|
+
case 2:
|
|
137
|
+
segments.push([
|
|
138
|
+
[x + 1, y + frac(br, tr)],
|
|
139
|
+
[x + frac(bl, br), y]
|
|
140
|
+
]);
|
|
141
|
+
break;
|
|
142
|
+
case 3:
|
|
143
|
+
segments.push([
|
|
144
|
+
[x + 1, y + frac(br, tr)],
|
|
145
|
+
[x, y + frac(bl, tl)]
|
|
146
|
+
]);
|
|
147
|
+
break;
|
|
148
|
+
case 4:
|
|
149
|
+
segments.push([
|
|
150
|
+
[x + frac(tl, tr), y + 1],
|
|
151
|
+
[x + 1, y + frac(br, tr)]
|
|
152
|
+
]);
|
|
153
|
+
break;
|
|
154
|
+
case 5: {
|
|
155
|
+
const avg = (tl + tr + br + bl) / 4;
|
|
156
|
+
const above = avg >= threshold;
|
|
157
|
+
if (above) {
|
|
158
|
+
segments.push(
|
|
159
|
+
[
|
|
160
|
+
[x + frac(tl, tr), y + 1],
|
|
161
|
+
[x, y + frac(bl, tl)]
|
|
162
|
+
],
|
|
163
|
+
[
|
|
164
|
+
[x + frac(bl, br), y],
|
|
165
|
+
[x + 1, y + frac(br, tr)]
|
|
166
|
+
]
|
|
167
|
+
);
|
|
168
|
+
} else {
|
|
169
|
+
segments.push(
|
|
170
|
+
[
|
|
171
|
+
[x + frac(tl, tr), y + 1],
|
|
172
|
+
[x + 1, y + frac(br, tr)]
|
|
173
|
+
],
|
|
174
|
+
[
|
|
175
|
+
[x + frac(bl, br), y],
|
|
176
|
+
[x, y + frac(bl, tl)]
|
|
177
|
+
]
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
case 6:
|
|
183
|
+
segments.push([
|
|
184
|
+
[x + frac(tl, tr), y + 1],
|
|
185
|
+
[x + frac(bl, br), y]
|
|
186
|
+
]);
|
|
187
|
+
break;
|
|
188
|
+
case 7:
|
|
189
|
+
segments.push([
|
|
190
|
+
[x + frac(tl, tr), y + 1],
|
|
191
|
+
[x, y + frac(bl, tl)]
|
|
192
|
+
]);
|
|
193
|
+
break;
|
|
194
|
+
case 8:
|
|
195
|
+
segments.push([
|
|
196
|
+
[x, y + frac(bl, tl)],
|
|
197
|
+
[x + frac(tl, tr), y + 1]
|
|
198
|
+
]);
|
|
199
|
+
break;
|
|
200
|
+
case 9:
|
|
201
|
+
segments.push([
|
|
202
|
+
[x + frac(bl, br), y],
|
|
203
|
+
[x + frac(tl, tr), y + 1]
|
|
204
|
+
]);
|
|
205
|
+
break;
|
|
206
|
+
case 10: {
|
|
207
|
+
const avg = (tl + tr + br + bl) / 4;
|
|
208
|
+
const above = avg >= threshold;
|
|
209
|
+
if (above) {
|
|
210
|
+
segments.push(
|
|
211
|
+
[
|
|
212
|
+
[x, y + frac(bl, tl)],
|
|
213
|
+
[x + frac(bl, br), y]
|
|
214
|
+
],
|
|
215
|
+
[
|
|
216
|
+
[x + 1, y + frac(br, tr)],
|
|
217
|
+
[x + frac(tl, tr), y + 1]
|
|
218
|
+
]
|
|
219
|
+
);
|
|
220
|
+
} else {
|
|
221
|
+
segments.push(
|
|
222
|
+
[
|
|
223
|
+
[x, y + frac(bl, tl)],
|
|
224
|
+
[x + frac(tl, tr), y + 1]
|
|
225
|
+
],
|
|
226
|
+
[
|
|
227
|
+
[x + 1, y + frac(br, tr)],
|
|
228
|
+
[x + frac(bl, br), y]
|
|
229
|
+
]
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
case 11:
|
|
235
|
+
segments.push([
|
|
236
|
+
[x + 1, y + frac(br, tr)],
|
|
237
|
+
[x + frac(tl, tr), y + 1]
|
|
238
|
+
]);
|
|
239
|
+
break;
|
|
240
|
+
case 12:
|
|
241
|
+
segments.push([
|
|
242
|
+
[x, y + frac(bl, tl)],
|
|
243
|
+
[x + 1, y + frac(br, tr)]
|
|
244
|
+
]);
|
|
245
|
+
break;
|
|
246
|
+
case 13:
|
|
247
|
+
segments.push([
|
|
248
|
+
[x + frac(bl, br), y],
|
|
249
|
+
[x + 1, y + frac(br, tr)]
|
|
250
|
+
]);
|
|
251
|
+
break;
|
|
252
|
+
case 14:
|
|
253
|
+
segments.push([
|
|
254
|
+
[x, y + frac(bl, tl)],
|
|
255
|
+
[x + frac(bl, br), y]
|
|
256
|
+
]);
|
|
257
|
+
break;
|
|
258
|
+
case 15:
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
const contours = [];
|
|
264
|
+
while (segments.length > 0) {
|
|
265
|
+
const contour = [...segments.shift()];
|
|
266
|
+
contours.push(contour);
|
|
267
|
+
let found;
|
|
268
|
+
do {
|
|
269
|
+
found = false;
|
|
270
|
+
for (let i = 0; i < segments.length; i++) {
|
|
271
|
+
const segment = segments[i];
|
|
272
|
+
if (segment[0][0] === contour[contour.length - 1][0] && segment[0][1] === contour[contour.length - 1][1]) {
|
|
273
|
+
found = true;
|
|
274
|
+
contour.push(segment[1]);
|
|
275
|
+
segments.splice(i, 1);
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
if (segment[1][0] === contour[0][0] && segment[1][1] === contour[0][1]) {
|
|
279
|
+
found = true;
|
|
280
|
+
contour.unshift(segment[0]);
|
|
281
|
+
segments.splice(i, 1);
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
} while (found);
|
|
286
|
+
}
|
|
287
|
+
return contours;
|
|
288
|
+
function frac(z0, z1) {
|
|
289
|
+
if (z0 === z1) {
|
|
290
|
+
return 0.5;
|
|
291
|
+
}
|
|
292
|
+
let t = (threshold - z0) / (z1 - z0);
|
|
293
|
+
return t > 1 ? 1 : t < 0 ? 0 : t;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
111
296
|
function rescaleIsolines(createdIsoLines, matrix, points) {
|
|
112
297
|
const gridBbox = _bbox.bbox.call(void 0, points);
|
|
113
298
|
const originalWidth = gridBbox[2] - gridBbox[0];
|
|
@@ -127,9 +312,9 @@ function rescaleIsolines(createdIsoLines, matrix, points) {
|
|
|
127
312
|
});
|
|
128
313
|
return createdIsoLines;
|
|
129
314
|
}
|
|
130
|
-
var
|
|
315
|
+
var index_default = isolines;
|
|
131
316
|
|
|
132
317
|
|
|
133
318
|
|
|
134
|
-
exports.default =
|
|
319
|
+
exports.default = index_default; exports.isolines = isolines;
|
|
135
320
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-isolines/dist/cjs/index.cjs","../../index.ts","../../lib/grid-to-matrix.js"],"names":["isObject","collectionOf"],"mappings":"AAAA,6EAAI,UAAU,EAAE,MAAM,CAAC,cAAc;AACrC,IAAI,oBAAoB,EAAE,MAAM,CAAC,qBAAqB;AACtD,IAAI,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,cAAc;AAClD,IAAI,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,oBAAoB;AACxD,IAAI,gBAAgB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,GAAG,IAAI,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK;AAC/J,IAAI,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG;AAC/B,EAAE,IAAI,CAAC,IAAI,KAAK,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAChC,IAAI,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AACvC,EAAE,GAAG,CAAC,mBAAmB;AACzB,IAAI,IAAI,CAAC,IAAI,KA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coordEach } from \"@turf/meta\";\nimport { collectionOf } from \"@turf/invariant\";\nimport { multiLineString, featureCollection, isObject } from \"@turf/helpers\";\n// @ts-expect-error Legacy JS library with no types defined\nimport { isoContours } from \"marchingsquares\";\nimport { gridToMatrix } from \"./lib/grid-to-matrix.js\";\nimport {\n FeatureCollection,\n Point,\n MultiLineString,\n Feature,\n GeoJsonProperties,\n} from \"geojson\";\n\n/**\n * Takes a grid {@link FeatureCollection} of {@link Point} features with z-values and an array of\n * value breaks and generates [isolines](https://en.wikipedia.org/wiki/Contour_line).\n *\n * @function\n * @param {FeatureCollection<Point>} pointGrid input points\n * @param {Array<number>} breaks values of `zProperty` where to draw isolines\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled\n * @param {Object} [options.commonProperties={}] GeoJSON properties passed to ALL isolines\n * @param {Array<Object>} [options.breaksProperties=[]] GeoJSON properties passed, in order, to the correspondent isoline;\n * the breaks array will define the order in which the isolines are created\n * @returns {FeatureCollection<MultiLineString>} a FeatureCollection of {@link MultiLineString} features representing isolines\n * @example\n * // create a grid of points with random z-values in their properties\n * var extent = [0, 30, 20, 50];\n * var cellWidth = 100;\n * var pointGrid = turf.pointGrid(extent, cellWidth, {units: 'miles'});\n *\n * for (var i = 0; i < pointGrid.features.length; i++) {\n * pointGrid.features[i].properties.temperature = Math.random() * 10;\n * }\n * var breaks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n *\n * var lines = turf.isolines(pointGrid, breaks, {zProperty: 'temperature'});\n *\n * //addToMap\n * var addToMap = [lines];\n */\nfunction isolines(\n pointGrid: FeatureCollection<Point>,\n breaks: number[],\n options?: {\n zProperty?: string;\n commonProperties?: GeoJsonProperties;\n breaksProperties?: GeoJsonProperties[];\n }\n) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const zProperty = options.zProperty || \"elevation\";\n const commonProperties = options.commonProperties || {};\n const breaksProperties = options.breaksProperties || [];\n\n // Input validation\n collectionOf(pointGrid, \"Point\", \"Input must contain Points\");\n if (!breaks) throw new Error(\"breaks is required\");\n if (!Array.isArray(breaks)) throw new Error(\"breaks must be an Array\");\n if (!isObject(commonProperties))\n throw new Error(\"commonProperties must be an Object\");\n if (!Array.isArray(breaksProperties))\n throw new Error(\"breaksProperties must be an Array\");\n\n // Isoline methods\n const matrix = gridToMatrix(pointGrid, { zProperty: zProperty, flip: true });\n const createdIsoLines = createIsoLines(\n matrix,\n breaks,\n zProperty,\n commonProperties,\n breaksProperties\n );\n const scaledIsolines = rescaleIsolines(createdIsoLines, matrix, pointGrid);\n\n return featureCollection(scaledIsolines);\n}\n\n/**\n * Creates the isolines lines (featuresCollection of MultiLineString features) from the 2D data grid\n *\n * Marchingsquares process the grid data as a 3D representation of a function on a 2D plane, therefore it\n * assumes the points (x-y coordinates) are one 'unit' distance. The result of the isolines function needs to be\n * rescaled, with turfjs, to the original area and proportions on the map\n *\n * @private\n * @param {Array<Array<number>>} matrix Grid Data\n * @param {Array<number>} breaks BreakProps\n * @param {string} zProperty name of the z-values property\n * @param {Object} [commonProperties={}] GeoJSON properties passed to ALL isolines\n * @param {Object} [breaksProperties=[]] GeoJSON properties passed to the correspondent isoline\n * @returns {Array<MultiLineString>} isolines\n */\nfunction createIsoLines(\n matrix: number[][],\n breaks: number[],\n zProperty: string,\n commonProperties: GeoJsonProperties,\n breaksProperties: GeoJsonProperties[]\n): Feature<MultiLineString>[] {\n const results = [];\n for (let i = 0; i < breaks.length; i++) {\n const threshold = +breaks[i]; // make sure it's a number\n\n const properties = { ...commonProperties, ...breaksProperties[i] };\n properties[zProperty] = threshold;\n // Pass options to marchingsquares lib to reproduce historical turf\n // behaviour.\n const isoline = multiLineString(\n isoContours(matrix, threshold, { linearRing: false, noFrame: true }),\n properties\n );\n\n results.push(isoline);\n }\n return results;\n}\n\n/**\n * Translates and scales isolines\n *\n * @private\n * @param {Array<MultiLineString>} createdIsoLines to be rescaled\n * @param {Array<Array<number>>} matrix Grid Data\n * @param {Object} points Points by Latitude\n * @returns {Array<MultiLineString>} isolines\n */\nfunction rescaleIsolines(\n createdIsoLines: Feature<MultiLineString>[],\n matrix: number[][],\n points: FeatureCollection<Point>\n) {\n // get dimensions (on the map) of the original grid\n const gridBbox = bbox(points); // [ minX, minY, maxX, maxY ]\n const originalWidth = gridBbox[2] - gridBbox[0];\n const originalHeigth = gridBbox[3] - gridBbox[1];\n\n // get origin, which is the first point of the last row on the rectangular data on the map\n const x0 = gridBbox[0];\n const y0 = gridBbox[1];\n\n // get number of cells per side\n const matrixWidth = matrix[0].length - 1;\n const matrixHeight = matrix.length - 1;\n\n // calculate the scaling factor between matrix and rectangular grid on the map\n const scaleX = originalWidth / matrixWidth;\n const scaleY = originalHeigth / matrixHeight;\n\n const resize = (point: number[]) => {\n point[0] = point[0] * scaleX + x0;\n point[1] = point[1] * scaleY + y0;\n };\n\n // resize and shift each point/line of the createdIsoLines\n createdIsoLines.forEach((isoline) => {\n coordEach(isoline, resize);\n });\n return createdIsoLines;\n}\n\nexport { isolines };\nexport default isolines;\n","import { getCoords, collectionOf } from \"@turf/invariant\";\nimport { featureEach } from \"@turf/meta\";\nimport { isObject } from \"@turf/helpers\";\n\n/**\n * Takes a {@link Point} grid and returns a correspondent matrix {Array<Array<number>>}\n * of the 'property' values\n *\n * @name gridToMatrix\n * @param {FeatureCollection<Point>} grid of points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled\n * @param {boolean} [options.flip=false] returns the matrix upside-down\n * @param {boolean} [options.flags=false] flags, adding a `matrixPosition` array field ([row, column]) to its properties,\n * the grid points with coordinates on the matrix\n * @returns {Array<Array<number>>} matrix of property values\n * @example\n * var extent = [-70.823364, -33.553984, -70.473175, -33.302986];\n * var cellSize = 3;\n * var grid = turf.pointGrid(extent, cellSize);\n * // add a random property to each point between 0 and 60\n * for (var i = 0; i < grid.features.length; i++) {\n * grid.features[i].properties.elevation = (Math.random() * 60);\n * }\n * gridToMatrix(grid);\n * //= [\n * [ 1, 13, 10, 9, 10, 13, 18],\n * [34, 8, 5, 4, 5, 8, 13],\n * [10, 5, 2, 1, 2, 5, 4],\n * [ 0, 4, 56, 19, 1, 4, 9],\n * [10, 5, 2, 1, 2, 5, 10],\n * [57, 8, 5, 4, 5, 0, 57],\n * [ 3, 13, 10, 9, 5, 13, 18],\n * [18, 13, 10, 9, 78, 13, 18]\n * ]\n */\nfunction gridToMatrix(grid, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var zProperty = options.zProperty || \"elevation\";\n var flip = options.flip;\n var flags = options.flags;\n\n // validation\n collectionOf(grid, \"Point\", \"input must contain Points\");\n\n var pointsMatrix = sortPointsByLatLng(grid, flip);\n\n var matrix = [];\n // create property matrix from sorted points\n // looping order matters here\n for (var r = 0; r < pointsMatrix.length; r++) {\n var pointRow = pointsMatrix[r];\n var row = [];\n for (var c = 0; c < pointRow.length; c++) {\n var point = pointRow[c];\n // Check if zProperty exist\n if (point.properties[zProperty]) row.push(point.properties[zProperty]);\n else row.push(0);\n // add flags\n if (flags === true) point.properties.matrixPosition = [r, c];\n }\n matrix.push(row);\n }\n\n return matrix;\n}\n\n/**\n * Sorts points by latitude and longitude, creating a 2-dimensional array of points\n *\n * @private\n * @param {FeatureCollection<Point>} points GeoJSON Point features\n * @param {boolean} [flip=false] returns the matrix upside-down\n * @returns {Array<Array<Point>>} points ordered by latitude and longitude\n */\nfunction sortPointsByLatLng(points, flip) {\n var pointsByLatitude = {};\n\n // divide points by rows with the same latitude\n featureEach(points, function (point) {\n var lat = getCoords(point)[1];\n if (!pointsByLatitude[lat]) pointsByLatitude[lat] = [];\n pointsByLatitude[lat].push(point);\n });\n\n // sort points (with the same latitude) by longitude\n var orderedRowsByLatitude = Object.keys(pointsByLatitude).map(function (lat) {\n var row = pointsByLatitude[lat];\n var rowOrderedByLongitude = row.sort(function (a, b) {\n return getCoords(a)[0] - getCoords(b)[0];\n });\n return rowOrderedByLongitude;\n });\n\n // sort rows (of points with the same latitude) by latitude\n var pointMatrix = orderedRowsByLatitude.sort(function (a, b) {\n if (flip) return getCoords(a[0])[1] - getCoords(b[0])[1];\n else return getCoords(b[0])[1] - getCoords(a[0])[1];\n });\n\n return pointMatrix;\n}\n\nexport { gridToMatrix };\nexport default gridToMatrix;\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-isolines/dist/cjs/index.cjs","../../index.ts","../../lib/grid-to-matrix.js"],"names":["isObject","collectionOf"],"mappings":"AAAA,6EAAI,UAAU,EAAE,MAAM,CAAC,cAAc;AACrC,IAAI,oBAAoB,EAAE,MAAM,CAAC,qBAAqB;AACtD,IAAI,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,cAAc;AAClD,IAAI,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,oBAAoB;AACxD,IAAI,gBAAgB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,GAAG,IAAI,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK;AAC/J,IAAI,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG;AAC/B,EAAE,IAAI,CAAC,IAAI,KAAK,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAChC,IAAI,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AACvC,EAAE,GAAG,CAAC,mBAAmB;AACzB,IAAI,IAAI,CAAC,IAAI,KAAK,GAAG,mBAAmB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AAAA,EACjC,CAAA;AAGA,EAAA,eAAA,CAAgB,OAAA,CAAQ,CAAC,OAAA,EAAA,GAAY;AACnC,IAAA,6BAAA,OAAU,EAAS,MAAM,CAAA;AAAA,EAC3B,CAAC,CAAA;AACD,EAAA,OAAO,eAAA;AACT;AAGA,IAAO,cAAA,EAAQ,QAAA;AD5Ef;AACE;AACA;AACF,6DAAC","file":"/home/runner/work/turf/turf/packages/turf-isolines/dist/cjs/index.cjs","sourcesContent":[null,"import { bbox } from \"@turf/bbox\";\nimport { coordEach } from \"@turf/meta\";\nimport { collectionOf } from \"@turf/invariant\";\nimport { multiLineString, featureCollection, isObject } from \"@turf/helpers\";\nimport { gridToMatrix } from \"./lib/grid-to-matrix.js\";\nimport {\n FeatureCollection,\n Point,\n MultiLineString,\n Feature,\n GeoJsonProperties,\n Position,\n} from \"geojson\";\n\n/**\n * Takes a grid {@link FeatureCollection} of {@link Point} features with z-values and an array of\n * value breaks and generates [isolines](https://en.wikipedia.org/wiki/Contour_line).\n *\n * @function\n * @param {FeatureCollection<Point>} pointGrid input points - must be square or rectangular and already gridded. That is, to have consistent x and y dimensions and be at least 2x2 in size.\n * @param {Array<number>} breaks values of `zProperty` where to draw isolines\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled\n * @param {Object} [options.commonProperties={}] GeoJSON properties passed to ALL isolines\n * @param {Array<Object>} [options.breaksProperties=[]] GeoJSON properties passed, in order, to the correspondent isoline;\n * the breaks array will define the order in which the isolines are created\n * @returns {FeatureCollection<MultiLineString>} a FeatureCollection of {@link MultiLineString} features representing isolines\n * @example\n * // create a grid of points with random z-values in their properties\n * var extent = [0, 30, 20, 50];\n * var cellWidth = 100;\n * var pointGrid = turf.pointGrid(extent, cellWidth, {units: 'miles'});\n *\n * for (var i = 0; i < pointGrid.features.length; i++) {\n * pointGrid.features[i].properties.temperature = Math.random() * 10;\n * }\n * var breaks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n *\n * var lines = turf.isolines(pointGrid, breaks, {zProperty: 'temperature'});\n *\n * //addToMap\n * var addToMap = [lines];\n */\nfunction isolines(\n pointGrid: FeatureCollection<Point>,\n breaks: number[],\n options?: {\n zProperty?: string;\n commonProperties?: GeoJsonProperties;\n breaksProperties?: GeoJsonProperties[];\n }\n) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const zProperty = options.zProperty || \"elevation\";\n const commonProperties = options.commonProperties || {};\n const breaksProperties = options.breaksProperties || [];\n\n // Input validation\n collectionOf(pointGrid, \"Point\", \"Input must contain Points\");\n if (!breaks) throw new Error(\"breaks is required\");\n if (!Array.isArray(breaks)) throw new Error(\"breaks must be an Array\");\n if (!isObject(commonProperties))\n throw new Error(\"commonProperties must be an Object\");\n if (!Array.isArray(breaksProperties))\n throw new Error(\"breaksProperties must be an Array\");\n\n // Isoline methods\n const matrix = gridToMatrix(pointGrid, { zProperty: zProperty, flip: true });\n\n // A quick note on what 'top' and 'bottom' mean in coordinate system of `matrix`:\n // Remember that the southern hemisphere is represented by negative numbers,\n // so a matrix Y of 0 is actually the *bottom*, and a Y of dy - 1 is the *top*.\n\n // check that the resulting matrix has consistent x and y dimensions and\n // has at least a 2x2 size so that we can actually build grid squares\n const dx = matrix[0].length;\n if (matrix.length < 2 || dx < 2) {\n throw new Error(\"Matrix of points must be at least 2x2\");\n }\n for (let i = 1; i < matrix.length; i++) {\n if (matrix[i].length !== dx) {\n throw new Error(\"Matrix of points is not uniform in the x dimension\");\n }\n }\n\n const createdIsoLines = createIsoLines(\n matrix,\n breaks,\n zProperty,\n commonProperties,\n breaksProperties\n );\n const scaledIsolines = rescaleIsolines(createdIsoLines, matrix, pointGrid);\n\n return featureCollection(scaledIsolines);\n}\n\n/**\n * Creates the isolines lines (featuresCollection of MultiLineString features) from the 2D data grid\n *\n * Marchingsquares process the grid data as a 3D representation of a function on a 2D plane, therefore it\n * assumes the points (x-y coordinates) are one 'unit' distance. The result of the isolines function needs to be\n * rescaled, with turfjs, to the original area and proportions on the map\n *\n * @private\n * @param {Array<Array<number>>} matrix Grid Data\n * @param {Array<number>} breaks BreakProps\n * @param {string} zProperty name of the z-values property\n * @param {Object} [commonProperties={}] GeoJSON properties passed to ALL isolines\n * @param {Object} [breaksProperties=[]] GeoJSON properties passed to the correspondent isoline\n * @returns {Array<MultiLineString>} isolines\n */\nfunction createIsoLines(\n matrix: number[][],\n breaks: number[],\n zProperty: string,\n commonProperties: GeoJsonProperties,\n breaksProperties: GeoJsonProperties[]\n): Feature<MultiLineString>[] {\n const results = [];\n for (let i = 0; i < breaks.length; i++) {\n const threshold = +breaks[i]; // make sure it's a number\n\n const properties = { ...commonProperties, ...breaksProperties[i] };\n properties[zProperty] = threshold;\n const isoline = multiLineString(isoContours(matrix, threshold), properties);\n\n results.push(isoline);\n }\n return results;\n}\n\nfunction isoContours(\n matrix: ReadonlyArray<ReadonlyArray<number>>,\n threshold: number\n): Position[][] {\n // see https://en.wikipedia.org/wiki/Marching_squares\n const segments: [Position, Position][] = [];\n\n const dy = matrix.length;\n const dx = matrix[0].length;\n\n for (let y = 0; y < dy - 1; y++) {\n for (let x = 0; x < dx - 1; x++) {\n const tr = matrix[y + 1][x + 1];\n const br = matrix[y][x + 1];\n const bl = matrix[y][x];\n const tl = matrix[y + 1][x];\n\n let grid =\n (tl >= threshold ? 8 : 0) |\n (tr >= threshold ? 4 : 0) |\n (br >= threshold ? 2 : 0) |\n (bl >= threshold ? 1 : 0);\n\n switch (grid) {\n case 0:\n continue;\n case 1:\n segments.push([\n [x + frac(bl, br), y],\n [x, y + frac(bl, tl)],\n ]);\n break;\n case 2:\n segments.push([\n [x + 1, y + frac(br, tr)],\n [x + frac(bl, br), y],\n ]);\n break;\n case 3:\n segments.push([\n [x + 1, y + frac(br, tr)],\n [x, y + frac(bl, tl)],\n ]);\n break;\n case 4:\n segments.push([\n [x + frac(tl, tr), y + 1],\n [x + 1, y + frac(br, tr)],\n ]);\n break;\n case 5: {\n // use the average of the 4 corners to differentiate the saddle case and correctly honor the counter-clockwise winding\n const avg = (tl + tr + br + bl) / 4;\n const above = avg >= threshold;\n\n if (above) {\n segments.push(\n [\n [x + frac(tl, tr), y + 1],\n [x, y + frac(bl, tl)],\n ],\n [\n [x + frac(bl, br), y],\n [x + 1, y + frac(br, tr)],\n ]\n );\n } else {\n segments.push(\n [\n [x + frac(tl, tr), y + 1],\n [x + 1, y + frac(br, tr)],\n ],\n [\n [x + frac(bl, br), y],\n [x, y + frac(bl, tl)],\n ]\n );\n }\n break;\n }\n case 6:\n segments.push([\n [x + frac(tl, tr), y + 1],\n [x + frac(bl, br), y],\n ]);\n break;\n case 7:\n segments.push([\n [x + frac(tl, tr), y + 1],\n [x, y + frac(bl, tl)],\n ]);\n break;\n case 8:\n segments.push([\n [x, y + frac(bl, tl)],\n [x + frac(tl, tr), y + 1],\n ]);\n break;\n case 9:\n segments.push([\n [x + frac(bl, br), y],\n [x + frac(tl, tr), y + 1],\n ]);\n break;\n case 10: {\n const avg = (tl + tr + br + bl) / 4;\n const above = avg >= threshold;\n\n if (above) {\n segments.push(\n [\n [x, y + frac(bl, tl)],\n [x + frac(bl, br), y],\n ],\n [\n [x + 1, y + frac(br, tr)],\n [x + frac(tl, tr), y + 1],\n ]\n );\n } else {\n segments.push(\n [\n [x, y + frac(bl, tl)],\n [x + frac(tl, tr), y + 1],\n ],\n [\n [x + 1, y + frac(br, tr)],\n [x + frac(bl, br), y],\n ]\n );\n }\n break;\n }\n case 11:\n segments.push([\n [x + 1, y + frac(br, tr)],\n [x + frac(tl, tr), y + 1],\n ]);\n break;\n case 12:\n segments.push([\n [x, y + frac(bl, tl)],\n [x + 1, y + frac(br, tr)],\n ]);\n break;\n case 13:\n segments.push([\n [x + frac(bl, br), y],\n [x + 1, y + frac(br, tr)],\n ]);\n break;\n case 14:\n segments.push([\n [x, y + frac(bl, tl)],\n [x + frac(bl, br), y],\n ]);\n break;\n case 15:\n // all above\n continue;\n }\n }\n }\n\n const contours: Position[][] = [];\n\n while (segments.length > 0) {\n const contour: Position[] = [...segments.shift()!];\n contours.push(contour);\n\n let found: boolean;\n do {\n found = false;\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n // add the segment's end point to the end of the contour\n if (\n segment[0][0] === contour[contour.length - 1][0] &&\n segment[0][1] === contour[contour.length - 1][1]\n ) {\n found = true;\n contour.push(segment[1]);\n segments.splice(i, 1);\n break;\n }\n // add the segment's start point to the start of the contour\n if (\n segment[1][0] === contour[0][0] &&\n segment[1][1] === contour[0][1]\n ) {\n found = true;\n contour.unshift(segment[0]);\n segments.splice(i, 1);\n break;\n }\n }\n } while (found);\n }\n\n return contours;\n\n // get the linear interpolation fraction of how far z is between z0 and z1\n // See https://github.com/fschutt/marching-squares/blob/master/src/lib.rs\n function frac(z0: number, z1: number): number {\n if (z0 === z1) {\n return 0.5;\n }\n\n let t = (threshold - z0) / (z1 - z0);\n return t > 1 ? 1 : t < 0 ? 0 : t;\n }\n}\n\n/**\n * Translates and scales isolines\n *\n * @private\n * @param {Array<MultiLineString>} createdIsoLines to be rescaled\n * @param {Array<Array<number>>} matrix Grid Data\n * @param {Object} points Points by Latitude\n * @returns {Array<MultiLineString>} isolines\n */\nfunction rescaleIsolines(\n createdIsoLines: Feature<MultiLineString>[],\n matrix: number[][],\n points: FeatureCollection<Point>\n) {\n // get dimensions (on the map) of the original grid\n const gridBbox = bbox(points); // [ minX, minY, maxX, maxY ]\n const originalWidth = gridBbox[2] - gridBbox[0];\n const originalHeigth = gridBbox[3] - gridBbox[1];\n\n // get origin, which is the first point of the last row on the rectangular data on the map\n const x0 = gridBbox[0];\n const y0 = gridBbox[1];\n\n // get number of cells per side\n const matrixWidth = matrix[0].length - 1;\n const matrixHeight = matrix.length - 1;\n\n // calculate the scaling factor between matrix and rectangular grid on the map\n const scaleX = originalWidth / matrixWidth;\n const scaleY = originalHeigth / matrixHeight;\n\n const resize = (point: number[]) => {\n point[0] = point[0] * scaleX + x0;\n point[1] = point[1] * scaleY + y0;\n };\n\n // resize and shift each point/line of the createdIsoLines\n createdIsoLines.forEach((isoline) => {\n coordEach(isoline, resize);\n });\n return createdIsoLines;\n}\n\nexport { isolines };\nexport default isolines;\n","import { getCoords, collectionOf } from \"@turf/invariant\";\nimport { featureEach } from \"@turf/meta\";\nimport { isObject } from \"@turf/helpers\";\n\n/**\n * Takes a {@link Point} grid and returns a correspondent matrix {Array<Array<number>>}\n * of the 'property' values\n *\n * @name gridToMatrix\n * @param {FeatureCollection<Point>} grid of points\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled\n * @param {boolean} [options.flip=false] returns the matrix upside-down\n * @param {boolean} [options.flags=false] flags, adding a `matrixPosition` array field ([row, column]) to its properties,\n * the grid points with coordinates on the matrix\n * @returns {Array<Array<number>>} matrix of property values\n * @example\n * var extent = [-70.823364, -33.553984, -70.473175, -33.302986];\n * var cellSize = 3;\n * var grid = turf.pointGrid(extent, cellSize);\n * // add a random property to each point between 0 and 60\n * for (var i = 0; i < grid.features.length; i++) {\n * grid.features[i].properties.elevation = (Math.random() * 60);\n * }\n * gridToMatrix(grid);\n * //= [\n * [ 1, 13, 10, 9, 10, 13, 18],\n * [34, 8, 5, 4, 5, 8, 13],\n * [10, 5, 2, 1, 2, 5, 4],\n * [ 0, 4, 56, 19, 1, 4, 9],\n * [10, 5, 2, 1, 2, 5, 10],\n * [57, 8, 5, 4, 5, 0, 57],\n * [ 3, 13, 10, 9, 5, 13, 18],\n * [18, 13, 10, 9, 78, 13, 18]\n * ]\n */\nfunction gridToMatrix(grid, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var zProperty = options.zProperty || \"elevation\";\n var flip = options.flip;\n var flags = options.flags;\n\n // validation\n collectionOf(grid, \"Point\", \"input must contain Points\");\n\n var pointsMatrix = sortPointsByLatLng(grid, flip);\n\n var matrix = [];\n // create property matrix from sorted points\n // looping order matters here\n for (var r = 0; r < pointsMatrix.length; r++) {\n var pointRow = pointsMatrix[r];\n var row = [];\n for (var c = 0; c < pointRow.length; c++) {\n var point = pointRow[c];\n // Check if zProperty exist\n if (point.properties[zProperty]) row.push(point.properties[zProperty]);\n else row.push(0);\n // add flags\n if (flags === true) point.properties.matrixPosition = [r, c];\n }\n matrix.push(row);\n }\n\n return matrix;\n}\n\n/**\n * Sorts points by latitude and longitude, creating a 2-dimensional array of points\n *\n * @private\n * @param {FeatureCollection<Point>} points GeoJSON Point features\n * @param {boolean} [flip=false] returns the matrix upside-down\n * @returns {Array<Array<Point>>} points ordered by latitude and longitude\n */\nfunction sortPointsByLatLng(points, flip) {\n var pointsByLatitude = {};\n\n // divide points by rows with the same latitude\n featureEach(points, function (point) {\n var lat = getCoords(point)[1];\n if (!pointsByLatitude[lat]) pointsByLatitude[lat] = [];\n pointsByLatitude[lat].push(point);\n });\n\n // sort points (with the same latitude) by longitude\n var orderedRowsByLatitude = Object.keys(pointsByLatitude).map(function (lat) {\n var row = pointsByLatitude[lat];\n var rowOrderedByLongitude = row.sort(function (a, b) {\n return getCoords(a)[0] - getCoords(b)[0];\n });\n return rowOrderedByLongitude;\n });\n\n // sort rows (of points with the same latitude) by latitude\n var pointMatrix = orderedRowsByLatitude.sort(function (a, b) {\n if (flip) return getCoords(a[0])[1] - getCoords(b[0])[1];\n else return getCoords(b[0])[1] - getCoords(a[0])[1];\n });\n\n return pointMatrix;\n}\n\nexport { gridToMatrix };\nexport default gridToMatrix;\n"]}
|
|
@@ -5,7 +5,7 @@ import { FeatureCollection, Point, GeoJsonProperties, MultiLineString } from 'ge
|
|
|
5
5
|
* value breaks and generates [isolines](https://en.wikipedia.org/wiki/Contour_line).
|
|
6
6
|
*
|
|
7
7
|
* @function
|
|
8
|
-
* @param {FeatureCollection<Point>} pointGrid input points
|
|
8
|
+
* @param {FeatureCollection<Point>} pointGrid input points - must be square or rectangular and already gridded. That is, to have consistent x and y dimensions and be at least 2x2 in size.
|
|
9
9
|
* @param {Array<number>} breaks values of `zProperty` where to draw isolines
|
|
10
10
|
* @param {Object} [options={}] Optional parameters
|
|
11
11
|
* @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled
|
|
@@ -5,7 +5,7 @@ import { FeatureCollection, Point, GeoJsonProperties, MultiLineString } from 'ge
|
|
|
5
5
|
* value breaks and generates [isolines](https://en.wikipedia.org/wiki/Contour_line).
|
|
6
6
|
*
|
|
7
7
|
* @function
|
|
8
|
-
* @param {FeatureCollection<Point>} pointGrid input points
|
|
8
|
+
* @param {FeatureCollection<Point>} pointGrid input points - must be square or rectangular and already gridded. That is, to have consistent x and y dimensions and be at least 2x2 in size.
|
|
9
9
|
* @param {Array<number>} breaks values of `zProperty` where to draw isolines
|
|
10
10
|
* @param {Object} [options={}] Optional parameters
|
|
11
11
|
* @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled
|
|
@@ -20,7 +20,6 @@ import { bbox } from "@turf/bbox";
|
|
|
20
20
|
import { coordEach } from "@turf/meta";
|
|
21
21
|
import { collectionOf as collectionOf2 } from "@turf/invariant";
|
|
22
22
|
import { multiLineString, featureCollection, isObject as isObject2 } from "@turf/helpers";
|
|
23
|
-
import { isoContours } from "marchingsquares";
|
|
24
23
|
|
|
25
24
|
// lib/grid-to-matrix.js
|
|
26
25
|
import { getCoords, collectionOf } from "@turf/invariant";
|
|
@@ -84,6 +83,15 @@ function isolines(pointGrid, breaks, options) {
|
|
|
84
83
|
if (!Array.isArray(breaksProperties))
|
|
85
84
|
throw new Error("breaksProperties must be an Array");
|
|
86
85
|
const matrix = gridToMatrix(pointGrid, { zProperty, flip: true });
|
|
86
|
+
const dx = matrix[0].length;
|
|
87
|
+
if (matrix.length < 2 || dx < 2) {
|
|
88
|
+
throw new Error("Matrix of points must be at least 2x2");
|
|
89
|
+
}
|
|
90
|
+
for (let i = 1; i < matrix.length; i++) {
|
|
91
|
+
if (matrix[i].length !== dx) {
|
|
92
|
+
throw new Error("Matrix of points is not uniform in the x dimension");
|
|
93
|
+
}
|
|
94
|
+
}
|
|
87
95
|
const createdIsoLines = createIsoLines(
|
|
88
96
|
matrix,
|
|
89
97
|
breaks,
|
|
@@ -100,14 +108,191 @@ function createIsoLines(matrix, breaks, zProperty, commonProperties, breaksPrope
|
|
|
100
108
|
const threshold = +breaks[i];
|
|
101
109
|
const properties = __spreadValues(__spreadValues({}, commonProperties), breaksProperties[i]);
|
|
102
110
|
properties[zProperty] = threshold;
|
|
103
|
-
const isoline = multiLineString(
|
|
104
|
-
isoContours(matrix, threshold, { linearRing: false, noFrame: true }),
|
|
105
|
-
properties
|
|
106
|
-
);
|
|
111
|
+
const isoline = multiLineString(isoContours(matrix, threshold), properties);
|
|
107
112
|
results.push(isoline);
|
|
108
113
|
}
|
|
109
114
|
return results;
|
|
110
115
|
}
|
|
116
|
+
function isoContours(matrix, threshold) {
|
|
117
|
+
const segments = [];
|
|
118
|
+
const dy = matrix.length;
|
|
119
|
+
const dx = matrix[0].length;
|
|
120
|
+
for (let y = 0; y < dy - 1; y++) {
|
|
121
|
+
for (let x = 0; x < dx - 1; x++) {
|
|
122
|
+
const tr = matrix[y + 1][x + 1];
|
|
123
|
+
const br = matrix[y][x + 1];
|
|
124
|
+
const bl = matrix[y][x];
|
|
125
|
+
const tl = matrix[y + 1][x];
|
|
126
|
+
let grid = (tl >= threshold ? 8 : 0) | (tr >= threshold ? 4 : 0) | (br >= threshold ? 2 : 0) | (bl >= threshold ? 1 : 0);
|
|
127
|
+
switch (grid) {
|
|
128
|
+
case 0:
|
|
129
|
+
continue;
|
|
130
|
+
case 1:
|
|
131
|
+
segments.push([
|
|
132
|
+
[x + frac(bl, br), y],
|
|
133
|
+
[x, y + frac(bl, tl)]
|
|
134
|
+
]);
|
|
135
|
+
break;
|
|
136
|
+
case 2:
|
|
137
|
+
segments.push([
|
|
138
|
+
[x + 1, y + frac(br, tr)],
|
|
139
|
+
[x + frac(bl, br), y]
|
|
140
|
+
]);
|
|
141
|
+
break;
|
|
142
|
+
case 3:
|
|
143
|
+
segments.push([
|
|
144
|
+
[x + 1, y + frac(br, tr)],
|
|
145
|
+
[x, y + frac(bl, tl)]
|
|
146
|
+
]);
|
|
147
|
+
break;
|
|
148
|
+
case 4:
|
|
149
|
+
segments.push([
|
|
150
|
+
[x + frac(tl, tr), y + 1],
|
|
151
|
+
[x + 1, y + frac(br, tr)]
|
|
152
|
+
]);
|
|
153
|
+
break;
|
|
154
|
+
case 5: {
|
|
155
|
+
const avg = (tl + tr + br + bl) / 4;
|
|
156
|
+
const above = avg >= threshold;
|
|
157
|
+
if (above) {
|
|
158
|
+
segments.push(
|
|
159
|
+
[
|
|
160
|
+
[x + frac(tl, tr), y + 1],
|
|
161
|
+
[x, y + frac(bl, tl)]
|
|
162
|
+
],
|
|
163
|
+
[
|
|
164
|
+
[x + frac(bl, br), y],
|
|
165
|
+
[x + 1, y + frac(br, tr)]
|
|
166
|
+
]
|
|
167
|
+
);
|
|
168
|
+
} else {
|
|
169
|
+
segments.push(
|
|
170
|
+
[
|
|
171
|
+
[x + frac(tl, tr), y + 1],
|
|
172
|
+
[x + 1, y + frac(br, tr)]
|
|
173
|
+
],
|
|
174
|
+
[
|
|
175
|
+
[x + frac(bl, br), y],
|
|
176
|
+
[x, y + frac(bl, tl)]
|
|
177
|
+
]
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
case 6:
|
|
183
|
+
segments.push([
|
|
184
|
+
[x + frac(tl, tr), y + 1],
|
|
185
|
+
[x + frac(bl, br), y]
|
|
186
|
+
]);
|
|
187
|
+
break;
|
|
188
|
+
case 7:
|
|
189
|
+
segments.push([
|
|
190
|
+
[x + frac(tl, tr), y + 1],
|
|
191
|
+
[x, y + frac(bl, tl)]
|
|
192
|
+
]);
|
|
193
|
+
break;
|
|
194
|
+
case 8:
|
|
195
|
+
segments.push([
|
|
196
|
+
[x, y + frac(bl, tl)],
|
|
197
|
+
[x + frac(tl, tr), y + 1]
|
|
198
|
+
]);
|
|
199
|
+
break;
|
|
200
|
+
case 9:
|
|
201
|
+
segments.push([
|
|
202
|
+
[x + frac(bl, br), y],
|
|
203
|
+
[x + frac(tl, tr), y + 1]
|
|
204
|
+
]);
|
|
205
|
+
break;
|
|
206
|
+
case 10: {
|
|
207
|
+
const avg = (tl + tr + br + bl) / 4;
|
|
208
|
+
const above = avg >= threshold;
|
|
209
|
+
if (above) {
|
|
210
|
+
segments.push(
|
|
211
|
+
[
|
|
212
|
+
[x, y + frac(bl, tl)],
|
|
213
|
+
[x + frac(bl, br), y]
|
|
214
|
+
],
|
|
215
|
+
[
|
|
216
|
+
[x + 1, y + frac(br, tr)],
|
|
217
|
+
[x + frac(tl, tr), y + 1]
|
|
218
|
+
]
|
|
219
|
+
);
|
|
220
|
+
} else {
|
|
221
|
+
segments.push(
|
|
222
|
+
[
|
|
223
|
+
[x, y + frac(bl, tl)],
|
|
224
|
+
[x + frac(tl, tr), y + 1]
|
|
225
|
+
],
|
|
226
|
+
[
|
|
227
|
+
[x + 1, y + frac(br, tr)],
|
|
228
|
+
[x + frac(bl, br), y]
|
|
229
|
+
]
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
case 11:
|
|
235
|
+
segments.push([
|
|
236
|
+
[x + 1, y + frac(br, tr)],
|
|
237
|
+
[x + frac(tl, tr), y + 1]
|
|
238
|
+
]);
|
|
239
|
+
break;
|
|
240
|
+
case 12:
|
|
241
|
+
segments.push([
|
|
242
|
+
[x, y + frac(bl, tl)],
|
|
243
|
+
[x + 1, y + frac(br, tr)]
|
|
244
|
+
]);
|
|
245
|
+
break;
|
|
246
|
+
case 13:
|
|
247
|
+
segments.push([
|
|
248
|
+
[x + frac(bl, br), y],
|
|
249
|
+
[x + 1, y + frac(br, tr)]
|
|
250
|
+
]);
|
|
251
|
+
break;
|
|
252
|
+
case 14:
|
|
253
|
+
segments.push([
|
|
254
|
+
[x, y + frac(bl, tl)],
|
|
255
|
+
[x + frac(bl, br), y]
|
|
256
|
+
]);
|
|
257
|
+
break;
|
|
258
|
+
case 15:
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
const contours = [];
|
|
264
|
+
while (segments.length > 0) {
|
|
265
|
+
const contour = [...segments.shift()];
|
|
266
|
+
contours.push(contour);
|
|
267
|
+
let found;
|
|
268
|
+
do {
|
|
269
|
+
found = false;
|
|
270
|
+
for (let i = 0; i < segments.length; i++) {
|
|
271
|
+
const segment = segments[i];
|
|
272
|
+
if (segment[0][0] === contour[contour.length - 1][0] && segment[0][1] === contour[contour.length - 1][1]) {
|
|
273
|
+
found = true;
|
|
274
|
+
contour.push(segment[1]);
|
|
275
|
+
segments.splice(i, 1);
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
if (segment[1][0] === contour[0][0] && segment[1][1] === contour[0][1]) {
|
|
279
|
+
found = true;
|
|
280
|
+
contour.unshift(segment[0]);
|
|
281
|
+
segments.splice(i, 1);
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
} while (found);
|
|
286
|
+
}
|
|
287
|
+
return contours;
|
|
288
|
+
function frac(z0, z1) {
|
|
289
|
+
if (z0 === z1) {
|
|
290
|
+
return 0.5;
|
|
291
|
+
}
|
|
292
|
+
let t = (threshold - z0) / (z1 - z0);
|
|
293
|
+
return t > 1 ? 1 : t < 0 ? 0 : t;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
111
296
|
function rescaleIsolines(createdIsoLines, matrix, points) {
|
|
112
297
|
const gridBbox = bbox(points);
|
|
113
298
|
const originalWidth = gridBbox[2] - gridBbox[0];
|
|
@@ -127,9 +312,9 @@ function rescaleIsolines(createdIsoLines, matrix, points) {
|
|
|
127
312
|
});
|
|
128
313
|
return createdIsoLines;
|
|
129
314
|
}
|
|
130
|
-
var
|
|
315
|
+
var index_default = isolines;
|
|
131
316
|
export {
|
|
132
|
-
|
|
317
|
+
index_default as default,
|
|
133
318
|
isolines
|
|
134
319
|
};
|
|
135
320
|
//# sourceMappingURL=index.js.map
|