node-red-contrib-tak-registration 0.16.0 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@turf/along/README.md +3 -1
- package/node_modules/@turf/along/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/along/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/along/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/along/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/along/dist/esm/index.js +2 -2
- package/node_modules/@turf/along/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/along/package.json +12 -12
- package/node_modules/@turf/angle/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/angle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/angle/dist/esm/index.js +2 -2
- package/node_modules/@turf/angle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/angle/package.json +16 -16
- package/node_modules/@turf/area/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/area/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/area/dist/esm/index.js +2 -2
- package/node_modules/@turf/area/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/area/package.json +10 -10
- package/node_modules/@turf/bbox/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bbox/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox/dist/esm/index.js +2 -2
- package/node_modules/@turf/bbox/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox/package.json +9 -9
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-clip/dist/esm/index.js +2 -2
- package/node_modules/@turf/bbox-clip/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox-clip/package.json +11 -11
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/bbox-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox-polygon/package.json +8 -8
- package/node_modules/@turf/bearing/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bearing/dist/esm/index.js +2 -2
- package/node_modules/@turf/bearing/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bearing/package.json +11 -11
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bezier-spline/dist/esm/index.js +2 -2
- package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bezier-spline/package.json +10 -10
- package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-clockwise/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-clockwise/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-clockwise/package.json +10 -10
- package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-concave/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-concave/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-concave/package.json +10 -10
- package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-contains/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-contains/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-contains/package.json +13 -13
- package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-crosses/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-crosses/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-crosses/package.json +13 -13
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-disjoint/package.json +12 -12
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-equal/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-equal/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-equal/package.json +11 -11
- package/node_modules/@turf/boolean-intersects/README.md +1 -1
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-intersects/package.json +10 -10
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-overlap/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-overlap/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-overlap/package.json +13 -13
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-parallel/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-parallel/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-parallel/package.json +12 -12
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/package.json +9 -9
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-point-on-line/package.json +11 -11
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-touches/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-touches/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-touches/package.json +12 -12
- package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-valid/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-valid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-valid/package.json +17 -17
- package/node_modules/@turf/boolean-within/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/boolean-within/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-within/dist/esm/index.js +2 -2
- package/node_modules/@turf/boolean-within/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-within/package.json +13 -13
- package/node_modules/@turf/buffer/README.md +3 -3
- package/node_modules/@turf/buffer/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/buffer/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/buffer/dist/esm/index.js +2 -2
- package/node_modules/@turf/buffer/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/buffer/package.json +13 -13
- package/node_modules/@turf/center/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center/dist/esm/index.js +2 -2
- package/node_modules/@turf/center/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center/package.json +13 -13
- package/node_modules/@turf/center-mean/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center-mean/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-mean/dist/esm/index.js +2 -2
- package/node_modules/@turf/center-mean/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-mean/package.json +14 -14
- package/node_modules/@turf/center-median/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center-median/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-median/dist/esm/index.js +2 -2
- package/node_modules/@turf/center-median/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-median/package.json +17 -17
- package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-of-mass/dist/esm/index.js +2 -2
- package/node_modules/@turf/center-of-mass/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-of-mass/package.json +14 -14
- package/node_modules/@turf/centroid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/centroid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/centroid/dist/esm/index.js +2 -2
- package/node_modules/@turf/centroid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/centroid/package.json +11 -11
- package/node_modules/@turf/circle/README.md +13 -13
- package/node_modules/@turf/circle/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/circle/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/circle/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/circle/dist/esm/index.js +2 -2
- package/node_modules/@turf/circle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/circle/package.json +11 -11
- package/node_modules/@turf/clean-coords/dist/cjs/index.cjs +33 -49
- package/node_modules/@turf/clean-coords/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clean-coords/dist/esm/index.js +33 -49
- package/node_modules/@turf/clean-coords/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clean-coords/package.json +15 -12
- package/node_modules/@turf/clone/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/clone/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clone/dist/esm/index.js +2 -2
- package/node_modules/@turf/clone/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clone/package.json +9 -9
- package/node_modules/@turf/clusters/package.json +9 -9
- package/node_modules/@turf/clusters-dbscan/README.md +2 -2
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs +3 -8
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js +4 -9
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters-dbscan/package.json +15 -15
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.js +2 -2
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters-kmeans/package.json +15 -15
- package/node_modules/@turf/collect/dist/cjs/index.cjs +3 -8
- package/node_modules/@turf/collect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/collect/dist/esm/index.js +3 -8
- package/node_modules/@turf/collect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/collect/package.json +11 -11
- package/node_modules/@turf/combine/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/combine/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/combine/dist/esm/index.js +2 -2
- package/node_modules/@turf/combine/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/combine/package.json +9 -9
- package/node_modules/@turf/concave/README.md +2 -2
- package/node_modules/@turf/concave/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/concave/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/concave/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/concave/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/concave/dist/esm/index.js +2 -2
- package/node_modules/@turf/concave/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/concave/package.json +14 -14
- package/node_modules/@turf/convex/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/convex/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/convex/dist/esm/index.js +2 -2
- package/node_modules/@turf/convex/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/convex/package.json +11 -11
- package/node_modules/@turf/destination/README.md +2 -2
- package/node_modules/@turf/destination/dist/cjs/index.cjs +5 -2
- package/node_modules/@turf/destination/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/destination/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/destination/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/destination/dist/esm/index.js +5 -2
- package/node_modules/@turf/destination/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/destination/package.json +14 -11
- package/node_modules/@turf/difference/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/difference/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/difference/dist/esm/index.js +2 -2
- package/node_modules/@turf/difference/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/difference/package.json +11 -11
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/dissolve/dist/esm/index.js +2 -2
- package/node_modules/@turf/dissolve/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/dissolve/package.json +12 -12
- package/node_modules/@turf/distance/README.md +2 -2
- package/node_modules/@turf/distance/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/distance/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/distance/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/distance/dist/esm/index.js +2 -2
- package/node_modules/@turf/distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/distance/package.json +10 -10
- package/node_modules/@turf/distance-weight/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/distance-weight/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/distance-weight/dist/esm/index.js +2 -2
- package/node_modules/@turf/distance-weight/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/distance-weight/package.json +12 -12
- package/node_modules/@turf/ellipse/README.md +2 -2
- package/node_modules/@turf/ellipse/dist/cjs/index.cjs +62 -39
- package/node_modules/@turf/ellipse/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/ellipse/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/ellipse/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/ellipse/dist/esm/index.js +64 -41
- package/node_modules/@turf/ellipse/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/ellipse/package.json +21 -18
- package/node_modules/@turf/envelope/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/envelope/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/envelope/dist/esm/index.js +2 -2
- package/node_modules/@turf/envelope/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/envelope/package.json +10 -10
- package/node_modules/@turf/explode/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/explode/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/explode/dist/esm/index.js +2 -2
- package/node_modules/@turf/explode/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/explode/package.json +10 -10
- package/node_modules/@turf/flatten/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/flatten/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flatten/dist/esm/index.js +2 -2
- package/node_modules/@turf/flatten/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/flatten/package.json +10 -10
- package/node_modules/@turf/flip/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/flip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flip/dist/esm/index.js +2 -2
- package/node_modules/@turf/flip/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/flip/package.json +11 -11
- package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js +2 -2
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/geojson-rbush/package.json +12 -12
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/great-circle/dist/esm/index.js +3 -3
- package/node_modules/@turf/great-circle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/great-circle/package.json +10 -10
- package/node_modules/@turf/helpers/README.md +1 -1
- package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/helpers/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/helpers/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/helpers/package.json +7 -7
- package/node_modules/@turf/hex-grid/README.md +7 -5
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/hex-grid/dist/cjs/index.d.cts +4 -4
- package/node_modules/@turf/hex-grid/dist/esm/index.d.ts +4 -4
- package/node_modules/@turf/hex-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/hex-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/hex-grid/package.json +14 -14
- package/node_modules/@turf/interpolate/README.md +7 -5
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/interpolate/dist/esm/index.js +2 -2
- package/node_modules/@turf/interpolate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/interpolate/package.json +19 -19
- package/node_modules/@turf/intersect/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/intersect/dist/esm/index.js +2 -2
- package/node_modules/@turf/intersect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/intersect/package.json +11 -11
- package/node_modules/@turf/invariant/package.json +8 -8
- package/node_modules/@turf/isobands/README.md +1 -1
- package/node_modules/@turf/isobands/dist/cjs/index.cjs +313 -9
- package/node_modules/@turf/isobands/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/isobands/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/isobands/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/isobands/dist/esm/index.js +313 -9
- package/node_modules/@turf/isobands/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isobands/package.json +22 -22
- package/node_modules/@turf/isolines/README.md +1 -1
- package/node_modules/@turf/isolines/dist/cjs/index.cjs +192 -7
- package/node_modules/@turf/isolines/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/isolines/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/isolines/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/isolines/dist/esm/index.js +192 -7
- package/node_modules/@turf/isolines/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isolines/package.json +19 -19
- package/node_modules/@turf/kinks/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/kinks/dist/esm/index.js +2 -2
- package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/kinks/package.json +10 -10
- package/node_modules/@turf/length/README.md +2 -2
- package/node_modules/@turf/length/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/length/dist/esm/index.js +2 -2
- package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/length/package.json +11 -11
- package/node_modules/@turf/line-arc/README.md +2 -2
- package/node_modules/@turf/line-arc/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/line-arc/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-arc/package.json +12 -12
- package/node_modules/@turf/line-chunk/README.md +2 -2
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-chunk/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-chunk/package.json +12 -12
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-intersect/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-intersect/package.json +10 -10
- package/node_modules/@turf/line-offset/README.md +2 -2
- package/node_modules/@turf/line-offset/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-offset/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-offset/package.json +11 -11
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-overlap/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-overlap/package.json +15 -15
- package/node_modules/@turf/line-segment/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-segment/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-segment/package.json +11 -11
- package/node_modules/@turf/line-slice/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-slice/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-slice/package.json +11 -11
- package/node_modules/@turf/line-slice-along/README.md +2 -2
- package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-slice-along/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-slice-along/package.json +12 -12
- package/node_modules/@turf/line-split/README.md +4 -1
- package/node_modules/@turf/line-split/dist/cjs/index.cjs +2 -7
- package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-split/dist/esm/index.js +2 -7
- package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-split/package.json +16 -17
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-to-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-to-polygon/package.json +12 -12
- package/node_modules/@turf/mask/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/mask/dist/esm/index.js +2 -2
- package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/mask/package.json +10 -10
- package/node_modules/@turf/meta/package.json +7 -7
- package/node_modules/@turf/midpoint/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/midpoint/dist/esm/index.js +2 -2
- package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/midpoint/package.json +11 -11
- package/node_modules/@turf/moran-index/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/moran-index/dist/esm/index.js +2 -2
- package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/moran-index/package.json +11 -11
- package/node_modules/@turf/nearest-neighbor-analysis/README.md +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js +2 -2
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
- package/node_modules/@turf/nearest-point/README.md +2 -2
- package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +6 -7
- package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +6 -7
- package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -2
- package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point/package.json +12 -12
- package/node_modules/@turf/nearest-point-on-line/README.md +6 -2
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +45 -52
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +5 -1
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +5 -1
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +45 -52
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point-on-line/package.json +20 -15
- package/node_modules/@turf/nearest-point-to-line/README.md +2 -2
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js +2 -2
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
- package/node_modules/@turf/planepoint/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/planepoint/dist/esm/index.js +2 -2
- package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/planepoint/package.json +9 -9
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-grid/package.json +14 -14
- package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-on-feature/dist/esm/index.js +2 -2
- package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-on-feature/package.json +15 -15
- package/node_modules/@turf/point-to-line-distance/README.md +5 -4
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +1 -2
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +1 -2
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +2 -2
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-to-line-distance/package.json +18 -18
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +3 -3
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-to-polygon-distance/package.json +14 -14
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/points-within-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/points-within-polygon/package.json +10 -10
- package/node_modules/@turf/polygon-smooth/README.md +1 -1
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/polygon-smooth/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-smooth/package.json +11 -11
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-tangents/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-tangents/package.json +14 -14
- package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-to-line/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-to-line/package.json +10 -10
- package/node_modules/@turf/polygonize/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygonize/dist/esm/index.js +2 -2
- package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygonize/package.json +13 -13
- package/node_modules/@turf/projection/package.json +12 -12
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/quadrat-analysis/dist/esm/index.js +2 -2
- package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/quadrat-analysis/package.json +18 -18
- package/node_modules/@turf/random/package.json +9 -9
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rectangle-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rectangle-grid/package.json +13 -13
- package/node_modules/@turf/rewind/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rewind/dist/esm/index.js +2 -2
- package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rewind/package.json +13 -13
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/esm/index.js +2 -2
- package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-bearing/package.json +11 -11
- package/node_modules/@turf/rhumb-destination/README.md +2 -2
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/rhumb-destination/dist/esm/index.js +2 -2
- package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-destination/package.json +11 -11
- package/node_modules/@turf/rhumb-distance/README.md +8 -9
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +2 -3
- package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +2 -3
- package/node_modules/@turf/rhumb-distance/dist/esm/index.js +2 -2
- package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-distance/package.json +11 -11
- package/node_modules/@turf/sample/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/sample/dist/esm/index.js +2 -2
- package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/sample/package.json +8 -8
- package/node_modules/@turf/sector/README.md +2 -2
- package/node_modules/@turf/sector/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/sector/dist/esm/index.js +2 -2
- package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/sector/package.json +14 -14
- package/node_modules/@turf/shortest-path/README.md +5 -3
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +10 -14
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/shortest-path/dist/esm/index.js +10 -14
- package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/shortest-path/package.json +20 -19
- package/node_modules/@turf/simplify/README.md +13 -13
- package/node_modules/@turf/simplify/dist/cjs/index.cjs +6 -3
- package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/simplify/dist/cjs/index.d.cts +11 -12
- package/node_modules/@turf/simplify/dist/esm/index.d.ts +11 -12
- package/node_modules/@turf/simplify/dist/esm/index.js +6 -3
- package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/simplify/package.json +13 -13
- package/node_modules/@turf/square/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/square/dist/esm/index.js +2 -2
- package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/square/package.json +9 -9
- package/node_modules/@turf/square-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/square-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/square-grid/package.json +12 -12
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +2 -2
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
- package/node_modules/@turf/tag/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tag/dist/esm/index.js +2 -2
- package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tag/package.json +11 -11
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tesselate/dist/esm/index.js +2 -2
- package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tesselate/package.json +8 -8
- package/node_modules/@turf/tin/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tin/dist/esm/index.js +2 -2
- package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tin/package.json +8 -8
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-rotate/dist/esm/index.js +2 -2
- package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-rotate/package.json +17 -17
- package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-scale/dist/esm/index.js +2 -2
- package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-scale/package.json +21 -21
- package/node_modules/@turf/transform-translate/README.md +8 -3
- package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +4 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +4 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.js +2 -2
- package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-translate/package.json +14 -14
- package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/triangle-grid/dist/esm/index.js +2 -2
- package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/triangle-grid/package.json +13 -13
- package/node_modules/@turf/truncate/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/truncate/dist/esm/index.js +2 -2
- package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/truncate/package.json +10 -10
- package/node_modules/@turf/turf/package.json +125 -125
- package/node_modules/@turf/turf/turf.min.js +2 -11
- package/node_modules/@turf/union/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/union/dist/esm/index.js +2 -2
- package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/union/package.json +11 -11
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/unkink-polygon/dist/esm/index.js +2 -2
- package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/unkink-polygon/package.json +13 -13
- package/node_modules/@turf/voronoi/dist/cjs/index.cjs +2 -2
- package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/voronoi/dist/esm/index.js +2 -2
- package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/voronoi/package.json +12 -12
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert/strict.d.ts +105 -2
- package/node_modules/@types/node/assert.d.ts +162 -101
- package/node_modules/@types/node/async_hooks.d.ts +26 -6
- package/node_modules/@types/node/buffer.buffer.d.ts +9 -0
- package/node_modules/@types/node/buffer.d.ts +15 -7
- package/node_modules/@types/node/child_process.d.ts +91 -164
- package/node_modules/@types/node/cluster.d.ts +19 -20
- package/node_modules/@types/node/console.d.ts +19 -18
- package/node_modules/@types/node/crypto.d.ts +1264 -356
- package/node_modules/@types/node/dgram.d.ts +10 -9
- package/node_modules/@types/node/diagnostics_channel.d.ts +18 -15
- package/node_modules/@types/node/dns/promises.d.ts +36 -9
- package/node_modules/@types/node/dns.d.ts +95 -37
- package/node_modules/@types/node/domain.d.ts +1 -1
- package/node_modules/@types/node/events.d.ts +81 -36
- package/node_modules/@types/node/fs/promises.d.ts +104 -59
- package/node_modules/@types/node/fs.d.ts +414 -137
- package/node_modules/@types/node/globals.d.ts +149 -350
- package/node_modules/@types/node/globals.typedarray.d.ts +20 -0
- package/node_modules/@types/node/http.d.ts +191 -37
- package/node_modules/@types/node/http2.d.ts +266 -67
- package/node_modules/@types/node/https.d.ts +97 -63
- package/node_modules/@types/node/index.d.ts +16 -7
- package/node_modules/@types/node/inspector.d.ts +206 -3931
- package/node_modules/@types/node/inspector.generated.d.ts +4233 -0
- package/node_modules/@types/node/module.d.ts +153 -31
- package/node_modules/@types/node/net.d.ts +36 -17
- package/node_modules/@types/node/os.d.ts +22 -10
- package/node_modules/@types/node/package.json +14 -84
- package/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/node/perf_hooks.d.ts +30 -18
- package/node_modules/@types/node/process.d.ts +40 -34
- package/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/node/readline/promises.d.ts +1 -2
- package/node_modules/@types/node/readline.d.ts +13 -13
- package/node_modules/@types/node/repl.d.ts +25 -17
- package/node_modules/@types/node/sea.d.ts +10 -1
- package/node_modules/@types/node/sqlite.d.ts +438 -9
- package/node_modules/@types/node/stream/consumers.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +13 -54
- package/node_modules/@types/node/stream.d.ts +68 -47
- package/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/node_modules/@types/node/test.d.ts +2034 -1975
- package/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/node/timers.d.ts +1 -3
- package/node_modules/@types/node/tls.d.ts +124 -114
- package/node_modules/@types/node/trace_events.d.ts +6 -6
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +17 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +18 -7
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
- package/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/node/url.d.ts +119 -34
- package/node_modules/@types/node/util.d.ts +46 -305
- package/node_modules/@types/node/v8.d.ts +100 -37
- package/node_modules/@types/node/vm.d.ts +299 -110
- package/node_modules/@types/node/wasi.d.ts +23 -2
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +225 -75
- package/node_modules/@types/node/zlib.d.ts +44 -33
- package/node_modules/axios/CHANGELOG.md +410 -288
- package/node_modules/axios/README.md +156 -51
- package/node_modules/axios/dist/axios.js +471 -330
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +407 -265
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +407 -265
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +723 -305
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +16 -5
- package/node_modules/axios/index.d.ts +17 -4
- package/node_modules/axios/lib/adapters/adapters.js +89 -42
- package/node_modules/axios/lib/adapters/fetch.js +221 -162
- package/node_modules/axios/lib/adapters/http.js +242 -42
- package/node_modules/axios/lib/adapters/xhr.js +11 -8
- package/node_modules/axios/lib/core/Axios.js +0 -2
- package/node_modules/axios/lib/core/AxiosError.js +10 -3
- package/node_modules/axios/lib/core/InterceptorManager.js +1 -1
- package/node_modules/axios/lib/core/dispatchRequest.js +1 -1
- package/node_modules/axios/lib/core/mergeConfig.js +4 -4
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +6 -0
- package/node_modules/axios/lib/helpers/bind.js +7 -0
- package/node_modules/axios/lib/helpers/buildURL.js +1 -3
- package/node_modules/axios/lib/helpers/cookies.js +24 -13
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
- package/node_modules/axios/lib/utils.js +5 -3
- package/node_modules/axios/package.json +26 -15
- package/node_modules/bignumber.js/CHANGELOG.md +6 -1
- package/node_modules/bignumber.js/README.md +5 -4
- package/node_modules/bignumber.js/bignumber.js +2 -2
- package/node_modules/bignumber.js/bignumber.mjs +2 -2
- package/node_modules/bignumber.js/package.json +1 -1
- package/node_modules/fast-xml-parser/CHANGELOG.md +9 -0
- package/node_modules/fast-xml-parser/README.md +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.d.cts +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
- package/node_modules/fast-xml-parser/package.json +1 -1
- package/node_modules/fast-xml-parser/src/fxp.d.ts +2 -2
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +1 -1
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +4 -4
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +297 -287
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +24 -12
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +4 -4
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/form-data/CHANGELOG.md +60 -2
- package/node_modules/form-data/README.md +4 -4
- package/node_modules/form-data/lib/form_data.js +2 -2
- package/node_modules/form-data/package.json +4 -4
- package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.min.js +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.json +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +2 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/undici-types/agent.d.ts +12 -11
- package/node_modules/undici-types/api.d.ts +24 -24
- package/node_modules/undici-types/balanced-pool.d.ts +11 -11
- package/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +18 -18
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/node_modules/undici-types/dispatcher.d.ts +119 -99
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +66 -54
- package/node_modules/undici-types/eventsource.d.ts +9 -4
- package/node_modules/undici-types/fetch.d.ts +18 -16
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +56 -47
- package/node_modules/undici-types/interceptors.d.ts +30 -8
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +21 -20
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +14 -12
- package/node_modules/undici-types/proxy-agent.d.ts +5 -4
- package/node_modules/undici-types/readable.d.ts +18 -15
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +142 -29
- package/node_modules/undici-types/websocket.d.ts +38 -2
- package/node_modules/uuid/README.md +8 -19
- package/node_modules/uuid/dist/{esm-browser/uuid-bin.js → uuid-bin.js} +1 -1
- package/node_modules/uuid/dist/{esm-browser/v4.js → v4.js} +7 -4
- package/node_modules/uuid/{dist/esm → dist-node}/md5.js +1 -1
- package/node_modules/uuid/dist-node/native.js +2 -0
- package/node_modules/uuid/{dist/esm → dist-node}/rng.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/sha1.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/uuid-bin.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/v4.js +7 -4
- package/node_modules/uuid/package.json +28 -41
- package/package.json +7 -7
- package/tak-registration.bak +557 -0
- package/tak-registration.js +19 -19
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/marchingsquares/.eslintrc.json +0 -81
- package/node_modules/marchingsquares/Changelog.md +0 -81
- package/node_modules/marchingsquares/LICENSE.md +0 -37
- package/node_modules/marchingsquares/README.md +0 -312
- package/node_modules/marchingsquares/VERSION +0 -1
- package/node_modules/marchingsquares/agpl-3.0.txt +0 -661
- package/node_modules/marchingsquares/dist/marchingsquares-esm.js +0 -3410
- package/node_modules/marchingsquares/dist/marchingsquares-isobands.js +0 -2513
- package/node_modules/marchingsquares/dist/marchingsquares-isobands.min.js +0 -9
- package/node_modules/marchingsquares/dist/marchingsquares-isocontours.js +0 -1209
- package/node_modules/marchingsquares/dist/marchingsquares-isocontours.min.js +0 -9
- package/node_modules/marchingsquares/dist/marchingsquares-isolines.js +0 -1209
- package/node_modules/marchingsquares/dist/marchingsquares-isolines.min.js +0 -9
- package/node_modules/marchingsquares/dist/marchingsquares.js +0 -3424
- package/node_modules/marchingsquares/dist/marchingsquares.min.js +0 -9
- package/node_modules/marchingsquares/examples/contour/index.html +0 -117
- package/node_modules/marchingsquares/examples/editor/draw-lines.js +0 -60
- package/node_modules/marchingsquares/examples/editor/index.html +0 -39
- package/node_modules/marchingsquares/examples/editor/script.js +0 -110
- package/node_modules/marchingsquares/examples/editor/styles.css +0 -37
- package/node_modules/marchingsquares/examples/require/app.js +0 -9
- package/node_modules/marchingsquares/examples/require/index.html +0 -14
- package/node_modules/marchingsquares/examples/require/main.js +0 -98
- package/node_modules/marchingsquares/examples/require/require.js +0 -5
- package/node_modules/marchingsquares/examples/simple/index.html +0 -115
- package/node_modules/marchingsquares/examples/vienna/index.html +0 -229
- package/node_modules/marchingsquares/examples/vienna/vienna_basin.png +0 -0
- package/node_modules/marchingsquares/examples/vienna/vienna_data.js +0 -514
- package/node_modules/marchingsquares/package.json +0 -47
- package/node_modules/marchingsquares/rollup.config.js +0 -122
- package/node_modules/marchingsquares/rollup.config.test.js +0 -14
- package/node_modules/marchingsquares/src/interpolation.js +0 -84
- package/node_modules/marchingsquares/src/isobands.js +0 -1883
- package/node_modules/marchingsquares/src/isolines.js +0 -638
- package/node_modules/marchingsquares/src/main.js +0 -4
- package/node_modules/marchingsquares/src/options.js +0 -80
- package/node_modules/marchingsquares/src/polygons.js +0 -531
- package/node_modules/marchingsquares/src/quadtree.js +0 -228
- package/node_modules/marchingsquares/test/data/in/isoBands-example-case.json +0 -14
- package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-0_3.json +0 -12
- package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-3_5.json +0 -12
- package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-5_7.json +0 -12
- package/node_modules/marchingsquares/test/data/in/isoBands-minimal.json +0 -8
- package/node_modules/marchingsquares/test/data/in/isoBands-simple.json +0 -9
- package/node_modules/marchingsquares/test/data/in/isoLines-example-case.json +0 -13
- package/node_modules/marchingsquares/test/data/in/isoLines-simple.json +0 -8
- package/node_modules/marchingsquares/test/data/out/isoBands-example-case.json +0 -72
- package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-0_3.json +0 -9
- package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-3_5.json +0 -36
- package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-5_7.json +0 -8
- package/node_modules/marchingsquares/test/data/out/isoBands-minimal.json +0 -10
- package/node_modules/marchingsquares/test/data/out/isoBands-simple.json +0 -25
- package/node_modules/marchingsquares/test/data/out/isoLines-example-case.json +0 -481
- package/node_modules/marchingsquares/test/data/out/isoLines-simple.json +0 -8
- package/node_modules/marchingsquares/test/test.js +0 -152
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/uuid/dist/cjs/index.d.ts +0 -15
- package/node_modules/uuid/dist/cjs/index.js +0 -31
- package/node_modules/uuid/dist/cjs/max.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/max.js +0 -3
- package/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/md5.js +0 -13
- package/node_modules/uuid/dist/cjs/native.d.ts +0 -6
- package/node_modules/uuid/dist/cjs/native.js +0 -4
- package/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/nil.js +0 -3
- package/node_modules/uuid/dist/cjs/package.json +0 -1
- package/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/parse.js +0 -11
- package/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/regex.js +0 -3
- package/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/rng.js +0 -13
- package/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/sha1.js +0 -13
- package/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/cjs/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs/types.d.ts +0 -21
- package/node_modules/uuid/dist/cjs/types.js +0 -2
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
- package/node_modules/uuid/dist/cjs/v1.js +0 -87
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v3.js +0 -14
- package/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
- package/node_modules/uuid/dist/cjs/v35.js +0 -41
- package/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v4.js +0 -29
- package/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v5.js +0 -14
- package/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v6.js +0 -19
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v7.js +0 -69
- package/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/validate.js +0 -7
- package/node_modules/uuid/dist/cjs/version.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/version.js +0 -10
- package/node_modules/uuid/dist/cjs-browser/index.js +0 -31
- package/node_modules/uuid/dist/cjs-browser/max.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
- package/node_modules/uuid/dist/cjs-browser/native.js +0 -4
- package/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/package.json +0 -1
- package/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
- package/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs-browser/types.js +0 -2
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v35.js +0 -41
- package/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
- package/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v6.js +0 -19
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
- package/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
- package/node_modules/uuid/dist/cjs-browser/version.js +0 -10
- package/node_modules/uuid/dist/esm/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm/md5.d.ts +0 -4
- package/node_modules/uuid/dist/esm/native.d.ts +0 -6
- package/node_modules/uuid/dist/esm/native.js +0 -2
- package/node_modules/uuid/dist/esm/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm/version.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
- /package/node_modules/uuid/dist/{cjs-browser/index.d.ts → index.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/index.js → index.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/max.d.ts → max.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/max.js → max.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/md5.d.ts → md5.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/md5.js → md5.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/native.d.ts → native.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/native.js → native.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/nil.d.ts → nil.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/nil.js → nil.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/parse.d.ts → parse.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/parse.js → parse.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/regex.d.ts → regex.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/regex.js → regex.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/rng.d.ts → rng.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/rng.js → rng.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/sha1.d.ts → sha1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/sha1.js → sha1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/stringify.d.ts → stringify.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/stringify.js → stringify.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/types.d.ts → types.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/types.js → types.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/uuid-bin.d.ts → uuid-bin.d.ts} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v1.d.ts → v1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v1.js → v1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v1ToV6.d.ts → v1ToV6.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v1ToV6.js → v1ToV6.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v3.d.ts → v3.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v3.js → v3.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v35.d.ts → v35.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v35.js → v35.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v4.d.ts → v4.d.ts} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v5.d.ts → v5.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v5.js → v5.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v6.d.ts → v6.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v6.js → v6.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v6ToV1.d.ts → v6ToV1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v6ToV1.js → v6ToV1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v7.d.ts → v7.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v7.js → v7.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/validate.d.ts → validate.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/validate.js → validate.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/version.d.ts → version.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/version.js → version.js} +0 -0
- /package/node_modules/uuid/{dist/esm → dist-node}/bin/uuid +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/index.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/max.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/nil.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/parse.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/regex.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/stringify.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/types.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1ToV6.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v3.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v35.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v5.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6ToV1.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v7.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/validate.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/version.js +0 -0
|
@@ -1,3424 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* MarchingSquaresJS
|
|
3
|
-
* version 1.3.3
|
|
4
|
-
* https://github.com/RaumZeit/MarchingSquares.js
|
|
5
|
-
*
|
|
6
|
-
* @license GNU Affero General Public License.
|
|
7
|
-
* Copyright (c) 2015-2019 Ronny Lorenz <ronny@tbi.univie.ac.at>
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(function (global, factory) {
|
|
12
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
13
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
14
|
-
(factory((global.MarchingSquaresJS = global.MarchingSquaresJS || {})));
|
|
15
|
-
}(this, (function (exports) { 'use strict';
|
|
16
|
-
|
|
17
|
-
/*
|
|
18
|
-
* Compute the distance of a value 'v' from 'a' through linear interpolation
|
|
19
|
-
* between the values of 'a' and 'b'
|
|
20
|
-
*
|
|
21
|
-
* Note, that we assume that 'a' and 'b' have unit distance (i.e. 1)
|
|
22
|
-
*/
|
|
23
|
-
function linear(a, b, v) {
|
|
24
|
-
if (a < b)
|
|
25
|
-
return (v - a) / (b - a);
|
|
26
|
-
|
|
27
|
-
return (a - v) / (a - b);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/*
|
|
32
|
-
* Compute the distance of a pair of values ('v0', 'v1') from 'a' through linear interpolation
|
|
33
|
-
* between the values of 'a' and 'b'
|
|
34
|
-
*
|
|
35
|
-
* This function assumes that exactly one value, 'v0' or 'v1', is actually located
|
|
36
|
-
* between 'a' and 'b', and choses the right one automagically
|
|
37
|
-
*
|
|
38
|
-
* Note, that we assume that 'a' and 'b' have unit distance (i.e. 1)
|
|
39
|
-
*/
|
|
40
|
-
function linear_ab(a, b, v0, v1) {
|
|
41
|
-
var tmp;
|
|
42
|
-
|
|
43
|
-
if (v0 > v1) {
|
|
44
|
-
tmp = v0;
|
|
45
|
-
v0 = v1;
|
|
46
|
-
v1 = tmp;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (a < b) {
|
|
50
|
-
if (a < v0)
|
|
51
|
-
return (v0 - a) / (b - a);
|
|
52
|
-
else
|
|
53
|
-
return (v1 - a) / (b - a);
|
|
54
|
-
} else if (a > v1) {
|
|
55
|
-
return (a - v1) / (a - b);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return (a - v0) / (a - b);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/*
|
|
63
|
-
* Compute the distance of a pair of values ('v0', 'v1') from 'a' through linear interpolation
|
|
64
|
-
* between the values of 'a' and 'b'
|
|
65
|
-
*
|
|
66
|
-
* This function automagically choses the value 'vN' that is closer to 'a'
|
|
67
|
-
*
|
|
68
|
-
* Note, that we assume that 'a' and 'b' have unit distance (i.e. 1)
|
|
69
|
-
*/
|
|
70
|
-
function linear_a(a, b, minV, maxV) {
|
|
71
|
-
if (a < b)
|
|
72
|
-
return (minV - a) / (b - a);
|
|
73
|
-
|
|
74
|
-
return (a - maxV) / (a - b);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/*
|
|
79
|
-
* Compute the distance of a pair of values ('v0', 'v1') from 'a' through linear interpolation
|
|
80
|
-
* between the values of 'a' and 'b'
|
|
81
|
-
*
|
|
82
|
-
* This function automagically choses the value 'vN' that is closer to 'b'
|
|
83
|
-
*
|
|
84
|
-
* Note, that we assume that 'a' and 'b' have unit distance (i.e. 1)
|
|
85
|
-
*/
|
|
86
|
-
function linear_b(a, b, minV, maxV) {
|
|
87
|
-
if (a < b)
|
|
88
|
-
return (maxV - a) / (b - a);
|
|
89
|
-
|
|
90
|
-
return (a - minV) / (a - b);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function Options() {
|
|
94
|
-
/* Settings common to all implemented algorithms */
|
|
95
|
-
this.successCallback = null;
|
|
96
|
-
this.verbose = false;
|
|
97
|
-
this.polygons = false;
|
|
98
|
-
this.polygons_full = false;
|
|
99
|
-
this.linearRing = true;
|
|
100
|
-
this.noQuadTree = false;
|
|
101
|
-
this.noFrame = false;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
/* Compose settings specific to IsoBands algorithm */
|
|
106
|
-
function isoBandOptions(userSettings) {
|
|
107
|
-
var i,
|
|
108
|
-
key,
|
|
109
|
-
val,
|
|
110
|
-
bandOptions,
|
|
111
|
-
optionKeys;
|
|
112
|
-
|
|
113
|
-
bandOptions = new Options();
|
|
114
|
-
userSettings = userSettings ? userSettings : {};
|
|
115
|
-
optionKeys = Object.keys(bandOptions);
|
|
116
|
-
|
|
117
|
-
for(i = 0; i < optionKeys.length; i++) {
|
|
118
|
-
key = optionKeys[i];
|
|
119
|
-
val = userSettings[key];
|
|
120
|
-
if ((typeof val !== 'undefined') && (val !== null))
|
|
121
|
-
bandOptions[key] = val;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/* restore compatibility */
|
|
125
|
-
bandOptions.polygons_full = !bandOptions.polygons;
|
|
126
|
-
|
|
127
|
-
/* add interpolation functions (not yet user customizable) */
|
|
128
|
-
bandOptions.interpolate = linear_ab;
|
|
129
|
-
bandOptions.interpolate_a = linear_a;
|
|
130
|
-
bandOptions.interpolate_b = linear_b;
|
|
131
|
-
|
|
132
|
-
return bandOptions;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
/* Compose settings specific to IsoLines algorithm */
|
|
137
|
-
function isoLineOptions(userSettings) {
|
|
138
|
-
var i,
|
|
139
|
-
key,
|
|
140
|
-
val,
|
|
141
|
-
lineOptions,
|
|
142
|
-
optionKeys;
|
|
143
|
-
|
|
144
|
-
lineOptions = new Options();
|
|
145
|
-
userSettings = userSettings ? userSettings : {};
|
|
146
|
-
optionKeys = Object.keys(lineOptions);
|
|
147
|
-
|
|
148
|
-
for(i = 0; i < optionKeys.length; i++) {
|
|
149
|
-
key = optionKeys[i];
|
|
150
|
-
val = userSettings[key];
|
|
151
|
-
if ((typeof val !== 'undefined') && (val !== null))
|
|
152
|
-
lineOptions[key] = val;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* restore compatibility */
|
|
156
|
-
lineOptions.polygons_full = !lineOptions.polygons;
|
|
157
|
-
|
|
158
|
-
/* add interpolation functions (not yet user customizable) */
|
|
159
|
-
lineOptions.interpolate = linear;
|
|
160
|
-
|
|
161
|
-
return lineOptions;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function cell2Polygons(cell, x, y, settings) {
|
|
165
|
-
var polygons = [];
|
|
166
|
-
|
|
167
|
-
cell.polygons.forEach(function(p) {
|
|
168
|
-
p.forEach(function(pp) {
|
|
169
|
-
pp[0] += x;
|
|
170
|
-
pp[1] += y;
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
if (settings.linearRing)
|
|
174
|
-
p.push(p[0]);
|
|
175
|
-
|
|
176
|
-
polygons.push(p);
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
return polygons;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function entry_coordinate(x, y, mode, path) {
|
|
183
|
-
if (mode === 0) { /* down */
|
|
184
|
-
x += 1;
|
|
185
|
-
y += path[0][1];
|
|
186
|
-
} else if (mode === 1) { /* left */
|
|
187
|
-
x += path[0][0];
|
|
188
|
-
} else if (mode === 2) { /* up */
|
|
189
|
-
y += path[0][1];
|
|
190
|
-
} else if (mode === 3) { /* right */
|
|
191
|
-
x += path[0][0];
|
|
192
|
-
y += 1;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return [ x, y ];
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
function skip_coordinate(x, y, mode) {
|
|
200
|
-
if (mode === 0) { /* down */
|
|
201
|
-
x++;
|
|
202
|
-
} else if (mode === 1) ; else if (mode === 2) { /* up */
|
|
203
|
-
y++;
|
|
204
|
-
} else if (mode === 3) { /* right */
|
|
205
|
-
x++;
|
|
206
|
-
y++;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
return [ x, y ];
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
function requireFrame(data, lowerBound, upperBound) {
|
|
214
|
-
var frameRequired,
|
|
215
|
-
cols,
|
|
216
|
-
rows,
|
|
217
|
-
i,
|
|
218
|
-
j;
|
|
219
|
-
|
|
220
|
-
frameRequired = true;
|
|
221
|
-
cols = data[0].length;
|
|
222
|
-
rows = data.length;
|
|
223
|
-
|
|
224
|
-
for (j = 0; j < rows; j++) {
|
|
225
|
-
if ((data[j][0] < lowerBound) ||
|
|
226
|
-
(data[j][0] > upperBound) ||
|
|
227
|
-
(data[j][cols - 1] < lowerBound) ||
|
|
228
|
-
(data[j][cols - 1] > upperBound)) {
|
|
229
|
-
frameRequired = false;
|
|
230
|
-
break;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
if ((frameRequired) &&
|
|
235
|
-
((data[rows - 1][0] < lowerBound) ||
|
|
236
|
-
(data[rows - 1][0] > upperBound) ||
|
|
237
|
-
(data[rows - 1][cols - 1] < lowerBound) ||
|
|
238
|
-
(data[rows - 1][cols - 1] > upperBound))) {
|
|
239
|
-
frameRequired = false;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
if (frameRequired)
|
|
243
|
-
for (i = 0; i < cols - 1; i++) {
|
|
244
|
-
if ((data[0][i] < lowerBound) ||
|
|
245
|
-
(data[0][i] > upperBound) ||
|
|
246
|
-
(data[rows - 1][i] < lowerBound) ||
|
|
247
|
-
(data[rows - 1][i] > upperBound)) {
|
|
248
|
-
frameRequired = false;
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
return frameRequired;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
function requireLineFrame(data, threshold) {
|
|
259
|
-
var frameRequired,
|
|
260
|
-
cols,
|
|
261
|
-
rows,
|
|
262
|
-
i,
|
|
263
|
-
j;
|
|
264
|
-
|
|
265
|
-
frameRequired = true;
|
|
266
|
-
cols = data[0].length;
|
|
267
|
-
rows = data.length;
|
|
268
|
-
|
|
269
|
-
for (j = 0; j < rows; j++) {
|
|
270
|
-
if ((data[j][0] >= threshold) ||
|
|
271
|
-
(data[j][cols - 1] >= threshold)) {
|
|
272
|
-
frameRequired = false;
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
if ((frameRequired) &&
|
|
278
|
-
((data[rows - 1][0] >= threshold) ||
|
|
279
|
-
(data[rows - 1][cols - 1] >= threshold))) {
|
|
280
|
-
frameRequired = false;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
if (frameRequired)
|
|
284
|
-
for (i = 0; i < cols - 1; i++) {
|
|
285
|
-
if ((data[0][i] >= threshold) ||
|
|
286
|
-
(data[rows - 1][i] > threshold)) {
|
|
287
|
-
frameRequired = false;
|
|
288
|
-
break;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
return frameRequired;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
function traceBandPaths(data, cellGrid, settings) {
|
|
297
|
-
var nextedge,
|
|
298
|
-
path,
|
|
299
|
-
e,
|
|
300
|
-
ee,
|
|
301
|
-
s,
|
|
302
|
-
ve,
|
|
303
|
-
enter,
|
|
304
|
-
x,
|
|
305
|
-
y,
|
|
306
|
-
finalized,
|
|
307
|
-
origin,
|
|
308
|
-
cc,
|
|
309
|
-
dir,
|
|
310
|
-
count,
|
|
311
|
-
point,
|
|
312
|
-
found_entry;
|
|
313
|
-
|
|
314
|
-
var polygons = [];
|
|
315
|
-
var rows = data.length - 1;
|
|
316
|
-
var cols = data[0].length - 1;
|
|
317
|
-
|
|
318
|
-
/*
|
|
319
|
-
* directions for out-of-grid moves are:
|
|
320
|
-
* 0 ... "down",
|
|
321
|
-
* 1 ... "left",
|
|
322
|
-
* 2 ... "up",
|
|
323
|
-
* 3 ... "right"
|
|
324
|
-
*/
|
|
325
|
-
var valid_entries = [ ['rt', 'rb'], /* down */
|
|
326
|
-
['br', 'bl'], /* left */
|
|
327
|
-
['lb', 'lt'], /* up */
|
|
328
|
-
['tl', 'tr'] /* right */
|
|
329
|
-
];
|
|
330
|
-
var add_x = [ 0, -1, 0, 1 ];
|
|
331
|
-
var add_y = [ -1, 0, 1, 0 ];
|
|
332
|
-
var available_starts = [ 'bl', 'lb', 'lt', 'tl', 'tr', 'rt', 'rb', 'br' ];
|
|
333
|
-
var entry_dir = {
|
|
334
|
-
bl: 1, br: 1,
|
|
335
|
-
lb: 2, lt: 2,
|
|
336
|
-
tl: 3, tr: 3,
|
|
337
|
-
rt: 0, rb: 0
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
if (requireFrame(data, settings.minV, settings.maxV)) {
|
|
341
|
-
if (settings.linearRing)
|
|
342
|
-
polygons.push([ [0, 0], [0, rows], [cols, rows], [cols, 0], [0, 0] ]);
|
|
343
|
-
else
|
|
344
|
-
polygons.push([ [0, 0], [0, rows], [cols, rows], [cols, 0] ]);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/* finally, start tracing back first polygon(s) */
|
|
348
|
-
cellGrid.forEach(function(a, i) {
|
|
349
|
-
a.forEach(function(cell, j) {
|
|
350
|
-
nextedge = null;
|
|
351
|
-
|
|
352
|
-
/* trace paths for all available edges that go through this cell */
|
|
353
|
-
for (e = 0; e < 8; e++) {
|
|
354
|
-
nextedge = available_starts[e];
|
|
355
|
-
|
|
356
|
-
if (typeof cell.edges[nextedge] !== 'object')
|
|
357
|
-
continue;
|
|
358
|
-
|
|
359
|
-
/* start a new, full path */
|
|
360
|
-
path = [];
|
|
361
|
-
ee = cell.edges[nextedge];
|
|
362
|
-
enter = nextedge;
|
|
363
|
-
x = i;
|
|
364
|
-
y = j;
|
|
365
|
-
finalized = false;
|
|
366
|
-
origin = [ i + ee.path[0][0], j + ee.path[0][1] ];
|
|
367
|
-
|
|
368
|
-
/* add start coordinate */
|
|
369
|
-
path.push(origin);
|
|
370
|
-
|
|
371
|
-
/* start traceback */
|
|
372
|
-
while (!finalized) {
|
|
373
|
-
cc = cellGrid[x][y];
|
|
374
|
-
|
|
375
|
-
if (typeof cc.edges[enter] !== 'object')
|
|
376
|
-
break;
|
|
377
|
-
|
|
378
|
-
ee = cc.edges[enter];
|
|
379
|
-
|
|
380
|
-
/* remove edge from cell */
|
|
381
|
-
delete cc.edges[enter];
|
|
382
|
-
|
|
383
|
-
/* add last point of edge to path arra, since we extend a polygon */
|
|
384
|
-
point = ee.path[1];
|
|
385
|
-
point[0] += x;
|
|
386
|
-
point[1] += y;
|
|
387
|
-
path.push(point);
|
|
388
|
-
|
|
389
|
-
enter = ee.move.enter;
|
|
390
|
-
x = x + ee.move.x;
|
|
391
|
-
y = y + ee.move.y;
|
|
392
|
-
|
|
393
|
-
/* handle out-of-grid moves */
|
|
394
|
-
if ((typeof cellGrid[x] === 'undefined') ||
|
|
395
|
-
(typeof cellGrid[x][y] === 'undefined')) {
|
|
396
|
-
dir = 0;
|
|
397
|
-
count = 0;
|
|
398
|
-
|
|
399
|
-
if (x === cols) {
|
|
400
|
-
x--;
|
|
401
|
-
dir = 0; /* move downwards */
|
|
402
|
-
} else if (x < 0) {
|
|
403
|
-
x++;
|
|
404
|
-
dir = 2; /* move upwards */
|
|
405
|
-
} else if (y === rows) {
|
|
406
|
-
y--;
|
|
407
|
-
dir = 3; /* move right */
|
|
408
|
-
} else if (y < 0) {
|
|
409
|
-
y++;
|
|
410
|
-
dir = 1; /* move left */
|
|
411
|
-
} else {
|
|
412
|
-
throw new Error('Left the grid somewhere in the interior!');
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
if ((x === i) && (y === j) && (dir === entry_dir[nextedge])) {
|
|
416
|
-
finalized = true;
|
|
417
|
-
enter = nextedge;
|
|
418
|
-
break;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
while (1) {
|
|
422
|
-
found_entry = false;
|
|
423
|
-
|
|
424
|
-
if (count > 4)
|
|
425
|
-
throw new Error('Direction change counter overflow! This should never happen!');
|
|
426
|
-
|
|
427
|
-
if (!((typeof cellGrid[x] === 'undefined') ||
|
|
428
|
-
(typeof cellGrid[x][y] === 'undefined'))) {
|
|
429
|
-
cc = cellGrid[x][y];
|
|
430
|
-
|
|
431
|
-
/* check for re-entry */
|
|
432
|
-
for (s = 0; s < valid_entries[dir].length; s++) {
|
|
433
|
-
ve = valid_entries[dir][s];
|
|
434
|
-
if (typeof cc.edges[ve] === 'object') {
|
|
435
|
-
/* found re-entry */
|
|
436
|
-
ee = cc.edges[ve];
|
|
437
|
-
path.push(entry_coordinate(x, y, dir, ee.path));
|
|
438
|
-
enter = ve;
|
|
439
|
-
found_entry = true;
|
|
440
|
-
break;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
if (found_entry) {
|
|
446
|
-
break;
|
|
447
|
-
} else {
|
|
448
|
-
path.push(skip_coordinate(x, y, dir));
|
|
449
|
-
|
|
450
|
-
x += add_x[dir];
|
|
451
|
-
y += add_y[dir];
|
|
452
|
-
|
|
453
|
-
/* change direction if we'e moved out of grid again */
|
|
454
|
-
if ((typeof cellGrid[x] === 'undefined') ||
|
|
455
|
-
(typeof cellGrid[x][y] === 'undefined')) {
|
|
456
|
-
if (((dir === 0) && (y < 0)) ||
|
|
457
|
-
((dir === 1) && (x < 0)) ||
|
|
458
|
-
((dir === 2) && (y === rows)) ||
|
|
459
|
-
((dir === 3) && (x === cols))) {
|
|
460
|
-
x -= add_x[dir];
|
|
461
|
-
y -= add_y[dir];
|
|
462
|
-
|
|
463
|
-
dir = (dir + 1) % 4;
|
|
464
|
-
count++;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
if ((x === i) && (y === j) && (dir === entry_dir[nextedge])) {
|
|
469
|
-
/* we are back where we started off, so finalize the polygon */
|
|
470
|
-
finalized = true;
|
|
471
|
-
enter = nextedge;
|
|
472
|
-
break;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
if ((settings.linearRing) &&
|
|
480
|
-
((path[path.length - 1][0] !== origin[0]) ||
|
|
481
|
-
(path[path.length - 1][1] !== origin[1])))
|
|
482
|
-
path.push(origin);
|
|
483
|
-
|
|
484
|
-
polygons.push(path);
|
|
485
|
-
} /* end forall entry sites */
|
|
486
|
-
}); /* end foreach i */
|
|
487
|
-
}); /* end foreach j */
|
|
488
|
-
|
|
489
|
-
return polygons;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
function traceLinePaths(data, cellGrid, settings) {
|
|
494
|
-
var nextedge,
|
|
495
|
-
e,
|
|
496
|
-
ee,
|
|
497
|
-
cc,
|
|
498
|
-
path,
|
|
499
|
-
enter,
|
|
500
|
-
x,
|
|
501
|
-
y,
|
|
502
|
-
finalized,
|
|
503
|
-
origin,
|
|
504
|
-
point,
|
|
505
|
-
dir,
|
|
506
|
-
count,
|
|
507
|
-
found_entry,
|
|
508
|
-
ve;
|
|
509
|
-
|
|
510
|
-
var polygons = [];
|
|
511
|
-
var rows = data.length - 1;
|
|
512
|
-
var cols = data[0].length - 1;
|
|
513
|
-
|
|
514
|
-
/*
|
|
515
|
-
* directions for out-of-grid moves are:
|
|
516
|
-
* 0 ... "down",
|
|
517
|
-
* 1 ... "left",
|
|
518
|
-
* 2 ... "up",
|
|
519
|
-
* 3 ... "right"
|
|
520
|
-
*/
|
|
521
|
-
var valid_entries = [ 'right', /* down */
|
|
522
|
-
'bottom', /* left */
|
|
523
|
-
'left', /* up */
|
|
524
|
-
'top' /* right */
|
|
525
|
-
];
|
|
526
|
-
var add_x = [ 0, -1, 0, 1 ];
|
|
527
|
-
var add_y = [ -1, 0, 1, 0 ];
|
|
528
|
-
var entry_dir = {
|
|
529
|
-
bottom: 1,
|
|
530
|
-
left: 2,
|
|
531
|
-
top: 3,
|
|
532
|
-
right: 0
|
|
533
|
-
};
|
|
534
|
-
|
|
535
|
-
/* first, detect whether we need any outer frame */
|
|
536
|
-
if (!settings.noFrame)
|
|
537
|
-
if (requireLineFrame(data, settings.threshold)) {
|
|
538
|
-
if (settings.linearRing)
|
|
539
|
-
polygons.push([ [0, 0], [0, rows], [cols, rows], [cols, 0], [0, 0] ]);
|
|
540
|
-
else
|
|
541
|
-
polygons.push([ [0, 0], [0, rows], [cols, rows], [cols, 0] ]);
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/* finally, start tracing back first polygon(s) */
|
|
545
|
-
|
|
546
|
-
cellGrid.forEach(function(a, i) {
|
|
547
|
-
a.forEach(function(cell, j) {
|
|
548
|
-
nextedge = null;
|
|
549
|
-
|
|
550
|
-
/* trace paths for all available edges that go through this cell */
|
|
551
|
-
for (e = 0; e < 4; e++) {
|
|
552
|
-
nextedge = valid_entries[e];
|
|
553
|
-
|
|
554
|
-
if (typeof cell.edges[nextedge] !== 'object')
|
|
555
|
-
continue;
|
|
556
|
-
|
|
557
|
-
/* start a new, full path */
|
|
558
|
-
path = [];
|
|
559
|
-
ee = cell.edges[nextedge];
|
|
560
|
-
enter = nextedge;
|
|
561
|
-
x = i;
|
|
562
|
-
y = j;
|
|
563
|
-
finalized = false;
|
|
564
|
-
origin = [ i + ee.path[0][0], j + ee.path[0][1] ];
|
|
565
|
-
|
|
566
|
-
/* add start coordinate */
|
|
567
|
-
path.push(origin);
|
|
568
|
-
|
|
569
|
-
/* start traceback */
|
|
570
|
-
while (!finalized) {
|
|
571
|
-
cc = cellGrid[x][y];
|
|
572
|
-
|
|
573
|
-
if (typeof cc.edges[enter] !== 'object')
|
|
574
|
-
break;
|
|
575
|
-
|
|
576
|
-
ee = cc.edges[enter];
|
|
577
|
-
|
|
578
|
-
/* remove edge from cell */
|
|
579
|
-
delete cc.edges[enter];
|
|
580
|
-
|
|
581
|
-
/* add last point of edge to path arra, since we extend a polygon */
|
|
582
|
-
point = ee.path[1];
|
|
583
|
-
point[0] += x;
|
|
584
|
-
point[1] += y;
|
|
585
|
-
path.push(point);
|
|
586
|
-
|
|
587
|
-
enter = ee.move.enter;
|
|
588
|
-
x = x + ee.move.x;
|
|
589
|
-
y = y + ee.move.y;
|
|
590
|
-
|
|
591
|
-
/* handle out-of-grid moves */
|
|
592
|
-
if ((typeof cellGrid[x] === 'undefined') ||
|
|
593
|
-
(typeof cellGrid[x][y] === 'undefined')) {
|
|
594
|
-
|
|
595
|
-
if (!settings.linearRing)
|
|
596
|
-
break;
|
|
597
|
-
|
|
598
|
-
dir = 0;
|
|
599
|
-
count = 0;
|
|
600
|
-
|
|
601
|
-
if (x === cols) {
|
|
602
|
-
x--;
|
|
603
|
-
dir = 0; /* move downwards */
|
|
604
|
-
} else if (x < 0) {
|
|
605
|
-
x++;
|
|
606
|
-
dir = 2; /* move upwards */
|
|
607
|
-
} else if (y === rows) {
|
|
608
|
-
y--;
|
|
609
|
-
dir = 3; /* move right */
|
|
610
|
-
} else if (y < 0) {
|
|
611
|
-
y++;
|
|
612
|
-
dir = 1; /* move left */
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
if ((x === i) && (y === j) && (dir === entry_dir[nextedge])) {
|
|
616
|
-
finalized = true;
|
|
617
|
-
enter = nextedge;
|
|
618
|
-
break;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
while (1) {
|
|
622
|
-
found_entry = false;
|
|
623
|
-
|
|
624
|
-
if (count > 4)
|
|
625
|
-
throw new Error('Direction change counter overflow! This should never happen!');
|
|
626
|
-
|
|
627
|
-
if (!((typeof cellGrid[x] === 'undefined') ||
|
|
628
|
-
(typeof cellGrid[x][y] === 'undefined'))) {
|
|
629
|
-
cc = cellGrid[x][y];
|
|
630
|
-
|
|
631
|
-
/* check for re-entry */
|
|
632
|
-
ve = valid_entries[dir];
|
|
633
|
-
if (typeof cc.edges[ve] === 'object') {
|
|
634
|
-
/* found re-entry */
|
|
635
|
-
ee = cc.edges[ve];
|
|
636
|
-
path.push(entry_coordinate(x, y, dir, ee.path));
|
|
637
|
-
enter = ve;
|
|
638
|
-
found_entry = true;
|
|
639
|
-
break;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
if (found_entry) {
|
|
644
|
-
break;
|
|
645
|
-
} else {
|
|
646
|
-
path.push(skip_coordinate(x, y, dir));
|
|
647
|
-
|
|
648
|
-
x += add_x[dir];
|
|
649
|
-
y += add_y[dir];
|
|
650
|
-
|
|
651
|
-
/* change direction if we'e moved out of grid again */
|
|
652
|
-
if ((typeof cellGrid[x] === 'undefined') ||
|
|
653
|
-
(typeof cellGrid[x][y] === 'undefined')) {
|
|
654
|
-
if (((dir === 0) && (y < 0)) ||
|
|
655
|
-
((dir === 1) && (x < 0)) ||
|
|
656
|
-
((dir === 2) && (y === rows)) ||
|
|
657
|
-
((dir === 3) && (x === cols))) {
|
|
658
|
-
x -= add_x[dir];
|
|
659
|
-
y -= add_y[dir];
|
|
660
|
-
|
|
661
|
-
dir = (dir + 1) % 4;
|
|
662
|
-
count++;
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
if ((x === i) && (y === j) && (dir === entry_dir[nextedge])) {
|
|
667
|
-
/* we are back where we started off, so finalize the polygon */
|
|
668
|
-
finalized = true;
|
|
669
|
-
enter = nextedge;
|
|
670
|
-
break;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
if ((settings.linearRing) &&
|
|
678
|
-
((path[path.length - 1][0] !== origin[0]) ||
|
|
679
|
-
(path[path.length - 1][1] !== origin[1])))
|
|
680
|
-
path.push(origin);
|
|
681
|
-
|
|
682
|
-
polygons.push(path);
|
|
683
|
-
} /* end forall entry sites */
|
|
684
|
-
}); /* end foreach i */
|
|
685
|
-
}); /* end foreach j */
|
|
686
|
-
|
|
687
|
-
return polygons;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
/* quadTree node constructor */
|
|
691
|
-
function TreeNode(data, x, y, dx, dy) {
|
|
692
|
-
var dx_tmp = dx,
|
|
693
|
-
dy_tmp = dy,
|
|
694
|
-
msb_x = 0,
|
|
695
|
-
msb_y = 0;
|
|
696
|
-
|
|
697
|
-
/* left-bottom corner of current quadrant */
|
|
698
|
-
this.x = x;
|
|
699
|
-
this.y = y;
|
|
700
|
-
|
|
701
|
-
/* minimum value in subtree under this node */
|
|
702
|
-
this.lowerBound = null;
|
|
703
|
-
/* maximum value in subtree under this node */
|
|
704
|
-
this.upperBound = null;
|
|
705
|
-
|
|
706
|
-
/*
|
|
707
|
-
* child nodes are layed out in the following way:
|
|
708
|
-
*
|
|
709
|
-
* (x, y + 1) ---- (x + 1, y + 1)
|
|
710
|
-
* | | |
|
|
711
|
-
* | D | C |
|
|
712
|
-
* | | |
|
|
713
|
-
* |----------------------------|
|
|
714
|
-
* | | |
|
|
715
|
-
* | A | B |
|
|
716
|
-
* | | |
|
|
717
|
-
* (x, y) ------------ (x + 1, y)
|
|
718
|
-
*/
|
|
719
|
-
this.childA = null;
|
|
720
|
-
this.childB = null;
|
|
721
|
-
this.childC = null;
|
|
722
|
-
this.childD = null;
|
|
723
|
-
|
|
724
|
-
if ((dx === 1) && (dy === 1)) {
|
|
725
|
-
/* do not further subdivision */
|
|
726
|
-
this.lowerBound = Math.min(
|
|
727
|
-
data[y][x],
|
|
728
|
-
data[y][x + 1],
|
|
729
|
-
data[y + 1][x + 1],
|
|
730
|
-
data[y + 1][x]
|
|
731
|
-
);
|
|
732
|
-
this.upperBound = Math.max(
|
|
733
|
-
data[y][x],
|
|
734
|
-
data[y][x + 1],
|
|
735
|
-
data[y + 1][x + 1],
|
|
736
|
-
data[y + 1][x]
|
|
737
|
-
);
|
|
738
|
-
} else {
|
|
739
|
-
/* get most significant bit from dx */
|
|
740
|
-
if (dx > 1) {
|
|
741
|
-
while (dx_tmp !== 0) {
|
|
742
|
-
dx_tmp = dx_tmp >> 1;
|
|
743
|
-
msb_x++;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
if (dx === (1 << (msb_x - 1)))
|
|
747
|
-
msb_x--;
|
|
748
|
-
|
|
749
|
-
dx_tmp = 1 << (msb_x - 1);
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
/* get most significant bit from dx */
|
|
753
|
-
if (dy > 1) {
|
|
754
|
-
while (dy_tmp !== 0) {
|
|
755
|
-
dy_tmp = dy_tmp >> 1;
|
|
756
|
-
msb_y++;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
if (dy === (1 << (msb_y - 1)))
|
|
760
|
-
msb_y--;
|
|
761
|
-
|
|
762
|
-
dy_tmp = 1 << (msb_y - 1);
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
this.childA = new TreeNode(data, x, y, dx_tmp, dy_tmp);
|
|
766
|
-
this.lowerBound = this.childA.lowerBound;
|
|
767
|
-
this.upperBound = this.childA.upperBound;
|
|
768
|
-
|
|
769
|
-
if (dx - dx_tmp > 0) {
|
|
770
|
-
this.childB = new TreeNode(data, x + dx_tmp, y, dx - dx_tmp, dy_tmp);
|
|
771
|
-
this.lowerBound = Math.min(this.lowerBound, this.childB.lowerBound);
|
|
772
|
-
this.upperBound = Math.max(this.upperBound, this.childB.upperBound);
|
|
773
|
-
|
|
774
|
-
if (dy - dy_tmp > 0) {
|
|
775
|
-
this.childC = new TreeNode(data, x + dx_tmp, y + dy_tmp, dx - dx_tmp, dy - dy_tmp);
|
|
776
|
-
this.lowerBound = Math.min(this.lowerBound, this.childC.lowerBound);
|
|
777
|
-
this.upperBound = Math.max(this.upperBound, this.childC.upperBound);
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
if (dy - dy_tmp > 0) {
|
|
782
|
-
this.childD = new TreeNode(data, x, y + dy_tmp, dx_tmp, dy - dy_tmp);
|
|
783
|
-
this.lowerBound = Math.min(this.lowerBound, this.childD.lowerBound);
|
|
784
|
-
this.upperBound = Math.max(this.upperBound, this.childD.upperBound);
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
/**
|
|
791
|
-
* Retrieve a list of cells within a particular range of values by
|
|
792
|
-
* recursivly traversing the quad tree to it's leaves.
|
|
793
|
-
*
|
|
794
|
-
* @param subsumed If 'true' include all cells that are completely
|
|
795
|
-
* subsumed within the specified range. Otherwise,
|
|
796
|
-
* return only cells where at least one corner is
|
|
797
|
-
* outside the specified range.
|
|
798
|
-
*
|
|
799
|
-
* @return An array of objects 'o' where each object has exactly two
|
|
800
|
-
* properties: 'o.x' and 'o.y' denoting the left-bottom corner
|
|
801
|
-
* of the corresponding cell.
|
|
802
|
-
*/
|
|
803
|
-
TreeNode.prototype.cellsInBand = function(lowerBound, upperBound, subsumed) {
|
|
804
|
-
var cells = [];
|
|
805
|
-
|
|
806
|
-
subsumed = (typeof subsumed === 'undefined') ? true : subsumed;
|
|
807
|
-
|
|
808
|
-
if ((this.lowerBound > upperBound) || (this.upperBound < lowerBound))
|
|
809
|
-
return cells;
|
|
810
|
-
|
|
811
|
-
if (!(this.childA || this.childB || this.childC || this.childD)) {
|
|
812
|
-
if ((subsumed) ||
|
|
813
|
-
(this.lowerBound <= lowerBound) ||
|
|
814
|
-
(this.upperBound >= upperBound)) {
|
|
815
|
-
cells.push({
|
|
816
|
-
x: this.x,
|
|
817
|
-
y: this.y
|
|
818
|
-
});
|
|
819
|
-
}
|
|
820
|
-
} else {
|
|
821
|
-
if (this.childA)
|
|
822
|
-
cells = cells.concat(this.childA.cellsInBand(lowerBound, upperBound, subsumed));
|
|
823
|
-
|
|
824
|
-
if (this.childB)
|
|
825
|
-
cells = cells.concat(this.childB.cellsInBand(lowerBound, upperBound, subsumed));
|
|
826
|
-
|
|
827
|
-
if (this.childD)
|
|
828
|
-
cells = cells.concat(this.childD.cellsInBand(lowerBound, upperBound, subsumed));
|
|
829
|
-
|
|
830
|
-
if (this.childC)
|
|
831
|
-
cells = cells.concat(this.childC.cellsInBand(lowerBound, upperBound, subsumed));
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
return cells;
|
|
835
|
-
};
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
TreeNode.prototype.cellsBelowThreshold = function(threshold, subsumed) {
|
|
839
|
-
var cells = [];
|
|
840
|
-
|
|
841
|
-
subsumed = (typeof subsumed === 'undefined') ? true : subsumed;
|
|
842
|
-
|
|
843
|
-
if (this.lowerBound > threshold)
|
|
844
|
-
return cells;
|
|
845
|
-
|
|
846
|
-
if (!(this.childA || this.childB || this.childC || this.childD)) {
|
|
847
|
-
if ((subsumed) ||
|
|
848
|
-
(this.upperBound >= threshold)) {
|
|
849
|
-
cells.push({
|
|
850
|
-
x: this.x,
|
|
851
|
-
y: this.y
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
} else {
|
|
855
|
-
if (this.childA)
|
|
856
|
-
cells = cells.concat(this.childA.cellsBelowThreshold(threshold, subsumed));
|
|
857
|
-
|
|
858
|
-
if (this.childB)
|
|
859
|
-
cells = cells.concat(this.childB.cellsBelowThreshold(threshold, subsumed));
|
|
860
|
-
|
|
861
|
-
if (this.childD)
|
|
862
|
-
cells = cells.concat(this.childD.cellsBelowThreshold(threshold, subsumed));
|
|
863
|
-
|
|
864
|
-
if (this.childC)
|
|
865
|
-
cells = cells.concat(this.childC.cellsBelowThreshold(threshold, subsumed));
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
return cells;
|
|
869
|
-
};
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
/*
|
|
873
|
-
* Given a scalar field `data` construct a QuadTree
|
|
874
|
-
* to efficiently lookup those parts of the scalar
|
|
875
|
-
* field where values are within a particular
|
|
876
|
-
* range of [lowerbound, upperbound] limits.
|
|
877
|
-
*/
|
|
878
|
-
function QuadTree(data) {
|
|
879
|
-
var i, cols;
|
|
880
|
-
|
|
881
|
-
/* do some input checking */
|
|
882
|
-
if (!data)
|
|
883
|
-
throw new Error('data is required');
|
|
884
|
-
|
|
885
|
-
if (!Array.isArray(data) ||
|
|
886
|
-
!Array.isArray(data[0]))
|
|
887
|
-
throw new Error('data must be scalar field, i.e. array of arrays');
|
|
888
|
-
|
|
889
|
-
if (data.length < 2)
|
|
890
|
-
throw new Error('data must contain at least two rows');
|
|
891
|
-
|
|
892
|
-
/* check if we've got a regular grid */
|
|
893
|
-
cols = data[0].length;
|
|
894
|
-
|
|
895
|
-
if (cols < 2)
|
|
896
|
-
throw new Error('data must contain at least two columns');
|
|
897
|
-
|
|
898
|
-
for (i = 1; i < data.length; i++) {
|
|
899
|
-
if (!Array.isArray(data[i]))
|
|
900
|
-
throw new Error('Row ' + i + ' is not an array');
|
|
901
|
-
|
|
902
|
-
if (data[i].length != cols)
|
|
903
|
-
throw new Error('unequal row lengths detected, please provide a regular grid');
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
/* create pre-processing object */
|
|
907
|
-
this.data = data;
|
|
908
|
-
/* root node, i.e. entry to the data */
|
|
909
|
-
this.root = new TreeNode(data, 0, 0, data[0].length - 1, data.length - 1);
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
/* eslint no-console: ["error", { allow: ["log"] }] */
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
/*
|
|
916
|
-
* Compute the iso lines for a scalar 2D field given
|
|
917
|
-
* a certain threshold by applying the Marching Squares
|
|
918
|
-
* Algorithm. The function returns a list of path coordinates
|
|
919
|
-
*/
|
|
920
|
-
|
|
921
|
-
function isoLines(input, threshold, options) {
|
|
922
|
-
var settings,
|
|
923
|
-
i,
|
|
924
|
-
j,
|
|
925
|
-
useQuadTree = false,
|
|
926
|
-
multiLine = false,
|
|
927
|
-
tree = null,
|
|
928
|
-
root = null,
|
|
929
|
-
data = null,
|
|
930
|
-
cellGrid = null,
|
|
931
|
-
linePolygons = null,
|
|
932
|
-
ret = [];
|
|
933
|
-
|
|
934
|
-
/* validation */
|
|
935
|
-
if (!input) throw new Error('data is required');
|
|
936
|
-
if (threshold === undefined || threshold === null) throw new Error('threshold is required');
|
|
937
|
-
if ((!!options) && (typeof options !== 'object')) throw new Error('options must be an object');
|
|
938
|
-
|
|
939
|
-
/* process options */
|
|
940
|
-
settings = isoLineOptions(options);
|
|
941
|
-
|
|
942
|
-
/* check for input data */
|
|
943
|
-
if (input instanceof QuadTree) {
|
|
944
|
-
tree = input;
|
|
945
|
-
root = input.root;
|
|
946
|
-
data = input.data;
|
|
947
|
-
if (!settings.noQuadTree)
|
|
948
|
-
useQuadTree = true;
|
|
949
|
-
} else if (Array.isArray(input) && Array.isArray(input[0])) {
|
|
950
|
-
data = input;
|
|
951
|
-
} else {
|
|
952
|
-
throw new Error('input is neither array of arrays nor object retrieved from \'QuadTree()\'');
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
/* check and prepare input threshold(s) */
|
|
956
|
-
if (Array.isArray(threshold)) {
|
|
957
|
-
multiLine = true;
|
|
958
|
-
|
|
959
|
-
/* activate QuadTree optimization if not explicitly forbidden by user settings */
|
|
960
|
-
if (!settings.noQuadTree)
|
|
961
|
-
useQuadTree = true;
|
|
962
|
-
|
|
963
|
-
/* check if all minV are numbers */
|
|
964
|
-
for (i = 0; i < threshold.length; i++)
|
|
965
|
-
if (isNaN(+threshold[i]))
|
|
966
|
-
throw new Error('threshold[' + i + '] is not a number');
|
|
967
|
-
} else {
|
|
968
|
-
if (isNaN(+threshold))
|
|
969
|
-
throw new Error('threshold must be a number or array of numbers');
|
|
970
|
-
|
|
971
|
-
threshold = [ threshold ];
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
/* create QuadTree root node if not already present */
|
|
975
|
-
if ((useQuadTree) && (!root)) {
|
|
976
|
-
tree = new QuadTree(data);
|
|
977
|
-
root = tree.root;
|
|
978
|
-
data = tree.data;
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
if (settings.verbose) {
|
|
982
|
-
if(settings.polygons)
|
|
983
|
-
console.log('MarchingSquaresJS-isoLines: returning single lines (polygons) for each grid cell');
|
|
984
|
-
else
|
|
985
|
-
console.log('MarchingSquaresJS-isoLines: returning line paths (polygons) for entire data grid');
|
|
986
|
-
|
|
987
|
-
if (multiLine)
|
|
988
|
-
console.log('MarchingSquaresJS-isoLines: multiple lines requested, returning array of line paths instead of lines for a single threshold');
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
/* Done with all input validation, now let's start computing stuff */
|
|
992
|
-
|
|
993
|
-
/* loop over all threhsold values */
|
|
994
|
-
threshold.forEach(function(t, i) {
|
|
995
|
-
linePolygons = [];
|
|
996
|
-
|
|
997
|
-
/* store bounds for current computation in settings object */
|
|
998
|
-
settings.threshold = t;
|
|
999
|
-
|
|
1000
|
-
if(settings.verbose)
|
|
1001
|
-
console.log('MarchingSquaresJS-isoLines: computing iso lines for threshold ' + t);
|
|
1002
|
-
|
|
1003
|
-
if (settings.polygons) {
|
|
1004
|
-
/* compose list of polygons for each single cell */
|
|
1005
|
-
if (useQuadTree) {
|
|
1006
|
-
/* go through list of cells retrieved from QuadTree */
|
|
1007
|
-
root
|
|
1008
|
-
.cellsBelowThreshold(settings.threshold, true)
|
|
1009
|
-
.forEach(function(c) {
|
|
1010
|
-
linePolygons = linePolygons.concat(
|
|
1011
|
-
cell2Polygons(
|
|
1012
|
-
prepareCell(data,
|
|
1013
|
-
c.x,
|
|
1014
|
-
c.y,
|
|
1015
|
-
settings),
|
|
1016
|
-
c.x,
|
|
1017
|
-
c.y,
|
|
1018
|
-
settings
|
|
1019
|
-
));
|
|
1020
|
-
});
|
|
1021
|
-
} else {
|
|
1022
|
-
/* go through entire array of input data */
|
|
1023
|
-
for (j = 0; j < data.length - 1; ++j) {
|
|
1024
|
-
for (i = 0; i < data[0].length - 1; ++i)
|
|
1025
|
-
linePolygons = linePolygons.concat(
|
|
1026
|
-
cell2Polygons(
|
|
1027
|
-
prepareCell(data,
|
|
1028
|
-
i,
|
|
1029
|
-
j,
|
|
1030
|
-
settings),
|
|
1031
|
-
i,
|
|
1032
|
-
j,
|
|
1033
|
-
settings
|
|
1034
|
-
));
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
} else {
|
|
1038
|
-
/* sparse grid of input data cells */
|
|
1039
|
-
cellGrid = [];
|
|
1040
|
-
for (i = 0; i < data[0].length - 1; ++i)
|
|
1041
|
-
cellGrid[i] = [];
|
|
1042
|
-
|
|
1043
|
-
/* compose list of polygons for entire input grid */
|
|
1044
|
-
if (useQuadTree) {
|
|
1045
|
-
/* collect the cells */
|
|
1046
|
-
root
|
|
1047
|
-
.cellsBelowThreshold(settings.threshold, false)
|
|
1048
|
-
.forEach(function(c) {
|
|
1049
|
-
cellGrid[c.x][c.y] = prepareCell(data,
|
|
1050
|
-
c.x,
|
|
1051
|
-
c.y,
|
|
1052
|
-
settings);
|
|
1053
|
-
});
|
|
1054
|
-
} else {
|
|
1055
|
-
/* prepare cells */
|
|
1056
|
-
for (i = 0; i < data[0].length - 1; ++i) {
|
|
1057
|
-
for (j = 0; j < data.length - 1; ++j) {
|
|
1058
|
-
cellGrid[i][j] = prepareCell(data,
|
|
1059
|
-
i,
|
|
1060
|
-
j,
|
|
1061
|
-
settings);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
linePolygons = traceLinePaths(data, cellGrid, settings);
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
/* finally, add polygons to output array */
|
|
1070
|
-
if (multiLine)
|
|
1071
|
-
ret.push(linePolygons);
|
|
1072
|
-
else
|
|
1073
|
-
ret = linePolygons;
|
|
1074
|
-
|
|
1075
|
-
if(typeof settings.successCallback === 'function')
|
|
1076
|
-
settings.successCallback(ret, t);
|
|
1077
|
-
|
|
1078
|
-
});
|
|
1079
|
-
|
|
1080
|
-
return ret;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
/*
|
|
1084
|
-
* Thats all for the public interface, below follows the actual
|
|
1085
|
-
* implementation
|
|
1086
|
-
*/
|
|
1087
|
-
|
|
1088
|
-
/*
|
|
1089
|
-
* ################################
|
|
1090
|
-
* Isocontour implementation below
|
|
1091
|
-
* ################################
|
|
1092
|
-
*/
|
|
1093
|
-
|
|
1094
|
-
function prepareCell(grid, x, y, settings) {
|
|
1095
|
-
var left,
|
|
1096
|
-
right,
|
|
1097
|
-
top,
|
|
1098
|
-
bottom,
|
|
1099
|
-
average,
|
|
1100
|
-
cell;
|
|
1101
|
-
|
|
1102
|
-
var cval = 0;
|
|
1103
|
-
var x3 = grid[y + 1][x];
|
|
1104
|
-
var x2 = grid[y + 1][x + 1];
|
|
1105
|
-
var x1 = grid[y][x + 1];
|
|
1106
|
-
var x0 = grid[y][x];
|
|
1107
|
-
var threshold = settings.threshold;
|
|
1108
|
-
|
|
1109
|
-
/*
|
|
1110
|
-
* Note that missing data within the grid will result
|
|
1111
|
-
* in horribly failing to trace full polygon paths
|
|
1112
|
-
*/
|
|
1113
|
-
if(isNaN(x0) || isNaN(x1) || isNaN(x2) || isNaN(x3)) {
|
|
1114
|
-
return;
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
/*
|
|
1118
|
-
* Here we detect the type of the cell
|
|
1119
|
-
*
|
|
1120
|
-
* x3 ---- x2
|
|
1121
|
-
* | |
|
|
1122
|
-
* | |
|
|
1123
|
-
* x0 ---- x1
|
|
1124
|
-
*
|
|
1125
|
-
* with edge points
|
|
1126
|
-
*
|
|
1127
|
-
* x0 = (x,y),
|
|
1128
|
-
* x1 = (x + 1, y),
|
|
1129
|
-
* x2 = (x + 1, y + 1), and
|
|
1130
|
-
* x3 = (x, y + 1)
|
|
1131
|
-
*
|
|
1132
|
-
* and compute the polygon intersections with the edges
|
|
1133
|
-
* of the cell. Each edge value may be (i) smaller, or (ii)
|
|
1134
|
-
* greater or equal to the iso line threshold. We encode
|
|
1135
|
-
* this property using 1 bit of information, where
|
|
1136
|
-
*
|
|
1137
|
-
* 0 ... below,
|
|
1138
|
-
* 1 ... above or equal
|
|
1139
|
-
*
|
|
1140
|
-
* Then we store the cells value as vector
|
|
1141
|
-
*
|
|
1142
|
-
* cval = (x0, x1, x2, x3)
|
|
1143
|
-
*
|
|
1144
|
-
* where x0 is the least significant bit (0th),
|
|
1145
|
-
* x1 the 2nd bit, and so on. This essentially
|
|
1146
|
-
* enables us to work with a single integer number
|
|
1147
|
-
*/
|
|
1148
|
-
|
|
1149
|
-
cval |= ((x3 >= threshold) ? 8 : 0);
|
|
1150
|
-
cval |= ((x2 >= threshold) ? 4 : 0);
|
|
1151
|
-
cval |= ((x1 >= threshold) ? 2 : 0);
|
|
1152
|
-
cval |= ((x0 >= threshold) ? 1 : 0);
|
|
1153
|
-
|
|
1154
|
-
/* make sure cval is a number */
|
|
1155
|
-
cval = +cval;
|
|
1156
|
-
|
|
1157
|
-
/* compose the cell object */
|
|
1158
|
-
cell = {
|
|
1159
|
-
cval: cval,
|
|
1160
|
-
polygons: [],
|
|
1161
|
-
edges: {},
|
|
1162
|
-
x0: x0,
|
|
1163
|
-
x1: x1,
|
|
1164
|
-
x2: x2,
|
|
1165
|
-
x3: x3
|
|
1166
|
-
};
|
|
1167
|
-
|
|
1168
|
-
/*
|
|
1169
|
-
* Compute interpolated intersections of the polygon(s)
|
|
1170
|
-
* with the cell borders and (i) add edges for polygon
|
|
1171
|
-
* trace-back, or (ii) a list of small closed polygons
|
|
1172
|
-
*/
|
|
1173
|
-
switch (cval) {
|
|
1174
|
-
case 0:
|
|
1175
|
-
if (settings.polygons)
|
|
1176
|
-
cell.polygons.push([ [0, 0], [0, 1], [1, 1], [1, 0] ]);
|
|
1177
|
-
|
|
1178
|
-
break;
|
|
1179
|
-
|
|
1180
|
-
case 15:
|
|
1181
|
-
/* cell is outside (above) threshold, no polygons */
|
|
1182
|
-
break;
|
|
1183
|
-
|
|
1184
|
-
case 14: /* 1110 */
|
|
1185
|
-
left = settings.interpolate(x0, x3, threshold);
|
|
1186
|
-
bottom = settings.interpolate(x0, x1, threshold);
|
|
1187
|
-
|
|
1188
|
-
if (settings.polygons_full) {
|
|
1189
|
-
cell.edges.left = {
|
|
1190
|
-
path: [ [0, left], [bottom, 0] ],
|
|
1191
|
-
move: {
|
|
1192
|
-
x: 0,
|
|
1193
|
-
y: -1,
|
|
1194
|
-
enter: 'top'
|
|
1195
|
-
}
|
|
1196
|
-
};
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
if (settings.polygons)
|
|
1200
|
-
cell.polygons.push([ [0, 0], [0, left], [bottom, 0] ]);
|
|
1201
|
-
|
|
1202
|
-
break;
|
|
1203
|
-
|
|
1204
|
-
case 13: /* 1101 */
|
|
1205
|
-
bottom = settings.interpolate(x0, x1, threshold);
|
|
1206
|
-
right = settings.interpolate(x1, x2, threshold);
|
|
1207
|
-
|
|
1208
|
-
if (settings.polygons_full) {
|
|
1209
|
-
cell.edges.bottom = {
|
|
1210
|
-
path: [ [bottom, 0], [1, right] ],
|
|
1211
|
-
move: {
|
|
1212
|
-
x: 1,
|
|
1213
|
-
y: 0,
|
|
1214
|
-
enter: 'left'
|
|
1215
|
-
}
|
|
1216
|
-
};
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
if (settings.polygons)
|
|
1220
|
-
cell.polygons.push([ [bottom, 0], [1, right], [1, 0] ]);
|
|
1221
|
-
|
|
1222
|
-
break;
|
|
1223
|
-
|
|
1224
|
-
case 11: /* 1011 */
|
|
1225
|
-
right = settings.interpolate(x1, x2, threshold);
|
|
1226
|
-
top = settings.interpolate(x3, x2, threshold);
|
|
1227
|
-
|
|
1228
|
-
if (settings.polygons_full) {
|
|
1229
|
-
cell.edges.right = {
|
|
1230
|
-
path: [ [1, right], [top, 1] ],
|
|
1231
|
-
move: {
|
|
1232
|
-
x: 0,
|
|
1233
|
-
y: 1,
|
|
1234
|
-
enter: 'bottom'
|
|
1235
|
-
}
|
|
1236
|
-
};
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
if (settings.polygons)
|
|
1240
|
-
cell.polygons.push([ [1, right], [top, 1], [1, 1] ]);
|
|
1241
|
-
|
|
1242
|
-
break;
|
|
1243
|
-
|
|
1244
|
-
case 7: /* 0111 */
|
|
1245
|
-
left = settings.interpolate(x0, x3, threshold);
|
|
1246
|
-
top = settings.interpolate(x3, x2, threshold);
|
|
1247
|
-
|
|
1248
|
-
if (settings.polygons_full) {
|
|
1249
|
-
cell.edges.top = {
|
|
1250
|
-
path: [ [top, 1], [0, left] ],
|
|
1251
|
-
move: {
|
|
1252
|
-
x: -1,
|
|
1253
|
-
y: 0,
|
|
1254
|
-
enter: 'right'
|
|
1255
|
-
}
|
|
1256
|
-
};
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
if (settings.polygons)
|
|
1260
|
-
cell.polygons.push([ [top, 1], [0, left], [0, 1] ]);
|
|
1261
|
-
|
|
1262
|
-
break;
|
|
1263
|
-
|
|
1264
|
-
case 1: /* 0001 */
|
|
1265
|
-
left = settings.interpolate(x0, x3, threshold);
|
|
1266
|
-
bottom = settings.interpolate(x0, x1, threshold);
|
|
1267
|
-
|
|
1268
|
-
if (settings.polygons_full) {
|
|
1269
|
-
cell.edges.bottom = {
|
|
1270
|
-
path: [ [bottom, 0], [0, left] ],
|
|
1271
|
-
move: {
|
|
1272
|
-
x: -1,
|
|
1273
|
-
y: 0,
|
|
1274
|
-
enter: 'right'
|
|
1275
|
-
}
|
|
1276
|
-
};
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
if (settings.polygons)
|
|
1280
|
-
cell.polygons.push([ [bottom, 0], [0, left], [0, 1], [1, 1], [1, 0] ]);
|
|
1281
|
-
|
|
1282
|
-
break;
|
|
1283
|
-
|
|
1284
|
-
case 2: /* 0010 */
|
|
1285
|
-
bottom = settings.interpolate(x0, x1, threshold);
|
|
1286
|
-
right = settings.interpolate(x1, x2, threshold);
|
|
1287
|
-
|
|
1288
|
-
if (settings.polygons_full) {
|
|
1289
|
-
cell.edges.right = {
|
|
1290
|
-
path: [ [1, right], [bottom, 0] ],
|
|
1291
|
-
move: {
|
|
1292
|
-
x: 0,
|
|
1293
|
-
y: -1,
|
|
1294
|
-
enter: 'top'
|
|
1295
|
-
}
|
|
1296
|
-
};
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
if (settings.polygons)
|
|
1300
|
-
cell.polygons.push([ [0, 0], [0, 1], [1, 1], [1, right], [bottom, 0] ]);
|
|
1301
|
-
|
|
1302
|
-
break;
|
|
1303
|
-
|
|
1304
|
-
case 4: /* 0100 */
|
|
1305
|
-
right = settings.interpolate(x1, x2, threshold);
|
|
1306
|
-
top = settings.interpolate(x3, x2, threshold);
|
|
1307
|
-
|
|
1308
|
-
if (settings.polygons_full) {
|
|
1309
|
-
cell.edges.top = {
|
|
1310
|
-
path: [ [top, 1], [1, right] ],
|
|
1311
|
-
move: {
|
|
1312
|
-
x: 1,
|
|
1313
|
-
y: 0,
|
|
1314
|
-
enter: 'left'
|
|
1315
|
-
}
|
|
1316
|
-
};
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
if (settings.polygons)
|
|
1320
|
-
cell.polygons.push([ [0, 0], [0, 1], [top, 1], [1, right], [1, 0] ]);
|
|
1321
|
-
|
|
1322
|
-
break;
|
|
1323
|
-
|
|
1324
|
-
case 8: /* 1000 */
|
|
1325
|
-
left = settings.interpolate(x0, x3, threshold);
|
|
1326
|
-
top = settings.interpolate(x3, x2, threshold);
|
|
1327
|
-
|
|
1328
|
-
if (settings.polygons_full) {
|
|
1329
|
-
cell.edges.left = {
|
|
1330
|
-
path: [ [0, left], [top, 1] ],
|
|
1331
|
-
move: {
|
|
1332
|
-
x: 0,
|
|
1333
|
-
y: 1,
|
|
1334
|
-
enter: 'bottom'
|
|
1335
|
-
}
|
|
1336
|
-
};
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
if (settings.polygons)
|
|
1340
|
-
cell.polygons.push([ [0, 0], [0, left], [top, 1], [1, 1], [1, 0] ]);
|
|
1341
|
-
|
|
1342
|
-
break;
|
|
1343
|
-
|
|
1344
|
-
case 12: /* 1100 */
|
|
1345
|
-
left = settings.interpolate(x0, x3, threshold);
|
|
1346
|
-
right = settings.interpolate(x1, x2, threshold);
|
|
1347
|
-
|
|
1348
|
-
if (settings.polygons_full) {
|
|
1349
|
-
cell.edges.left = {
|
|
1350
|
-
path: [ [0, left], [1, right] ],
|
|
1351
|
-
move: {
|
|
1352
|
-
x: 1,
|
|
1353
|
-
y: 0,
|
|
1354
|
-
enter: 'left'
|
|
1355
|
-
}
|
|
1356
|
-
};
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
if (settings.polygons)
|
|
1360
|
-
cell.polygons.push([ [0, 0], [0, left], [1, right], [1, 0] ]);
|
|
1361
|
-
|
|
1362
|
-
break;
|
|
1363
|
-
|
|
1364
|
-
case 9: /* 1001 */
|
|
1365
|
-
bottom = settings.interpolate(x0, x1, threshold);
|
|
1366
|
-
top = settings.interpolate(x3, x2, threshold);
|
|
1367
|
-
|
|
1368
|
-
if (settings.polygons_full) {
|
|
1369
|
-
cell.edges.bottom = {
|
|
1370
|
-
path: [ [bottom, 0], [top, 1] ],
|
|
1371
|
-
move: {
|
|
1372
|
-
x: 0,
|
|
1373
|
-
y: 1,
|
|
1374
|
-
enter: 'bottom'
|
|
1375
|
-
}
|
|
1376
|
-
};
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
if (settings.polygons)
|
|
1380
|
-
cell.polygons.push([ [bottom, 0], [top, 1], [1, 1], [1, 0] ]);
|
|
1381
|
-
|
|
1382
|
-
break;
|
|
1383
|
-
|
|
1384
|
-
case 3: /* 0011 */
|
|
1385
|
-
left = settings.interpolate(x0, x3, threshold);
|
|
1386
|
-
right = settings.interpolate(x1, x2, threshold);
|
|
1387
|
-
|
|
1388
|
-
if (settings.polygons_full) {
|
|
1389
|
-
cell.edges.right = {
|
|
1390
|
-
path: [ [1, right], [0, left] ],
|
|
1391
|
-
move: {
|
|
1392
|
-
x: -1,
|
|
1393
|
-
y: 0,
|
|
1394
|
-
enter: 'right'
|
|
1395
|
-
}
|
|
1396
|
-
};
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
if (settings.polygons)
|
|
1400
|
-
cell.polygons.push([ [0, left], [0, 1], [1, 1], [1, right] ]);
|
|
1401
|
-
|
|
1402
|
-
break;
|
|
1403
|
-
|
|
1404
|
-
case 6: /* 0110 */
|
|
1405
|
-
bottom = settings.interpolate(x0, x1, threshold);
|
|
1406
|
-
top = settings.interpolate(x3, x2, threshold);
|
|
1407
|
-
|
|
1408
|
-
if (settings.polygons_full) {
|
|
1409
|
-
cell.edges.top = {
|
|
1410
|
-
path: [ [top, 1], [bottom, 0] ],
|
|
1411
|
-
move: {
|
|
1412
|
-
x: 0,
|
|
1413
|
-
y: -1,
|
|
1414
|
-
enter: 'top'
|
|
1415
|
-
}
|
|
1416
|
-
};
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
if (settings.polygons)
|
|
1420
|
-
cell.polygons.push([ [0, 0], [0, 1], [top, 1], [bottom, 0] ]);
|
|
1421
|
-
|
|
1422
|
-
break;
|
|
1423
|
-
|
|
1424
|
-
case 10: /* 1010 */
|
|
1425
|
-
left = settings.interpolate(x0, x3, threshold);
|
|
1426
|
-
right = settings.interpolate(x1, x2, threshold);
|
|
1427
|
-
bottom = settings.interpolate(x0, x1, threshold);
|
|
1428
|
-
top = settings.interpolate(x3, x2, threshold);
|
|
1429
|
-
average = (x0 + x1 + x2 + x3) / 4;
|
|
1430
|
-
|
|
1431
|
-
if (settings.polygons_full) {
|
|
1432
|
-
if (average < threshold) {
|
|
1433
|
-
cell.edges.left = {
|
|
1434
|
-
path: [ [0, left], [top, 1] ],
|
|
1435
|
-
move: {
|
|
1436
|
-
x: 0,
|
|
1437
|
-
y: 1,
|
|
1438
|
-
enter: 'bottom'
|
|
1439
|
-
}
|
|
1440
|
-
};
|
|
1441
|
-
cell.edges.right = {
|
|
1442
|
-
path: [ [1, right], [bottom, 0] ],
|
|
1443
|
-
move: {
|
|
1444
|
-
x: 0,
|
|
1445
|
-
y: -1,
|
|
1446
|
-
enter: 'top'
|
|
1447
|
-
}
|
|
1448
|
-
};
|
|
1449
|
-
} else {
|
|
1450
|
-
cell.edges.right = {
|
|
1451
|
-
path: [ [1, right], [top, 1] ],
|
|
1452
|
-
move: {
|
|
1453
|
-
x: 0,
|
|
1454
|
-
y: 1,
|
|
1455
|
-
enter: 'bottom'
|
|
1456
|
-
}
|
|
1457
|
-
};
|
|
1458
|
-
cell.edges.left = {
|
|
1459
|
-
path: [ [0, left], [bottom, 0] ],
|
|
1460
|
-
move: {
|
|
1461
|
-
x: 0,
|
|
1462
|
-
y: -1,
|
|
1463
|
-
enter: 'top'
|
|
1464
|
-
}
|
|
1465
|
-
};
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
if (settings.polygons) {
|
|
1470
|
-
if (average < threshold) {
|
|
1471
|
-
cell.polygons.push([ [0, 0], [0, left], [top, 1], [1, 1], [1, right], [bottom, 0] ]);
|
|
1472
|
-
} else {
|
|
1473
|
-
cell.polygons.push([ [0, 0], [0, left], [bottom, 0] ]);
|
|
1474
|
-
cell.polygons.push([ [top, 1], [1, 1], [1, right] ]);
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
break;
|
|
1479
|
-
|
|
1480
|
-
case 5: /* 0101 */
|
|
1481
|
-
left = settings.interpolate(x0, x3, threshold);
|
|
1482
|
-
right = settings.interpolate(x1, x2, threshold);
|
|
1483
|
-
bottom = settings.interpolate(x0, x1, threshold);
|
|
1484
|
-
top = settings.interpolate(x3, x2, threshold);
|
|
1485
|
-
average = (x0 + x1 + x2 + x3) / 4;
|
|
1486
|
-
|
|
1487
|
-
if (settings.polygons_full) {
|
|
1488
|
-
if (average < threshold) {
|
|
1489
|
-
cell.edges.bottom = {
|
|
1490
|
-
path: [ [bottom, 0], [0, left] ],
|
|
1491
|
-
move: {
|
|
1492
|
-
x: -1,
|
|
1493
|
-
y: 0,
|
|
1494
|
-
enter: 'right'
|
|
1495
|
-
}
|
|
1496
|
-
};
|
|
1497
|
-
cell.edges.top = {
|
|
1498
|
-
path: [ [top, 1], [1, right] ],
|
|
1499
|
-
move: {
|
|
1500
|
-
x: 1,
|
|
1501
|
-
y: 0,
|
|
1502
|
-
enter: 'left'
|
|
1503
|
-
}
|
|
1504
|
-
};
|
|
1505
|
-
} else {
|
|
1506
|
-
cell.edges.top = {
|
|
1507
|
-
path: [ [top, 1], [0, left] ],
|
|
1508
|
-
move: {
|
|
1509
|
-
x: -1,
|
|
1510
|
-
y: 0,
|
|
1511
|
-
enter: 'right'
|
|
1512
|
-
}
|
|
1513
|
-
};
|
|
1514
|
-
cell.edges.bottom = {
|
|
1515
|
-
path: [ [bottom, 0], [1, right] ],
|
|
1516
|
-
move: {
|
|
1517
|
-
x: 1,
|
|
1518
|
-
y: 0,
|
|
1519
|
-
enter: 'left'
|
|
1520
|
-
}
|
|
1521
|
-
};
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
if (settings.polygons) {
|
|
1526
|
-
if (average < threshold) {
|
|
1527
|
-
cell.polygons.push([ [0, left], [0, 1], [top, 1], [1, right], [1, 0], [bottom, 0] ]);
|
|
1528
|
-
} else {
|
|
1529
|
-
cell.polygons.push([ [0, left], [0, 1], [top, 1] ]);
|
|
1530
|
-
cell.polygons.push([ [bottom, 0], [1, right], [1, 0] ]);
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
break;
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
return cell;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
/* eslint no-console: ["error", { allow: ["log"] }] */
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
/*
|
|
1544
|
-
* lookup table to generate polygon paths or edges required to
|
|
1545
|
-
* trace the full polygon(s)
|
|
1546
|
-
*/
|
|
1547
|
-
var shapeCoordinates = {
|
|
1548
|
-
square: function(cell, x0, x1, x2, x3, opt) {
|
|
1549
|
-
if (opt.polygons)
|
|
1550
|
-
cell.polygons.push([ [0,0], [0, 1], [1, 1], [1, 0] ]);
|
|
1551
|
-
},
|
|
1552
|
-
|
|
1553
|
-
triangle_bl: function(cell, x0, x1, x2, x3, opt) {
|
|
1554
|
-
var bottomleft = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
1555
|
-
var leftbottom = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
1556
|
-
|
|
1557
|
-
if (opt.polygons_full) {
|
|
1558
|
-
cell.edges.lb = {
|
|
1559
|
-
path: [ [0, leftbottom], [bottomleft, 0] ],
|
|
1560
|
-
move: {
|
|
1561
|
-
x: 0,
|
|
1562
|
-
y: -1,
|
|
1563
|
-
enter: 'tl'
|
|
1564
|
-
}
|
|
1565
|
-
};
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
if (opt.polygons)
|
|
1569
|
-
cell.polygons.push([ [0, leftbottom], [bottomleft, 0], [0, 0] ]);
|
|
1570
|
-
},
|
|
1571
|
-
|
|
1572
|
-
triangle_br: function(cell, x0, x1, x2, x3, opt) {
|
|
1573
|
-
var bottomright = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
1574
|
-
var rightbottom = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
1575
|
-
|
|
1576
|
-
if (opt.polygons_full) {
|
|
1577
|
-
cell.edges.br = {
|
|
1578
|
-
path: [ [bottomright, 0], [1, rightbottom] ],
|
|
1579
|
-
move: {
|
|
1580
|
-
x: 1,
|
|
1581
|
-
y: 0,
|
|
1582
|
-
enter: 'lb'
|
|
1583
|
-
}
|
|
1584
|
-
};
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
if (opt.polygons)
|
|
1588
|
-
cell.polygons.push([ [bottomright, 0], [1, rightbottom], [1, 0] ]);
|
|
1589
|
-
},
|
|
1590
|
-
|
|
1591
|
-
triangle_tr: function(cell, x0, x1, x2, x3, opt) {
|
|
1592
|
-
var righttop = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
1593
|
-
var topright = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
1594
|
-
|
|
1595
|
-
if (opt.polygons_full) {
|
|
1596
|
-
cell.edges.rt = {
|
|
1597
|
-
path: [ [1, righttop], [topright, 1] ],
|
|
1598
|
-
move: {
|
|
1599
|
-
x: 0,
|
|
1600
|
-
y: 1,
|
|
1601
|
-
enter: 'br'
|
|
1602
|
-
}
|
|
1603
|
-
};
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
if (opt.polygons)
|
|
1607
|
-
cell.polygons.push([ [1, righttop], [topright, 1], [1, 1] ]);
|
|
1608
|
-
},
|
|
1609
|
-
|
|
1610
|
-
triangle_tl: function(cell, x0, x1, x2, x3, opt) {
|
|
1611
|
-
var topleft = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
1612
|
-
var lefttop = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
1613
|
-
|
|
1614
|
-
if (opt.polygons_full) {
|
|
1615
|
-
cell.edges.tl = {
|
|
1616
|
-
path: [ [topleft, 1], [0, lefttop] ],
|
|
1617
|
-
move: {
|
|
1618
|
-
x: -1,
|
|
1619
|
-
y: 0,
|
|
1620
|
-
enter: 'rt'
|
|
1621
|
-
}
|
|
1622
|
-
};
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
if (opt.polygons)
|
|
1626
|
-
cell.polygons.push([ [0, lefttop], [0, 1], [topleft, 1] ]);
|
|
1627
|
-
},
|
|
1628
|
-
|
|
1629
|
-
tetragon_t: function(cell, x0, x1, x2, x3, opt) {
|
|
1630
|
-
var righttop = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
1631
|
-
var lefttop = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
1632
|
-
|
|
1633
|
-
if (opt.polygons_full) {
|
|
1634
|
-
cell.edges.rt = {
|
|
1635
|
-
path: [ [1, righttop], [0, lefttop] ],
|
|
1636
|
-
move: {
|
|
1637
|
-
x: -1,
|
|
1638
|
-
y: 0,
|
|
1639
|
-
enter: 'rt'
|
|
1640
|
-
}
|
|
1641
|
-
};
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
if (opt.polygons)
|
|
1645
|
-
cell.polygons.push([ [0, lefttop], [0, 1], [1, 1], [1, righttop] ]);
|
|
1646
|
-
},
|
|
1647
|
-
|
|
1648
|
-
tetragon_r: function(cell, x0, x1, x2, x3, opt) {
|
|
1649
|
-
var bottomright = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
1650
|
-
var topright = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
1651
|
-
if (opt.polygons_full) {
|
|
1652
|
-
cell.edges.br = {
|
|
1653
|
-
path: [ [bottomright, 0], [topright, 1] ],
|
|
1654
|
-
move: {
|
|
1655
|
-
x: 0,
|
|
1656
|
-
y: 1,
|
|
1657
|
-
enter: 'br'
|
|
1658
|
-
}
|
|
1659
|
-
};
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
if (opt.polygons)
|
|
1663
|
-
cell.polygons.push([ [bottomright, 0], [topright, 1], [1, 1], [1, 0] ]);
|
|
1664
|
-
},
|
|
1665
|
-
|
|
1666
|
-
tetragon_b: function(cell, x0, x1, x2, x3, opt) {
|
|
1667
|
-
var leftbottom = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
1668
|
-
var rightbottom = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
1669
|
-
|
|
1670
|
-
if (opt.polygons_full) {
|
|
1671
|
-
cell.edges.lb = {
|
|
1672
|
-
path: [ [0, leftbottom], [1, rightbottom] ],
|
|
1673
|
-
move: {
|
|
1674
|
-
x: 1,
|
|
1675
|
-
y: 0,
|
|
1676
|
-
enter: 'lb'
|
|
1677
|
-
}
|
|
1678
|
-
};
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
if (opt.polygons)
|
|
1682
|
-
cell.polygons.push([ [0, 0], [0, leftbottom], [1, rightbottom], [1, 0] ]);
|
|
1683
|
-
},
|
|
1684
|
-
|
|
1685
|
-
tetragon_l: function(cell, x0, x1, x2, x3, opt) {
|
|
1686
|
-
var topleft = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
1687
|
-
var bottomleft = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
1688
|
-
|
|
1689
|
-
if (opt.polygons_full) {
|
|
1690
|
-
cell.edges.tl = {
|
|
1691
|
-
path: [ [topleft, 1], [bottomleft, 0] ],
|
|
1692
|
-
move: {
|
|
1693
|
-
x: 0,
|
|
1694
|
-
y: -1,
|
|
1695
|
-
enter: 'tl'
|
|
1696
|
-
}
|
|
1697
|
-
};
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
if (opt.polygons)
|
|
1701
|
-
cell.polygons.push([ [0, 0], [0, 1], [topleft, 1], [bottomleft, 0] ]);
|
|
1702
|
-
},
|
|
1703
|
-
|
|
1704
|
-
tetragon_bl: function(cell, x0, x1, x2, x3, opt) {
|
|
1705
|
-
var bottomleft = opt.interpolate_a(x0, x1, opt.minV, opt.maxV);
|
|
1706
|
-
var bottomright = opt.interpolate_b(x0, x1, opt.minV, opt.maxV);
|
|
1707
|
-
var leftbottom = opt.interpolate_a(x0, x3, opt.minV, opt.maxV);
|
|
1708
|
-
var lefttop = opt.interpolate_b(x0, x3, opt.minV, opt.maxV);
|
|
1709
|
-
|
|
1710
|
-
if (opt.polygons_full) {
|
|
1711
|
-
cell.edges.bl = {
|
|
1712
|
-
path: [ [bottomleft, 0], [0, leftbottom] ],
|
|
1713
|
-
move: {
|
|
1714
|
-
x: -1,
|
|
1715
|
-
y: 0,
|
|
1716
|
-
enter: 'rb'
|
|
1717
|
-
}
|
|
1718
|
-
};
|
|
1719
|
-
cell.edges.lt = {
|
|
1720
|
-
path: [ [0, lefttop], [bottomright, 0] ],
|
|
1721
|
-
move: {
|
|
1722
|
-
x: 0,
|
|
1723
|
-
y: -1,
|
|
1724
|
-
enter: 'tr'
|
|
1725
|
-
}
|
|
1726
|
-
};
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
if (opt.polygons)
|
|
1730
|
-
cell.polygons.push([ [bottomleft, 0], [0, leftbottom], [0, lefttop], [bottomright, 0] ]);
|
|
1731
|
-
},
|
|
1732
|
-
|
|
1733
|
-
tetragon_br: function(cell, x0, x1, x2, x3, opt) {
|
|
1734
|
-
var bottomleft = opt.interpolate_a(x0, x1, opt.minV, opt.maxV);
|
|
1735
|
-
var bottomright = opt.interpolate_b(x0, x1, opt.minV, opt.maxV);
|
|
1736
|
-
var rightbottom = opt.interpolate_a(x1, x2, opt.minV, opt.maxV);
|
|
1737
|
-
var righttop = opt.interpolate_b(x1, x2, opt.minV, opt.maxV);
|
|
1738
|
-
|
|
1739
|
-
if (opt.polygons_full) {
|
|
1740
|
-
cell.edges.bl = {
|
|
1741
|
-
path: [ [bottomleft, 0], [1, righttop] ],
|
|
1742
|
-
move: {
|
|
1743
|
-
x: 1,
|
|
1744
|
-
y: 0,
|
|
1745
|
-
enter: 'lt'
|
|
1746
|
-
}
|
|
1747
|
-
};
|
|
1748
|
-
cell.edges.rb = {
|
|
1749
|
-
path: [ [1, rightbottom], [bottomright, 0] ],
|
|
1750
|
-
move: {
|
|
1751
|
-
x: 0,
|
|
1752
|
-
y: -1,
|
|
1753
|
-
enter: 'tr'
|
|
1754
|
-
}
|
|
1755
|
-
};
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
if (opt.polygons)
|
|
1759
|
-
cell.polygons.push([ [bottomleft, 0], [1, righttop], [1, rightbottom], [bottomright, 0] ]);
|
|
1760
|
-
},
|
|
1761
|
-
|
|
1762
|
-
tetragon_tr: function(cell, x0, x1, x2, x3, opt) {
|
|
1763
|
-
var topleft = opt.interpolate_a(x3, x2, opt.minV, opt.maxV);
|
|
1764
|
-
var topright = opt.interpolate_b(x3, x2, opt.minV, opt.maxV);
|
|
1765
|
-
var righttop = opt.interpolate_b(x1, x2, opt.minV, opt.maxV);
|
|
1766
|
-
var rightbottom = opt.interpolate_a(x1, x2, opt.minV, opt.maxV);
|
|
1767
|
-
|
|
1768
|
-
if (opt.polygons_full) {
|
|
1769
|
-
cell.edges.rb = {
|
|
1770
|
-
path: [ [1, rightbottom], [topleft, 1] ],
|
|
1771
|
-
move: {
|
|
1772
|
-
x: 0,
|
|
1773
|
-
y: 1,
|
|
1774
|
-
enter: 'bl'
|
|
1775
|
-
}
|
|
1776
|
-
};
|
|
1777
|
-
cell.edges.tr = {
|
|
1778
|
-
path: [ [topright, 1], [1, righttop] ],
|
|
1779
|
-
move: {
|
|
1780
|
-
x: 1,
|
|
1781
|
-
y: 0,
|
|
1782
|
-
enter: 'lt'
|
|
1783
|
-
}
|
|
1784
|
-
};
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
if (opt.polygons)
|
|
1788
|
-
cell.polygons.push([ [1, rightbottom], [topleft, 1], [topright, 1], [1, righttop] ]);
|
|
1789
|
-
},
|
|
1790
|
-
|
|
1791
|
-
tetragon_tl: function(cell, x0, x1, x2, x3, opt) {
|
|
1792
|
-
var topleft = opt.interpolate_a(x3, x2, opt.minV, opt.maxV);
|
|
1793
|
-
var topright = opt.interpolate_b(x3, x2, opt.minV, opt.maxV);
|
|
1794
|
-
var lefttop = opt.interpolate_b(x0, x3, opt.minV, opt.maxV);
|
|
1795
|
-
var leftbottom = opt.interpolate_a(x0, x3, opt.minV, opt.maxV);
|
|
1796
|
-
|
|
1797
|
-
if (opt.polygons_full) {
|
|
1798
|
-
cell.edges.tr = {
|
|
1799
|
-
path: [ [topright, 1], [0, leftbottom] ],
|
|
1800
|
-
move: {
|
|
1801
|
-
x: -1,
|
|
1802
|
-
y: 0,
|
|
1803
|
-
enter: 'rb'
|
|
1804
|
-
}
|
|
1805
|
-
};
|
|
1806
|
-
cell.edges.lt = {
|
|
1807
|
-
path: [ [0, lefttop], [topleft, 1] ],
|
|
1808
|
-
move: {
|
|
1809
|
-
x: 0,
|
|
1810
|
-
y: 1,
|
|
1811
|
-
enter: 'bl'
|
|
1812
|
-
}
|
|
1813
|
-
};
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
if (opt.polygons)
|
|
1817
|
-
cell.polygons.push([ [topright, 1], [0, leftbottom], [0, lefttop], [topleft, 1] ]);
|
|
1818
|
-
},
|
|
1819
|
-
|
|
1820
|
-
tetragon_lr: function(cell, x0, x1, x2, x3, opt) {
|
|
1821
|
-
var leftbottom = opt.interpolate_a(x0, x3, opt.minV, opt.maxV);
|
|
1822
|
-
var lefttop = opt.interpolate_b(x0, x3, opt.minV, opt.maxV);
|
|
1823
|
-
var righttop = opt.interpolate_b(x1, x2, opt.minV, opt.maxV);
|
|
1824
|
-
var rightbottom = opt.interpolate_a(x1, x2, opt.minV, opt.maxV);
|
|
1825
|
-
|
|
1826
|
-
if (opt.polygons_full) {
|
|
1827
|
-
cell.edges.lt = {
|
|
1828
|
-
path: [ [0, lefttop], [1, righttop] ],
|
|
1829
|
-
move: {
|
|
1830
|
-
x: 1,
|
|
1831
|
-
y: 0,
|
|
1832
|
-
enter: 'lt'
|
|
1833
|
-
}
|
|
1834
|
-
};
|
|
1835
|
-
cell.edges.rb = {
|
|
1836
|
-
path: [ [1, rightbottom], [0, leftbottom] ],
|
|
1837
|
-
move: {
|
|
1838
|
-
x: -1,
|
|
1839
|
-
y: 0,
|
|
1840
|
-
enter: 'rb'
|
|
1841
|
-
}
|
|
1842
|
-
};
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
if (opt.polygons)
|
|
1846
|
-
cell.polygons.push([ [0, leftbottom], [0, lefttop], [1, righttop], [1, rightbottom] ]);
|
|
1847
|
-
},
|
|
1848
|
-
|
|
1849
|
-
tetragon_tb: function(cell, x0, x1, x2, x3, opt) {
|
|
1850
|
-
var topleft = opt.interpolate_a(x3, x2, opt.minV, opt.maxV);
|
|
1851
|
-
var topright = opt.interpolate_b(x3, x2, opt.minV, opt.maxV);
|
|
1852
|
-
var bottomright = opt.interpolate_b(x0, x1, opt.minV, opt.maxV);
|
|
1853
|
-
var bottomleft = opt.interpolate_a(x0, x1, opt.minV, opt.maxV);
|
|
1854
|
-
|
|
1855
|
-
if (opt.polygons_full) {
|
|
1856
|
-
cell.edges.tr = {
|
|
1857
|
-
path: [ [topright, 1], [bottomright, 0] ],
|
|
1858
|
-
move: {
|
|
1859
|
-
x: 0,
|
|
1860
|
-
y: -1,
|
|
1861
|
-
enter: 'tr'
|
|
1862
|
-
}
|
|
1863
|
-
};
|
|
1864
|
-
cell.edges.bl = {
|
|
1865
|
-
path: [ [bottomleft, 0], [topleft, 1] ],
|
|
1866
|
-
move: {
|
|
1867
|
-
x: 0,
|
|
1868
|
-
y: 1,
|
|
1869
|
-
enter: 'bl'
|
|
1870
|
-
}
|
|
1871
|
-
};
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
if (opt.polygons)
|
|
1875
|
-
cell.polygons.push([ [bottomleft, 0], [topleft, 1], [topright, 1], [bottomright, 0] ]);
|
|
1876
|
-
},
|
|
1877
|
-
|
|
1878
|
-
pentagon_tr: function(cell, x0, x1, x2, x3, opt) {
|
|
1879
|
-
var topleft = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
1880
|
-
var rightbottom = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
1881
|
-
|
|
1882
|
-
if (opt.polygons_full) {
|
|
1883
|
-
cell.edges.tl = {
|
|
1884
|
-
path: [[topleft, 1], [1, rightbottom]],
|
|
1885
|
-
move: {
|
|
1886
|
-
x: 1,
|
|
1887
|
-
y: 0,
|
|
1888
|
-
enter: 'lb'
|
|
1889
|
-
}
|
|
1890
|
-
};
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
if (opt.polygons)
|
|
1894
|
-
cell.polygons.push([ [0, 0], [0, 1], [topleft, 1], [1, rightbottom], [1, 0] ]);
|
|
1895
|
-
},
|
|
1896
|
-
|
|
1897
|
-
pentagon_tl: function(cell, x0, x1, x2, x3, opt) {
|
|
1898
|
-
var leftbottom = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
1899
|
-
var topright = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
1900
|
-
|
|
1901
|
-
if (opt.polygons_full) {
|
|
1902
|
-
cell.edges.lb = {
|
|
1903
|
-
path: [ [0, leftbottom], [topright, 1] ],
|
|
1904
|
-
move: {
|
|
1905
|
-
x: 0,
|
|
1906
|
-
y: 1,
|
|
1907
|
-
enter: 'br'
|
|
1908
|
-
}
|
|
1909
|
-
};
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
if (opt.polygons)
|
|
1913
|
-
cell.polygons.push([ [0, 0], [0, leftbottom], [topright, 1], [1, 1], [1, 0] ]);
|
|
1914
|
-
},
|
|
1915
|
-
|
|
1916
|
-
pentagon_br: function(cell, x0, x1, x2, x3, opt) {
|
|
1917
|
-
var bottomleft = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
1918
|
-
var righttop = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
1919
|
-
|
|
1920
|
-
if (opt.polygons_full) {
|
|
1921
|
-
cell.edges.rt = {
|
|
1922
|
-
path: [ [1, righttop], [bottomleft, 0] ],
|
|
1923
|
-
move: {
|
|
1924
|
-
x: 0,
|
|
1925
|
-
y: -1,
|
|
1926
|
-
enter: 'tl'
|
|
1927
|
-
}
|
|
1928
|
-
};
|
|
1929
|
-
}
|
|
1930
|
-
if (opt.polygons)
|
|
1931
|
-
cell.polygons.push([ [0, 0], [0, 1], [1, 1], [1, righttop], [bottomleft, 0] ]);
|
|
1932
|
-
},
|
|
1933
|
-
|
|
1934
|
-
pentagon_bl: function(cell, x0, x1, x2, x3, opt) {
|
|
1935
|
-
var lefttop = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
1936
|
-
var bottomright = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
1937
|
-
|
|
1938
|
-
if (opt.polygons_full) {
|
|
1939
|
-
cell.edges.br = {
|
|
1940
|
-
path: [ [bottomright, 0], [0, lefttop] ],
|
|
1941
|
-
move: {
|
|
1942
|
-
x: -1,
|
|
1943
|
-
y: 0,
|
|
1944
|
-
enter: 'rt'
|
|
1945
|
-
}
|
|
1946
|
-
};
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
if (opt.polygons)
|
|
1950
|
-
cell.polygons.push([ [0, lefttop], [0, 1], [1, 1], [1, 0], [bottomright, 0] ]);
|
|
1951
|
-
},
|
|
1952
|
-
|
|
1953
|
-
pentagon_tr_rl: function(cell, x0, x1, x2, x3, opt) {
|
|
1954
|
-
var lefttop = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
1955
|
-
var topleft = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
1956
|
-
var righttop = opt.interpolate_b(x1, x2, opt.minV, opt.maxV);
|
|
1957
|
-
var rightbottom = opt.interpolate_a(x1, x2, opt.minV, opt.maxV);
|
|
1958
|
-
|
|
1959
|
-
if (opt.polygons_full) {
|
|
1960
|
-
cell.edges.tl = {
|
|
1961
|
-
path: [ [topleft, 1], [1, righttop] ],
|
|
1962
|
-
move: {
|
|
1963
|
-
x: 1,
|
|
1964
|
-
y: 0,
|
|
1965
|
-
enter: 'lt'
|
|
1966
|
-
}
|
|
1967
|
-
};
|
|
1968
|
-
cell.edges.rb = {
|
|
1969
|
-
path: [ [1, rightbottom], [0, lefttop] ],
|
|
1970
|
-
move: {
|
|
1971
|
-
x: -1,
|
|
1972
|
-
y: 0,
|
|
1973
|
-
enter: 'rt'
|
|
1974
|
-
}
|
|
1975
|
-
};
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
if (opt.polygons)
|
|
1979
|
-
cell.polygons.push([ [0, lefttop], [0, 1], [topleft, 1], [1, righttop], [1, rightbottom] ]);
|
|
1980
|
-
},
|
|
1981
|
-
|
|
1982
|
-
pentagon_rb_bt: function(cell, x0, x1, x2, x3, opt) {
|
|
1983
|
-
var righttop = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
1984
|
-
var bottomright = opt.interpolate_b(x0, x1, opt.minV, opt.maxV);
|
|
1985
|
-
var bottomleft = opt.interpolate_a(x0, x1, opt.minV, opt.maxV);
|
|
1986
|
-
var topright = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
1987
|
-
|
|
1988
|
-
if (opt.polygons_full) {
|
|
1989
|
-
cell.edges.rt = {
|
|
1990
|
-
path: [ [1, righttop], [bottomright, 0] ],
|
|
1991
|
-
move: {
|
|
1992
|
-
x: 0,
|
|
1993
|
-
y: -1,
|
|
1994
|
-
enter: 'tr'
|
|
1995
|
-
}
|
|
1996
|
-
};
|
|
1997
|
-
cell.edges.bl = {
|
|
1998
|
-
path: [ [bottomleft, 0], [topright, 1] ],
|
|
1999
|
-
move: {
|
|
2000
|
-
x: 0,
|
|
2001
|
-
y: 1,
|
|
2002
|
-
enter: 'br'
|
|
2003
|
-
}
|
|
2004
|
-
};
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
if (opt.polygons)
|
|
2008
|
-
cell.polygons.push([ [topright, 1], [1, 1], [1, righttop], [bottomright, 0], [bottomleft, 0] ]);
|
|
2009
|
-
},
|
|
2010
|
-
|
|
2011
|
-
pentagon_bl_lr: function(cell, x0, x1, x2, x3, opt) {
|
|
2012
|
-
var bottomright = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2013
|
-
var leftbottom = opt.interpolate_a(x0, x3, opt.minV, opt.maxV);
|
|
2014
|
-
var lefttop = opt.interpolate_b(x0, x3, opt.minV, opt.maxV);
|
|
2015
|
-
var rightbottom = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
2016
|
-
|
|
2017
|
-
if (opt.polygons_full) {
|
|
2018
|
-
cell.edges.br = {
|
|
2019
|
-
path: [ [bottomright, 0], [0, leftbottom] ],
|
|
2020
|
-
move: {
|
|
2021
|
-
x: -1,
|
|
2022
|
-
y: 0,
|
|
2023
|
-
enter: 'rb'
|
|
2024
|
-
}
|
|
2025
|
-
};
|
|
2026
|
-
cell.edges.lt = {
|
|
2027
|
-
path: [ [0, lefttop], [1, rightbottom] ],
|
|
2028
|
-
move: {
|
|
2029
|
-
x: 1,
|
|
2030
|
-
y: 0,
|
|
2031
|
-
enter: 'lb'
|
|
2032
|
-
}
|
|
2033
|
-
};
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
if (opt.polygons)
|
|
2037
|
-
cell.polygons.push([ [bottomright, 0], [0, leftbottom], [0, lefttop], [1, rightbottom], [1, 0] ]);
|
|
2038
|
-
},
|
|
2039
|
-
|
|
2040
|
-
pentagon_lt_tb: function(cell, x0, x1, x2, x3, opt) {
|
|
2041
|
-
var leftbottom = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
2042
|
-
var topleft = opt.interpolate_a(x3, x2, opt.minV, opt.maxV);
|
|
2043
|
-
var topright = opt.interpolate_b(x3, x2, opt.minV, opt.maxV);
|
|
2044
|
-
var bottomleft = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2045
|
-
|
|
2046
|
-
if (opt.polygons_full) {
|
|
2047
|
-
cell.edges.lb = {
|
|
2048
|
-
path: [ [0, leftbottom], [topleft, 1] ],
|
|
2049
|
-
move: {
|
|
2050
|
-
x: 0,
|
|
2051
|
-
y: 1,
|
|
2052
|
-
enter: 'bl'
|
|
2053
|
-
}
|
|
2054
|
-
};
|
|
2055
|
-
cell.edges.tr = {
|
|
2056
|
-
path: [ [topright, 1], [bottomleft, 0] ],
|
|
2057
|
-
move: {
|
|
2058
|
-
x: 0,
|
|
2059
|
-
y: -1,
|
|
2060
|
-
enter: 'tl'
|
|
2061
|
-
}
|
|
2062
|
-
};
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
if (opt.polygons)
|
|
2066
|
-
cell.polygons.push([ [0, 0], [0, leftbottom], [topleft, 1], [topright, 1], [bottomleft, 0] ]);
|
|
2067
|
-
},
|
|
2068
|
-
|
|
2069
|
-
pentagon_bl_tb: function(cell, x0, x1, x2, x3, opt) {
|
|
2070
|
-
var lefttop = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
2071
|
-
var topleft = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
2072
|
-
var bottomright = opt.interpolate_b(x0, x1, opt.minV, opt.maxV);
|
|
2073
|
-
var bottomleft = opt.interpolate_a(x0, x1, opt.minV, opt.maxV);
|
|
2074
|
-
|
|
2075
|
-
if (opt.polygons_full) {
|
|
2076
|
-
cell.edges.bl = {
|
|
2077
|
-
path: [ [bottomleft, 0], [0, lefttop] ],
|
|
2078
|
-
move: {
|
|
2079
|
-
x: -1,
|
|
2080
|
-
y: 0,
|
|
2081
|
-
enter: 'rt'
|
|
2082
|
-
}
|
|
2083
|
-
};
|
|
2084
|
-
cell.edges.tl = {
|
|
2085
|
-
path: [ [ topleft, 1], [bottomright, 0] ],
|
|
2086
|
-
move: {
|
|
2087
|
-
x: 0,
|
|
2088
|
-
y: -1,
|
|
2089
|
-
enter: 'tr'
|
|
2090
|
-
}
|
|
2091
|
-
};
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
if (opt.polygons)
|
|
2095
|
-
cell.polygons.push([ [0, lefttop], [0, 1], [topleft, 1], [bottomright, 0], [bottomleft, 0] ]);
|
|
2096
|
-
},
|
|
2097
|
-
|
|
2098
|
-
pentagon_lt_rl: function(cell, x0, x1, x2, x3, opt) {
|
|
2099
|
-
var leftbottom = opt.interpolate_a(x0, x3, opt.minV, opt.maxV);
|
|
2100
|
-
var lefttop = opt.interpolate_b(x0, x3, opt.minV, opt.maxV);
|
|
2101
|
-
var topright = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
2102
|
-
var righttop = opt.interpolate(x1, x3, opt.minV, opt.maxV);
|
|
2103
|
-
|
|
2104
|
-
if (opt.polygons_full) {
|
|
2105
|
-
cell.edges.lt = {
|
|
2106
|
-
path: [ [0, lefttop], [topright, 1] ],
|
|
2107
|
-
move: {
|
|
2108
|
-
x: 0,
|
|
2109
|
-
y: 1,
|
|
2110
|
-
enter: 'br'
|
|
2111
|
-
}
|
|
2112
|
-
};
|
|
2113
|
-
cell.edges.rt = {
|
|
2114
|
-
path: [ [1, righttop], [0, leftbottom] ],
|
|
2115
|
-
move: {
|
|
2116
|
-
x: -1,
|
|
2117
|
-
y: 0,
|
|
2118
|
-
enter: 'rb'
|
|
2119
|
-
}
|
|
2120
|
-
};
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
if (opt.polygons)
|
|
2124
|
-
cell.polygons.push([ [0, leftbottom], [0, lefttop], [topright, 1], [1, 1], [1, righttop] ]);
|
|
2125
|
-
},
|
|
2126
|
-
|
|
2127
|
-
pentagon_tr_bt: function(cell, x0, x1, x2, x3, opt) {
|
|
2128
|
-
var topleft = opt.interpolate_a(x3, x2, opt.minV, opt.maxV);
|
|
2129
|
-
var topright = opt.interpolate_b(x3, x2, opt.minV, opt.maxV);
|
|
2130
|
-
var rightbottom = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
2131
|
-
var bottomright = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2132
|
-
|
|
2133
|
-
if (opt.polygons_full) {
|
|
2134
|
-
cell.edges.br = {
|
|
2135
|
-
path: [ [bottomright, 0], [topleft, 1] ],
|
|
2136
|
-
move: {
|
|
2137
|
-
x: 0,
|
|
2138
|
-
y: 1,
|
|
2139
|
-
enter: 'bl'
|
|
2140
|
-
}
|
|
2141
|
-
};
|
|
2142
|
-
cell.edges.tr = {
|
|
2143
|
-
path: [ [topright, 1], [1, rightbottom] ],
|
|
2144
|
-
move: {
|
|
2145
|
-
x: 1,
|
|
2146
|
-
y: 0,
|
|
2147
|
-
enter: 'lb'
|
|
2148
|
-
}
|
|
2149
|
-
};
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
|
-
if (opt.polygons)
|
|
2153
|
-
cell.polygons.push([ [topleft, 1], [topright, 1], [1, rightbottom], [1, 0], [bottomright, 0] ]);
|
|
2154
|
-
},
|
|
2155
|
-
|
|
2156
|
-
pentagon_rb_lr: function(cell, x0, x1, x2, x3, opt) {
|
|
2157
|
-
var leftbottom = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
2158
|
-
var righttop = opt.interpolate_b(x1, x2, opt.minV, opt.maxV);
|
|
2159
|
-
var rightbottom = opt.interpolate_a(x1, x2, opt.minV, opt.maxV);
|
|
2160
|
-
var bottomleft = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2161
|
-
|
|
2162
|
-
if (opt.polygons_full) {
|
|
2163
|
-
cell.edges.lb = {
|
|
2164
|
-
path: [ [0, leftbottom], [1, righttop] ],
|
|
2165
|
-
move: {
|
|
2166
|
-
x: 1,
|
|
2167
|
-
y: 0,
|
|
2168
|
-
enter: 'lt'
|
|
2169
|
-
}
|
|
2170
|
-
};
|
|
2171
|
-
cell.edges.rb = {
|
|
2172
|
-
path: [ [1, rightbottom], [bottomleft, 0] ],
|
|
2173
|
-
move: {
|
|
2174
|
-
x: 0,
|
|
2175
|
-
y: -1,
|
|
2176
|
-
enter: 'tl'
|
|
2177
|
-
}
|
|
2178
|
-
};
|
|
2179
|
-
}
|
|
2180
|
-
if (opt.polygons)
|
|
2181
|
-
cell.polygons.push([ [0, 0], [0, leftbottom], [1, righttop], [1, rightbottom], [bottomleft, 0] ]);
|
|
2182
|
-
},
|
|
2183
|
-
|
|
2184
|
-
hexagon_lt_tr: function(cell, x0, x1, x2, x3, opt) {
|
|
2185
|
-
var leftbottom = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
2186
|
-
var topleft = opt.interpolate_a(x3, x2, opt.minV, opt.maxV);
|
|
2187
|
-
var topright = opt.interpolate_b(x3, x2, opt.minV, opt.maxV);
|
|
2188
|
-
var rightbottom = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
2189
|
-
|
|
2190
|
-
if (opt.polygons_full) {
|
|
2191
|
-
cell.edges.lb = {
|
|
2192
|
-
path: [ [0, leftbottom], [topleft, 1] ],
|
|
2193
|
-
move: {
|
|
2194
|
-
x: 0,
|
|
2195
|
-
y: 1,
|
|
2196
|
-
enter: 'bl'
|
|
2197
|
-
}
|
|
2198
|
-
};
|
|
2199
|
-
cell.edges.tr = {
|
|
2200
|
-
path: [ [topright, 1], [1, rightbottom] ],
|
|
2201
|
-
move: {
|
|
2202
|
-
x: 1,
|
|
2203
|
-
y: 0,
|
|
2204
|
-
enter: 'lb'
|
|
2205
|
-
}
|
|
2206
|
-
};
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
|
-
if (opt.polygons)
|
|
2210
|
-
cell.polygons.push([ [0, 0], [0, leftbottom], [topleft, 1], [topright, 1], [1, rightbottom], [1, 0] ]);
|
|
2211
|
-
},
|
|
2212
|
-
|
|
2213
|
-
hexagon_bl_lt: function(cell, x0, x1, x2, x3, opt) {
|
|
2214
|
-
var bottomright = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2215
|
-
var leftbottom = opt.interpolate_a(x0, x3, opt.minV, opt.maxV);
|
|
2216
|
-
var lefttop = opt.interpolate_b(x0, x3, opt.minV, opt.maxV);
|
|
2217
|
-
var topright = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
2218
|
-
|
|
2219
|
-
if (opt.polygons_full) {
|
|
2220
|
-
cell.edges.br = {
|
|
2221
|
-
path: [ [bottomright, 0], [0, leftbottom] ],
|
|
2222
|
-
move: {
|
|
2223
|
-
x: -1,
|
|
2224
|
-
y: 0,
|
|
2225
|
-
enter: 'rb'
|
|
2226
|
-
}
|
|
2227
|
-
};
|
|
2228
|
-
cell.edges.lt = {
|
|
2229
|
-
path: [ [0, lefttop], [topright, 1] ],
|
|
2230
|
-
move: {
|
|
2231
|
-
x: 0,
|
|
2232
|
-
y: 1,
|
|
2233
|
-
enter: 'br'
|
|
2234
|
-
}
|
|
2235
|
-
};
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
if (opt.polygons)
|
|
2239
|
-
cell.polygons.push([ [bottomright, 0], [0, leftbottom], [0, lefttop], [topright, 1], [1, 1], [1, 0] ]);
|
|
2240
|
-
},
|
|
2241
|
-
|
|
2242
|
-
hexagon_bl_rb: function(cell, x0, x1, x2, x3, opt) {
|
|
2243
|
-
var bottomleft = opt.interpolate_a(x0, x1, opt.minV, opt.maxV);
|
|
2244
|
-
var bottomright = opt.interpolate_b(x0, x1, opt.minV, opt.maxV);
|
|
2245
|
-
var lefttop = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
2246
|
-
var righttop = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
2247
|
-
|
|
2248
|
-
if (opt.polygons_full) {
|
|
2249
|
-
cell.edges.bl = {
|
|
2250
|
-
path: [ [bottomleft, 0], [0, lefttop] ],
|
|
2251
|
-
move: {
|
|
2252
|
-
x: -1,
|
|
2253
|
-
y: 0,
|
|
2254
|
-
enter: 'rt'
|
|
2255
|
-
}
|
|
2256
|
-
};
|
|
2257
|
-
cell.edges.rt = {
|
|
2258
|
-
path: [ [1, righttop], [bottomright, 0] ],
|
|
2259
|
-
move: {
|
|
2260
|
-
x: 0,
|
|
2261
|
-
y: -1,
|
|
2262
|
-
enter: 'tr'
|
|
2263
|
-
}
|
|
2264
|
-
};
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
if (opt.polygons)
|
|
2268
|
-
cell.polygons.push([ [bottomleft, 0], [0, lefttop], [0, 1], [1, 1], [1, righttop], [bottomright, 0] ]);
|
|
2269
|
-
},
|
|
2270
|
-
|
|
2271
|
-
hexagon_tr_rb: function(cell, x0, x1, x2, x3, opt) {
|
|
2272
|
-
var bottomleft = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2273
|
-
var topleft = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
2274
|
-
var righttop = opt.interpolate_b(x1, x2, opt.minV, opt.maxV);
|
|
2275
|
-
var rightbottom = opt.interpolate_a(x1, x2, opt.minV, opt.maxV);
|
|
2276
|
-
|
|
2277
|
-
if (opt.polygons_full) {
|
|
2278
|
-
cell.edges.tl = {
|
|
2279
|
-
path: [ [topleft, 1], [1, righttop] ],
|
|
2280
|
-
move: {
|
|
2281
|
-
x: 1,
|
|
2282
|
-
y: 0,
|
|
2283
|
-
enter: 'lt'
|
|
2284
|
-
}
|
|
2285
|
-
};
|
|
2286
|
-
cell.edges.rb = {
|
|
2287
|
-
path: [ [1, rightbottom], [bottomleft, 0] ],
|
|
2288
|
-
move: {
|
|
2289
|
-
x: 0,
|
|
2290
|
-
y: -1,
|
|
2291
|
-
enter: 'tl'
|
|
2292
|
-
}
|
|
2293
|
-
};
|
|
2294
|
-
}
|
|
2295
|
-
|
|
2296
|
-
if (opt.polygons)
|
|
2297
|
-
cell.polygons.push([ [0, 0], [0, 1], [topleft, 1], [1, righttop], [1, rightbottom], [bottomleft, 0] ]);
|
|
2298
|
-
},
|
|
2299
|
-
|
|
2300
|
-
hexagon_lt_rb: function(cell, x0, x1, x2, x3, opt) {
|
|
2301
|
-
var leftbottom = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
2302
|
-
var topright = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
2303
|
-
var righttop = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
2304
|
-
var bottomleft = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2305
|
-
|
|
2306
|
-
if (opt.polygons_full) {
|
|
2307
|
-
cell.edges.lb = {
|
|
2308
|
-
path: [ [0, leftbottom], [topright, 1] ],
|
|
2309
|
-
move: {
|
|
2310
|
-
x: 0,
|
|
2311
|
-
y: 1,
|
|
2312
|
-
enter: 'br'
|
|
2313
|
-
}
|
|
2314
|
-
};
|
|
2315
|
-
cell.edges.rt = {
|
|
2316
|
-
path: [ [1, righttop], [bottomleft, 0] ],
|
|
2317
|
-
move: {
|
|
2318
|
-
x: 0,
|
|
2319
|
-
y: -1,
|
|
2320
|
-
enter: 'tl'
|
|
2321
|
-
}
|
|
2322
|
-
};
|
|
2323
|
-
}
|
|
2324
|
-
|
|
2325
|
-
if (opt.polygons)
|
|
2326
|
-
cell.polygons.push([ [0, 0], [0, leftbottom], [topright, 1], [1, 1], [1, righttop], [bottomleft, 0] ]);
|
|
2327
|
-
},
|
|
2328
|
-
|
|
2329
|
-
hexagon_bl_tr: function(cell, x0, x1, x2, x3, opt) {
|
|
2330
|
-
var bottomright = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2331
|
-
var lefttop = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
2332
|
-
var topleft = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
2333
|
-
var rightbottom = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
2334
|
-
|
|
2335
|
-
if (opt.polygons_full) {
|
|
2336
|
-
cell.edges.br = {
|
|
2337
|
-
path: [ [bottomright, 0], [0, lefttop] ],
|
|
2338
|
-
move: {
|
|
2339
|
-
x: -1,
|
|
2340
|
-
y: 0,
|
|
2341
|
-
enter: 'rt'
|
|
2342
|
-
}
|
|
2343
|
-
};
|
|
2344
|
-
cell.edges.tl = {
|
|
2345
|
-
path: [ [topleft, 1], [1, rightbottom] ],
|
|
2346
|
-
move: {
|
|
2347
|
-
x: 1,
|
|
2348
|
-
y: 0,
|
|
2349
|
-
enter: 'lb'
|
|
2350
|
-
}
|
|
2351
|
-
};
|
|
2352
|
-
}
|
|
2353
|
-
|
|
2354
|
-
if (opt.polygons)
|
|
2355
|
-
cell.polygons.push([ [bottomright, 0], [0, lefttop], [0, 1], [topleft, 1], [1, rightbottom], [1, 0] ]);
|
|
2356
|
-
},
|
|
2357
|
-
|
|
2358
|
-
heptagon_tr: function(cell, x0, x1, x2, x3, opt) {
|
|
2359
|
-
var bottomleft = opt.interpolate_a(x0, x1, opt.minV, opt.maxV);
|
|
2360
|
-
var bottomright = opt.interpolate_b(x0, x1, opt.minV, opt.maxV);
|
|
2361
|
-
var leftbottom = opt.interpolate_a(x0, x3, opt.minV, opt.maxV);
|
|
2362
|
-
var lefttop = opt.interpolate_b(x0, x3, opt.minV, opt.maxV);
|
|
2363
|
-
var topright = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
2364
|
-
var righttop = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
2365
|
-
|
|
2366
|
-
if (opt.polygons_full) {
|
|
2367
|
-
cell.edges.bl = {
|
|
2368
|
-
path: [ [bottomleft, 0], [0, leftbottom] ],
|
|
2369
|
-
move: {
|
|
2370
|
-
x: -1,
|
|
2371
|
-
y: 0,
|
|
2372
|
-
enter: 'rb'
|
|
2373
|
-
}
|
|
2374
|
-
};
|
|
2375
|
-
cell.edges.lt = {
|
|
2376
|
-
path: [ [0, lefttop], [topright, 1] ],
|
|
2377
|
-
move: {
|
|
2378
|
-
x: 0,
|
|
2379
|
-
y: 1,
|
|
2380
|
-
enter: 'br'
|
|
2381
|
-
}
|
|
2382
|
-
};
|
|
2383
|
-
cell.edges.rt = {
|
|
2384
|
-
path: [ [1, righttop], [bottomright, 0] ],
|
|
2385
|
-
move: {
|
|
2386
|
-
x: 0,
|
|
2387
|
-
y: -1,
|
|
2388
|
-
enter: 'tr'
|
|
2389
|
-
}
|
|
2390
|
-
};
|
|
2391
|
-
}
|
|
2392
|
-
|
|
2393
|
-
if (opt.polygons)
|
|
2394
|
-
cell.polygons.push([ [bottomleft, 0], [0, leftbottom], [0, lefttop], [topright, 1], [1, 1], [1, righttop], [bottomright, 0] ]);
|
|
2395
|
-
},
|
|
2396
|
-
|
|
2397
|
-
heptagon_bl: function(cell, x0, x1, x2, x3, opt) {
|
|
2398
|
-
var bottomleft = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2399
|
-
var leftbottom = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
2400
|
-
var topleft = opt.interpolate_a(x3, x2, opt.minV, opt.maxV);
|
|
2401
|
-
var topright = opt.interpolate_b(x3, x2, opt.minV, opt.maxV);
|
|
2402
|
-
var righttop = opt.interpolate_b(x1, x2, opt.minV, opt.maxV);
|
|
2403
|
-
var rightbottom = opt.interpolate_a(x1, x2, opt.minV, opt.maxV);
|
|
2404
|
-
|
|
2405
|
-
if (opt.polygons_full) {
|
|
2406
|
-
cell.edges.lb = {
|
|
2407
|
-
path: [ [0, leftbottom], [topleft, 1] ],
|
|
2408
|
-
move: {
|
|
2409
|
-
x: 0,
|
|
2410
|
-
y: 1,
|
|
2411
|
-
enter: 'bl'
|
|
2412
|
-
}
|
|
2413
|
-
};
|
|
2414
|
-
cell.edges.tr = {
|
|
2415
|
-
path: [ [topright, 1], [1, righttop] ],
|
|
2416
|
-
move: {
|
|
2417
|
-
x: 1,
|
|
2418
|
-
y: 0,
|
|
2419
|
-
enter: 'lt'
|
|
2420
|
-
}
|
|
2421
|
-
};
|
|
2422
|
-
cell.edges.rb = {
|
|
2423
|
-
path: [ [1, rightbottom], [bottomleft, 0] ],
|
|
2424
|
-
move: {
|
|
2425
|
-
x: 0,
|
|
2426
|
-
y: -1,
|
|
2427
|
-
enter: 'tl'
|
|
2428
|
-
}
|
|
2429
|
-
};
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
if (opt.polygons)
|
|
2433
|
-
cell.polygons.push([ [0, 0], [0, leftbottom], [topleft, 1], [topright, 1], [1, righttop], [1, rightbottom], [bottomleft, 0] ]);
|
|
2434
|
-
},
|
|
2435
|
-
|
|
2436
|
-
heptagon_tl: function(cell, x0, x1, x2, x3, opt) {
|
|
2437
|
-
var bottomleft = opt.interpolate_a(x0, x1, opt.minV, opt.maxV);
|
|
2438
|
-
var bottomright = opt.interpolate_b(x0, x1, opt.minV, opt.maxV);
|
|
2439
|
-
var lefttop = opt.interpolate(x0, x3, opt.minV, opt.maxV);
|
|
2440
|
-
var topleft = opt.interpolate(x3, x2, opt.minV, opt.maxV);
|
|
2441
|
-
var righttop = opt.interpolate_b(x1, x2, opt.minV, opt.maxV);
|
|
2442
|
-
var rightbottom = opt.interpolate_a(x1, x2, opt.minV, opt.maxV);
|
|
2443
|
-
|
|
2444
|
-
if (opt.polygons_full) {
|
|
2445
|
-
cell.edges.bl = {
|
|
2446
|
-
path: [ [bottomleft, 0], [0, lefttop] ],
|
|
2447
|
-
move: {
|
|
2448
|
-
x: -1,
|
|
2449
|
-
y: 0,
|
|
2450
|
-
enter: 'rt'
|
|
2451
|
-
}
|
|
2452
|
-
};
|
|
2453
|
-
cell.edges.tl = {
|
|
2454
|
-
path: [ [topleft, 1], [1, righttop] ],
|
|
2455
|
-
move: {
|
|
2456
|
-
x: 1,
|
|
2457
|
-
y: 0,
|
|
2458
|
-
enter: 'lt'
|
|
2459
|
-
}
|
|
2460
|
-
};
|
|
2461
|
-
cell.edges.rb = {
|
|
2462
|
-
path: [ [1, rightbottom], [bottomright, 0] ],
|
|
2463
|
-
move: {
|
|
2464
|
-
x: 0,
|
|
2465
|
-
y: -1,
|
|
2466
|
-
enter: 'tr'
|
|
2467
|
-
}
|
|
2468
|
-
};
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
|
-
if (opt.polygons)
|
|
2472
|
-
cell.polygons.push([ [bottomleft, 0], [0, lefttop], [0, 1], [topleft, 1], [1, righttop], [1, rightbottom], [bottomright, 0] ]);
|
|
2473
|
-
},
|
|
2474
|
-
|
|
2475
|
-
heptagon_br: function(cell, x0, x1, x2, x3, opt) {
|
|
2476
|
-
var bottomright = opt.interpolate(x0, x1, opt.minV, opt.maxV);
|
|
2477
|
-
var leftbottom = opt.interpolate_a(x0, x3, opt.minV, opt.maxV);
|
|
2478
|
-
var lefttop = opt.interpolate_b(x0, x3, opt.minV, opt.maxV);
|
|
2479
|
-
var topleft = opt.interpolate_a(x3, x2, opt.minV, opt.maxV);
|
|
2480
|
-
var topright = opt.interpolate_b(x3, x2, opt.minV, opt.maxV);
|
|
2481
|
-
var rightbottom = opt.interpolate(x1, x2, opt.minV, opt.maxV);
|
|
2482
|
-
|
|
2483
|
-
if (opt.polygons_full) {
|
|
2484
|
-
cell.edges.br = {
|
|
2485
|
-
path: [ [bottomright, 0], [0, leftbottom] ],
|
|
2486
|
-
move: {
|
|
2487
|
-
x: -1,
|
|
2488
|
-
y: 0,
|
|
2489
|
-
enter: 'rb'
|
|
2490
|
-
}
|
|
2491
|
-
};
|
|
2492
|
-
cell.edges.lt = {
|
|
2493
|
-
path: [ [0, lefttop], [topleft, 1] ],
|
|
2494
|
-
move: {
|
|
2495
|
-
x: 0,
|
|
2496
|
-
y: 1,
|
|
2497
|
-
enter: 'bl'
|
|
2498
|
-
}
|
|
2499
|
-
};
|
|
2500
|
-
cell.edges.tr = {
|
|
2501
|
-
path: [ [topright, 1], [1, rightbottom] ],
|
|
2502
|
-
move: {
|
|
2503
|
-
x: 1,
|
|
2504
|
-
y: 0,
|
|
2505
|
-
enter: 'lb'
|
|
2506
|
-
}
|
|
2507
|
-
};
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
if (opt.polygons)
|
|
2511
|
-
cell.polygons.push([ [bottomright,0], [0, leftbottom], [0, lefttop], [topleft, 1], [topright, 1], [1, rightbottom], [1, 0] ]);
|
|
2512
|
-
},
|
|
2513
|
-
|
|
2514
|
-
octagon: function(cell, x0, x1, x2, x3, opt) {
|
|
2515
|
-
var bottomleft = opt.interpolate_a(x0, x1, opt.minV, opt.maxV);
|
|
2516
|
-
var bottomright = opt.interpolate_b(x0, x1, opt.minV, opt.maxV);
|
|
2517
|
-
var leftbottom = opt.interpolate_a(x0, x3, opt.minV, opt.maxV);
|
|
2518
|
-
var lefttop = opt.interpolate_b(x0, x3, opt.minV, opt.maxV);
|
|
2519
|
-
var topleft = opt.interpolate_a(x3, x2, opt.minV, opt.maxV);
|
|
2520
|
-
var topright = opt.interpolate_b(x3, x2, opt.minV, opt.maxV);
|
|
2521
|
-
var righttop = opt.interpolate_b(x1, x2, opt.minV, opt.maxV);
|
|
2522
|
-
var rightbottom = opt.interpolate_a(x1, x2, opt.minV, opt.maxV);
|
|
2523
|
-
|
|
2524
|
-
if (opt.polygons_full) {
|
|
2525
|
-
cell.edges.bl = {
|
|
2526
|
-
path: [ [bottomleft, 0], [0, leftbottom] ],
|
|
2527
|
-
move: {
|
|
2528
|
-
x: -1,
|
|
2529
|
-
y: 0,
|
|
2530
|
-
enter: 'rb'
|
|
2531
|
-
}
|
|
2532
|
-
};
|
|
2533
|
-
cell.edges.lt = {
|
|
2534
|
-
path: [ [0, lefttop], [topleft, 1] ],
|
|
2535
|
-
move: {
|
|
2536
|
-
x: 0,
|
|
2537
|
-
y: 1,
|
|
2538
|
-
enter: 'bl'
|
|
2539
|
-
}
|
|
2540
|
-
};
|
|
2541
|
-
cell.edges.tr = {
|
|
2542
|
-
path: [ [topright, 1], [1, righttop] ],
|
|
2543
|
-
move: {
|
|
2544
|
-
x: 1,
|
|
2545
|
-
y: 0,
|
|
2546
|
-
enter: 'lt'
|
|
2547
|
-
}
|
|
2548
|
-
};
|
|
2549
|
-
cell.edges.rb = {
|
|
2550
|
-
path: [ [1, rightbottom], [bottomright, 0] ],
|
|
2551
|
-
move: {
|
|
2552
|
-
x: 0,
|
|
2553
|
-
y: -1,
|
|
2554
|
-
enter: 'tr'
|
|
2555
|
-
}
|
|
2556
|
-
};
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
|
-
if (opt.polygons)
|
|
2560
|
-
cell.polygons.push([ [bottomleft, 0], [0, leftbottom], [0, lefttop], [topleft, 1], [topright, 1], [1, righttop], [1, rightbottom], [bottomright, 0] ]);
|
|
2561
|
-
}
|
|
2562
|
-
};
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
/*
|
|
2566
|
-
* Compute isobands(s) for a scalar 2D field given a certain
|
|
2567
|
-
* threshold and a bandwidth by applying the Marching Squares
|
|
2568
|
-
* Algorithm. The function returns a list of path coordinates
|
|
2569
|
-
* either for individual polygons within each grid cell, or the
|
|
2570
|
-
* outline of connected polygons.
|
|
2571
|
-
*/
|
|
2572
|
-
function isoBands(input, minV, bandWidth, options) {
|
|
2573
|
-
var i,
|
|
2574
|
-
j,
|
|
2575
|
-
settings,
|
|
2576
|
-
useQuadTree = false,
|
|
2577
|
-
tree = null,
|
|
2578
|
-
root = null,
|
|
2579
|
-
data = null,
|
|
2580
|
-
cellGrid = null,
|
|
2581
|
-
multiBand = false,
|
|
2582
|
-
bw = [],
|
|
2583
|
-
bandPolygons = [],
|
|
2584
|
-
ret = [];
|
|
2585
|
-
|
|
2586
|
-
/* basic input validation */
|
|
2587
|
-
if (!input) throw new Error('data is required');
|
|
2588
|
-
if (minV === undefined || minV === null) throw new Error('lowerBound is required');
|
|
2589
|
-
if (bandWidth === undefined || bandWidth === null) throw new Error('bandWidth is required');
|
|
2590
|
-
if ((!!options) && (typeof options !== 'object')) throw new Error('options must be an object');
|
|
2591
|
-
|
|
2592
|
-
settings = isoBandOptions(options);
|
|
2593
|
-
|
|
2594
|
-
/* check for input data */
|
|
2595
|
-
if (input instanceof QuadTree) {
|
|
2596
|
-
tree = input;
|
|
2597
|
-
root = input.root;
|
|
2598
|
-
data = input.data;
|
|
2599
|
-
if (!settings.noQuadTree)
|
|
2600
|
-
useQuadTree = true;
|
|
2601
|
-
} else if (Array.isArray(input) && Array.isArray(input[0])) {
|
|
2602
|
-
data = input;
|
|
2603
|
-
} else {
|
|
2604
|
-
throw new Error('input is neither array of arrays nor object retrieved from \'QuadTree()\'');
|
|
2605
|
-
}
|
|
2606
|
-
|
|
2607
|
-
/* check and prepare input thresholds */
|
|
2608
|
-
if (Array.isArray(minV)) {
|
|
2609
|
-
multiBand = true;
|
|
2610
|
-
|
|
2611
|
-
/* activate QuadTree optimization if not explicitly forbidden by user settings */
|
|
2612
|
-
if (!settings.noQuadTree)
|
|
2613
|
-
useQuadTree = true;
|
|
2614
|
-
|
|
2615
|
-
/* check if all minV are numbers */
|
|
2616
|
-
for (i = 0; i < minV.length; i++)
|
|
2617
|
-
if (isNaN(+minV[i]))
|
|
2618
|
-
throw new Error('lowerBound[' + i + '] is not a number');
|
|
2619
|
-
|
|
2620
|
-
if (Array.isArray(bandWidth)) {
|
|
2621
|
-
if (minV.length !== bandWidth.length)
|
|
2622
|
-
throw new Error('lowerBound and bandWidth have unequal lengths');
|
|
2623
|
-
|
|
2624
|
-
/* check bandwidth values */
|
|
2625
|
-
for (i = 0; i < bandWidth.length; i++)
|
|
2626
|
-
if (isNaN(+bandWidth[i]))
|
|
2627
|
-
throw new Error('bandWidth[' + i + '] is not a number');
|
|
2628
|
-
} else {
|
|
2629
|
-
if (isNaN(+bandWidth))
|
|
2630
|
-
throw new Error('bandWidth must be a number');
|
|
2631
|
-
|
|
2632
|
-
bw = [];
|
|
2633
|
-
for (i = 0; i < minV.length; i++) {
|
|
2634
|
-
bw.push(bandWidth);
|
|
2635
|
-
}
|
|
2636
|
-
bandWidth = bw;
|
|
2637
|
-
}
|
|
2638
|
-
} else {
|
|
2639
|
-
if (isNaN(+minV))
|
|
2640
|
-
throw new Error('lowerBound must be a number');
|
|
2641
|
-
|
|
2642
|
-
minV = [ minV ];
|
|
2643
|
-
|
|
2644
|
-
if (isNaN(+bandWidth))
|
|
2645
|
-
throw new Error('bandWidth must be a number');
|
|
2646
|
-
|
|
2647
|
-
bandWidth = [ bandWidth ];
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
/* create QuadTree root node if not already present */
|
|
2651
|
-
if ((useQuadTree) && (!root)) {
|
|
2652
|
-
tree = new QuadTree(data);
|
|
2653
|
-
root = tree.root;
|
|
2654
|
-
data = tree.data;
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
if (settings.verbose) {
|
|
2658
|
-
if(settings.polygons)
|
|
2659
|
-
console.log('MarchingSquaresJS-isoBands: returning single polygons for each grid cell');
|
|
2660
|
-
else
|
|
2661
|
-
console.log('MarchingSquaresJS-isoBands: returning polygon paths for entire data grid');
|
|
2662
|
-
|
|
2663
|
-
if (multiBand)
|
|
2664
|
-
console.log('MarchingSquaresJS-isoBands: multiple bands requested, returning array of band polygons instead of polygons for a single band');
|
|
2665
|
-
}
|
|
2666
|
-
|
|
2667
|
-
/* Done with all input validation, now let's start computing stuff */
|
|
2668
|
-
|
|
2669
|
-
/* loop over all minV values */
|
|
2670
|
-
minV.forEach(function(lowerBound, b) {
|
|
2671
|
-
bandPolygons = [];
|
|
2672
|
-
|
|
2673
|
-
/* store bounds for current computation in settings object */
|
|
2674
|
-
settings.minV = lowerBound;
|
|
2675
|
-
settings.maxV = lowerBound + bandWidth[b];
|
|
2676
|
-
|
|
2677
|
-
if(settings.verbose)
|
|
2678
|
-
console.log('MarchingSquaresJS-isoBands: computing isobands for [' + lowerBound + ':' + (lowerBound + bandWidth[b]) + ']');
|
|
2679
|
-
|
|
2680
|
-
if (settings.polygons) {
|
|
2681
|
-
/* compose list of polygons for each single cell */
|
|
2682
|
-
if (useQuadTree) {
|
|
2683
|
-
/* go through list of cells retrieved from QuadTree */
|
|
2684
|
-
root
|
|
2685
|
-
.cellsInBand(settings.minV, settings.maxV, true)
|
|
2686
|
-
.forEach(function(c) {
|
|
2687
|
-
bandPolygons = bandPolygons.concat(
|
|
2688
|
-
cell2Polygons(
|
|
2689
|
-
prepareCell$1(data,
|
|
2690
|
-
c.x,
|
|
2691
|
-
c.y,
|
|
2692
|
-
settings),
|
|
2693
|
-
c.x,
|
|
2694
|
-
c.y,
|
|
2695
|
-
settings
|
|
2696
|
-
));
|
|
2697
|
-
});
|
|
2698
|
-
} else {
|
|
2699
|
-
/* go through entire array of input data */
|
|
2700
|
-
for (j = 0; j < data.length - 1; ++j) {
|
|
2701
|
-
for (i = 0; i < data[0].length - 1; ++i)
|
|
2702
|
-
bandPolygons = bandPolygons.concat(
|
|
2703
|
-
cell2Polygons(
|
|
2704
|
-
prepareCell$1(data,
|
|
2705
|
-
i,
|
|
2706
|
-
j,
|
|
2707
|
-
settings),
|
|
2708
|
-
i,
|
|
2709
|
-
j,
|
|
2710
|
-
settings
|
|
2711
|
-
));
|
|
2712
|
-
}
|
|
2713
|
-
}
|
|
2714
|
-
} else {
|
|
2715
|
-
/* sparse grid of input data cells */
|
|
2716
|
-
cellGrid = [];
|
|
2717
|
-
for (i = 0; i < data[0].length - 1; ++i)
|
|
2718
|
-
cellGrid[i] = [];
|
|
2719
|
-
|
|
2720
|
-
/* compose list of polygons for entire input grid */
|
|
2721
|
-
if (useQuadTree) {
|
|
2722
|
-
/* collect the cells */
|
|
2723
|
-
root
|
|
2724
|
-
.cellsInBand(settings.minV, settings.maxV, false)
|
|
2725
|
-
.forEach(function(c) {
|
|
2726
|
-
cellGrid[c.x][c.y] = prepareCell$1(data,
|
|
2727
|
-
c.x,
|
|
2728
|
-
c.y,
|
|
2729
|
-
settings);
|
|
2730
|
-
});
|
|
2731
|
-
} else {
|
|
2732
|
-
/* prepare cells */
|
|
2733
|
-
for (i = 0; i < data[0].length - 1; ++i) {
|
|
2734
|
-
for (j = 0; j < data.length - 1; ++j) {
|
|
2735
|
-
cellGrid[i][j] = prepareCell$1(data,
|
|
2736
|
-
i,
|
|
2737
|
-
j,
|
|
2738
|
-
settings);
|
|
2739
|
-
}
|
|
2740
|
-
}
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
|
-
bandPolygons = traceBandPaths(data, cellGrid, settings);
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
/* finally, add polygons to output array */
|
|
2747
|
-
if (multiBand)
|
|
2748
|
-
ret.push(bandPolygons);
|
|
2749
|
-
else
|
|
2750
|
-
ret = bandPolygons;
|
|
2751
|
-
|
|
2752
|
-
if(typeof settings.successCallback === 'function')
|
|
2753
|
-
settings.successCallback(ret, lowerBound, bandWidth[b]);
|
|
2754
|
-
});
|
|
2755
|
-
|
|
2756
|
-
return ret;
|
|
2757
|
-
}
|
|
2758
|
-
|
|
2759
|
-
/*
|
|
2760
|
-
* Thats all for the public interface, below follows the actual
|
|
2761
|
-
* implementation
|
|
2762
|
-
*/
|
|
2763
|
-
|
|
2764
|
-
/*
|
|
2765
|
-
* For isoBands, each square is defined by the three states
|
|
2766
|
-
* of its corner points. However, since computers use power-2
|
|
2767
|
-
* values, we use 2bits per trit, i.e.:
|
|
2768
|
-
*
|
|
2769
|
-
* 00 ... below minV
|
|
2770
|
-
* 01 ... between minV and maxV
|
|
2771
|
-
* 10 ... above maxV
|
|
2772
|
-
*
|
|
2773
|
-
* Hence we map the 4-trit configurations as follows:
|
|
2774
|
-
*
|
|
2775
|
-
* 0000 => 0
|
|
2776
|
-
* 0001 => 1
|
|
2777
|
-
* 0002 => 2
|
|
2778
|
-
* 0010 => 4
|
|
2779
|
-
* 0011 => 5
|
|
2780
|
-
* 0012 => 6
|
|
2781
|
-
* 0020 => 8
|
|
2782
|
-
* 0021 => 9
|
|
2783
|
-
* 0022 => 10
|
|
2784
|
-
* 0100 => 16
|
|
2785
|
-
* 0101 => 17
|
|
2786
|
-
* 0102 => 18
|
|
2787
|
-
* 0110 => 20
|
|
2788
|
-
* 0111 => 21
|
|
2789
|
-
* 0112 => 22
|
|
2790
|
-
* 0120 => 24
|
|
2791
|
-
* 0121 => 25
|
|
2792
|
-
* 0122 => 26
|
|
2793
|
-
* 0200 => 32
|
|
2794
|
-
* 0201 => 33
|
|
2795
|
-
* 0202 => 34
|
|
2796
|
-
* 0210 => 36
|
|
2797
|
-
* 0211 => 37
|
|
2798
|
-
* 0212 => 38
|
|
2799
|
-
* 0220 => 40
|
|
2800
|
-
* 0221 => 41
|
|
2801
|
-
* 0222 => 42
|
|
2802
|
-
* 1000 => 64
|
|
2803
|
-
* 1001 => 65
|
|
2804
|
-
* 1002 => 66
|
|
2805
|
-
* 1010 => 68
|
|
2806
|
-
* 1011 => 69
|
|
2807
|
-
* 1012 => 70
|
|
2808
|
-
* 1020 => 72
|
|
2809
|
-
* 1021 => 73
|
|
2810
|
-
* 1022 => 74
|
|
2811
|
-
* 1100 => 80
|
|
2812
|
-
* 1101 => 81
|
|
2813
|
-
* 1102 => 82
|
|
2814
|
-
* 1110 => 84
|
|
2815
|
-
* 1111 => 85
|
|
2816
|
-
* 1112 => 86
|
|
2817
|
-
* 1120 => 88
|
|
2818
|
-
* 1121 => 89
|
|
2819
|
-
* 1122 => 90
|
|
2820
|
-
* 1200 => 96
|
|
2821
|
-
* 1201 => 97
|
|
2822
|
-
* 1202 => 98
|
|
2823
|
-
* 1210 => 100
|
|
2824
|
-
* 1211 => 101
|
|
2825
|
-
* 1212 => 102
|
|
2826
|
-
* 1220 => 104
|
|
2827
|
-
* 1221 => 105
|
|
2828
|
-
* 1222 => 106
|
|
2829
|
-
* 2000 => 128
|
|
2830
|
-
* 2001 => 129
|
|
2831
|
-
* 2002 => 130
|
|
2832
|
-
* 2010 => 132
|
|
2833
|
-
* 2011 => 133
|
|
2834
|
-
* 2012 => 134
|
|
2835
|
-
* 2020 => 136
|
|
2836
|
-
* 2021 => 137
|
|
2837
|
-
* 2022 => 138
|
|
2838
|
-
* 2100 => 144
|
|
2839
|
-
* 2101 => 145
|
|
2840
|
-
* 2102 => 146
|
|
2841
|
-
* 2110 => 148
|
|
2842
|
-
* 2111 => 149
|
|
2843
|
-
* 2112 => 150
|
|
2844
|
-
* 2120 => 152
|
|
2845
|
-
* 2121 => 153
|
|
2846
|
-
* 2122 => 154
|
|
2847
|
-
* 2200 => 160
|
|
2848
|
-
* 2201 => 161
|
|
2849
|
-
* 2202 => 162
|
|
2850
|
-
* 2210 => 164
|
|
2851
|
-
* 2211 => 165
|
|
2852
|
-
* 2212 => 166
|
|
2853
|
-
* 2220 => 168
|
|
2854
|
-
* 2221 => 169
|
|
2855
|
-
* 2222 => 170
|
|
2856
|
-
*/
|
|
2857
|
-
|
|
2858
|
-
/*
|
|
2859
|
-
* ####################################
|
|
2860
|
-
* Some small helper functions
|
|
2861
|
-
* ####################################
|
|
2862
|
-
*/
|
|
2863
|
-
|
|
2864
|
-
function computeCenterAverage(bl, br, tr, tl, minV, maxV) {
|
|
2865
|
-
var average = (tl + tr + br + bl) / 4;
|
|
2866
|
-
|
|
2867
|
-
if (average > maxV)
|
|
2868
|
-
return 2; /* above isoband limits */
|
|
2869
|
-
|
|
2870
|
-
if (average < minV)
|
|
2871
|
-
return 0; /* below isoband limits */
|
|
2872
|
-
|
|
2873
|
-
return 1; /* within isoband limits */
|
|
2874
|
-
}
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
function prepareCell$1(grid, x, y, opt) {
|
|
2878
|
-
var cell,
|
|
2879
|
-
center_avg;
|
|
2880
|
-
|
|
2881
|
-
/* compose the 4-trit corner representation */
|
|
2882
|
-
var cval = 0;
|
|
2883
|
-
var x3 = grid[y + 1][x];
|
|
2884
|
-
var x2 = grid[y + 1][x + 1];
|
|
2885
|
-
var x1 = grid[y][x + 1];
|
|
2886
|
-
var x0 = grid[y][x];
|
|
2887
|
-
var minV = opt.minV;
|
|
2888
|
-
var maxV = opt.maxV;
|
|
2889
|
-
|
|
2890
|
-
/*
|
|
2891
|
-
* Note that missing data within the grid will result
|
|
2892
|
-
* in horribly failing to trace full polygon paths
|
|
2893
|
-
*/
|
|
2894
|
-
if(isNaN(x0) || isNaN(x1) || isNaN(x2) || isNaN(x3)) {
|
|
2895
|
-
return;
|
|
2896
|
-
}
|
|
2897
|
-
|
|
2898
|
-
/*
|
|
2899
|
-
* Here we detect the type of the cell
|
|
2900
|
-
*
|
|
2901
|
-
* x3 ---- x2
|
|
2902
|
-
* | |
|
|
2903
|
-
* | |
|
|
2904
|
-
* x0 ---- x1
|
|
2905
|
-
*
|
|
2906
|
-
* with edge points
|
|
2907
|
-
*
|
|
2908
|
-
* x0 = (x,y),
|
|
2909
|
-
* x1 = (x + 1, y),
|
|
2910
|
-
* x2 = (x + 1, y + 1), and
|
|
2911
|
-
* x3 = (x, y + 1)
|
|
2912
|
-
*
|
|
2913
|
-
* and compute the polygon intersections with the edges
|
|
2914
|
-
* of the cell. Each edge value may be (i) below, (ii) within,
|
|
2915
|
-
* or (iii) above the values of the isoband limits. We
|
|
2916
|
-
* encode this property using 2 bits of information, where
|
|
2917
|
-
*
|
|
2918
|
-
* 00 ... below,
|
|
2919
|
-
* 01 ... within, and
|
|
2920
|
-
* 10 ... above
|
|
2921
|
-
*
|
|
2922
|
-
* Then we store the cells value as vector
|
|
2923
|
-
*
|
|
2924
|
-
* cval = (x0, x1, x2, x3)
|
|
2925
|
-
*
|
|
2926
|
-
* where x0 are the two least significant bits (0th, 1st),
|
|
2927
|
-
* x1 the 2nd and 3rd bit, and so on. This essentially
|
|
2928
|
-
* enables us to work with a single integer number
|
|
2929
|
-
*/
|
|
2930
|
-
|
|
2931
|
-
cval |= (x3 < minV) ? 0 : (x3 > maxV) ? 128 : 64;
|
|
2932
|
-
cval |= (x2 < minV) ? 0 : (x2 > maxV) ? 32 : 16;
|
|
2933
|
-
cval |= (x1 < minV) ? 0 : (x1 > maxV) ? 8 : 4;
|
|
2934
|
-
cval |= (x0 < minV) ? 0 : (x0 > maxV) ? 2 : 1;
|
|
2935
|
-
|
|
2936
|
-
/* make sure cval is a number */
|
|
2937
|
-
cval = +cval;
|
|
2938
|
-
|
|
2939
|
-
/*
|
|
2940
|
-
* cell center average trit for ambiguous cases, where
|
|
2941
|
-
* 0 ... below iso band
|
|
2942
|
-
* 1 ... within iso band
|
|
2943
|
-
* 2 ... above isoband
|
|
2944
|
-
*/
|
|
2945
|
-
center_avg = 0;
|
|
2946
|
-
|
|
2947
|
-
cell = {
|
|
2948
|
-
cval: cval,
|
|
2949
|
-
polygons: [],
|
|
2950
|
-
edges: {},
|
|
2951
|
-
x0: x0,
|
|
2952
|
-
x1: x1,
|
|
2953
|
-
x2: x2,
|
|
2954
|
-
x3: x3,
|
|
2955
|
-
x: x,
|
|
2956
|
-
y: y
|
|
2957
|
-
};
|
|
2958
|
-
|
|
2959
|
-
/*
|
|
2960
|
-
* Compute interpolated intersections of the polygon(s)
|
|
2961
|
-
* with the cell borders and (i) add edges for polygon
|
|
2962
|
-
* trace-back, or (ii) a list of small closed polygons
|
|
2963
|
-
* according to look-up table
|
|
2964
|
-
*/
|
|
2965
|
-
switch (cval) {
|
|
2966
|
-
case 85: /* 1111 */
|
|
2967
|
-
shapeCoordinates.square(cell, x0, x1, x2, x3, opt);
|
|
2968
|
-
/* fall through */
|
|
2969
|
-
case 0: /* 0000 */
|
|
2970
|
-
/* fall through */
|
|
2971
|
-
case 170: /* 2222 */
|
|
2972
|
-
break;
|
|
2973
|
-
|
|
2974
|
-
/* single triangle cases */
|
|
2975
|
-
|
|
2976
|
-
case 169: /* 2221 */
|
|
2977
|
-
shapeCoordinates.triangle_bl(cell, x0, x1, x2, x3, opt);
|
|
2978
|
-
break;
|
|
2979
|
-
|
|
2980
|
-
case 166: /* 2212 */
|
|
2981
|
-
shapeCoordinates.triangle_br(cell, x0, x1, x2, x3, opt);
|
|
2982
|
-
break;
|
|
2983
|
-
|
|
2984
|
-
case 154: /* 2122 */
|
|
2985
|
-
shapeCoordinates.triangle_tr(cell, x0, x1, x2, x3, opt);
|
|
2986
|
-
break;
|
|
2987
|
-
|
|
2988
|
-
case 106: /* 1222 */
|
|
2989
|
-
shapeCoordinates.triangle_tl(cell, x0, x1, x2, x3, opt);
|
|
2990
|
-
break;
|
|
2991
|
-
|
|
2992
|
-
case 1: /* 0001 */
|
|
2993
|
-
shapeCoordinates.triangle_bl(cell, x0, x1, x2, x3, opt);
|
|
2994
|
-
break;
|
|
2995
|
-
|
|
2996
|
-
case 4: /* 0010 */
|
|
2997
|
-
shapeCoordinates.triangle_br(cell, x0, x1, x2, x3, opt);
|
|
2998
|
-
break;
|
|
2999
|
-
|
|
3000
|
-
case 16: /* 0100 */
|
|
3001
|
-
shapeCoordinates.triangle_tr(cell, x0, x1, x2, x3, opt);
|
|
3002
|
-
break;
|
|
3003
|
-
|
|
3004
|
-
case 64: /* 1000 */
|
|
3005
|
-
shapeCoordinates.triangle_tl(cell, x0, x1, x2, x3, opt);
|
|
3006
|
-
break;
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
/* single trapezoid cases */
|
|
3010
|
-
|
|
3011
|
-
case 168: /* 2220 */
|
|
3012
|
-
shapeCoordinates.tetragon_bl(cell, x0, x1, x2, x3, opt);
|
|
3013
|
-
break;
|
|
3014
|
-
|
|
3015
|
-
case 162: /* 2202 */
|
|
3016
|
-
shapeCoordinates.tetragon_br(cell, x0, x1, x2, x3, opt);
|
|
3017
|
-
break;
|
|
3018
|
-
|
|
3019
|
-
case 138: /* 2022 */
|
|
3020
|
-
shapeCoordinates.tetragon_tr(cell, x0, x1, x2, x3, opt);
|
|
3021
|
-
break;
|
|
3022
|
-
|
|
3023
|
-
case 42: /* 0222 */
|
|
3024
|
-
shapeCoordinates.tetragon_tl(cell, x0, x1, x2, x3, opt);
|
|
3025
|
-
break;
|
|
3026
|
-
|
|
3027
|
-
case 2: /* 0002 */
|
|
3028
|
-
shapeCoordinates.tetragon_bl(cell, x0, x1, x2, x3, opt);
|
|
3029
|
-
break;
|
|
3030
|
-
|
|
3031
|
-
case 8: /* 0020 */
|
|
3032
|
-
shapeCoordinates.tetragon_br(cell, x0, x1, x2, x3, opt);
|
|
3033
|
-
break;
|
|
3034
|
-
|
|
3035
|
-
case 32: /* 0200 */
|
|
3036
|
-
shapeCoordinates.tetragon_tr(cell, x0, x1, x2, x3, opt);
|
|
3037
|
-
break;
|
|
3038
|
-
|
|
3039
|
-
case 128: /* 2000 */
|
|
3040
|
-
shapeCoordinates.tetragon_tl(cell, x0, x1, x2, x3, opt);
|
|
3041
|
-
break;
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
/* single rectangle cases */
|
|
3045
|
-
|
|
3046
|
-
case 5: /* 0011 */
|
|
3047
|
-
shapeCoordinates.tetragon_b(cell, x0, x1, x2, x3, opt);
|
|
3048
|
-
break;
|
|
3049
|
-
|
|
3050
|
-
case 20: /* 0110 */
|
|
3051
|
-
shapeCoordinates.tetragon_r(cell, x0, x1, x2, x3, opt);
|
|
3052
|
-
break;
|
|
3053
|
-
|
|
3054
|
-
case 80: /* 1100 */
|
|
3055
|
-
shapeCoordinates.tetragon_t(cell, x0, x1, x2, x3, opt);
|
|
3056
|
-
break;
|
|
3057
|
-
|
|
3058
|
-
case 65: /* 1001 */
|
|
3059
|
-
shapeCoordinates.tetragon_l(cell, x0, x1, x2, x3, opt);
|
|
3060
|
-
break;
|
|
3061
|
-
|
|
3062
|
-
case 165: /* 2211 */
|
|
3063
|
-
shapeCoordinates.tetragon_b(cell, x0, x1, x2, x3, opt);
|
|
3064
|
-
break;
|
|
3065
|
-
|
|
3066
|
-
case 150: /* 2112 */
|
|
3067
|
-
shapeCoordinates.tetragon_r(cell, x0, x1, x2, x3, opt);
|
|
3068
|
-
break;
|
|
3069
|
-
|
|
3070
|
-
case 90: /* 1122 */
|
|
3071
|
-
shapeCoordinates.tetragon_t(cell, x0, x1, x2, x3, opt);
|
|
3072
|
-
break;
|
|
3073
|
-
|
|
3074
|
-
case 105: /* 1221 */
|
|
3075
|
-
shapeCoordinates.tetragon_l(cell, x0, x1, x2, x3, opt);
|
|
3076
|
-
break;
|
|
3077
|
-
|
|
3078
|
-
case 160: /* 2200 */
|
|
3079
|
-
shapeCoordinates.tetragon_lr(cell, x0, x1, x2, x3, opt);
|
|
3080
|
-
break;
|
|
3081
|
-
|
|
3082
|
-
case 130: /* 2002 */
|
|
3083
|
-
shapeCoordinates.tetragon_tb(cell, x0, x1, x2, x3, opt);
|
|
3084
|
-
break;
|
|
3085
|
-
|
|
3086
|
-
case 10: /* 0022 */
|
|
3087
|
-
shapeCoordinates.tetragon_lr(cell, x0, x1, x2, x3, opt);
|
|
3088
|
-
break;
|
|
3089
|
-
|
|
3090
|
-
case 40: /* 0220 */
|
|
3091
|
-
shapeCoordinates.tetragon_tb(cell, x0, x1, x2, x3, opt);
|
|
3092
|
-
break;
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
/* single pentagon cases */
|
|
3096
|
-
|
|
3097
|
-
case 101: /* 1211 */
|
|
3098
|
-
shapeCoordinates.pentagon_tr(cell, x0, x1, x2, x3, opt);
|
|
3099
|
-
break;
|
|
3100
|
-
|
|
3101
|
-
case 149: /* 2111 */
|
|
3102
|
-
shapeCoordinates.pentagon_tl(cell, x0, x1, x2, x3, opt);
|
|
3103
|
-
break;
|
|
3104
|
-
|
|
3105
|
-
case 86: /* 1112 */
|
|
3106
|
-
shapeCoordinates.pentagon_bl(cell, x0, x1, x2, x3, opt);
|
|
3107
|
-
break;
|
|
3108
|
-
|
|
3109
|
-
case 89: /* 1121 */
|
|
3110
|
-
shapeCoordinates.pentagon_br(cell, x0, x1, x2, x3, opt);
|
|
3111
|
-
break;
|
|
3112
|
-
|
|
3113
|
-
case 69: /* 1011 */
|
|
3114
|
-
shapeCoordinates.pentagon_tr(cell, x0, x1, x2, x3, opt);
|
|
3115
|
-
break;
|
|
3116
|
-
|
|
3117
|
-
case 21: /* 0111 */
|
|
3118
|
-
shapeCoordinates.pentagon_tl(cell, x0, x1, x2, x3, opt);
|
|
3119
|
-
break;
|
|
3120
|
-
|
|
3121
|
-
case 84: /* 1110 */
|
|
3122
|
-
shapeCoordinates.pentagon_bl(cell, x0, x1, x2, x3, opt);
|
|
3123
|
-
break;
|
|
3124
|
-
|
|
3125
|
-
case 81: /* 1101 */
|
|
3126
|
-
shapeCoordinates.pentagon_br(cell, x0, x1, x2, x3, opt);
|
|
3127
|
-
break;
|
|
3128
|
-
|
|
3129
|
-
case 96: /* 1200 */
|
|
3130
|
-
shapeCoordinates.pentagon_tr_rl(cell, x0, x1, x2, x3, opt);
|
|
3131
|
-
break;
|
|
3132
|
-
|
|
3133
|
-
case 24: /* 0120 */
|
|
3134
|
-
shapeCoordinates.pentagon_rb_bt(cell, x0, x1, x2, x3, opt);
|
|
3135
|
-
break;
|
|
3136
|
-
|
|
3137
|
-
case 6: /* 0012 */
|
|
3138
|
-
shapeCoordinates.pentagon_bl_lr(cell, x0, x1, x2, x3, opt);
|
|
3139
|
-
break;
|
|
3140
|
-
|
|
3141
|
-
case 129: /* 2001 */
|
|
3142
|
-
shapeCoordinates.pentagon_lt_tb(cell, x0, x1, x2, x3, opt);
|
|
3143
|
-
break;
|
|
3144
|
-
|
|
3145
|
-
case 74: /* 1022 */
|
|
3146
|
-
shapeCoordinates.pentagon_tr_rl(cell, x0, x1, x2, x3, opt);
|
|
3147
|
-
break;
|
|
3148
|
-
|
|
3149
|
-
case 146: /* 2102 */
|
|
3150
|
-
shapeCoordinates.pentagon_rb_bt(cell, x0, x1, x2, x3, opt);
|
|
3151
|
-
break;
|
|
3152
|
-
|
|
3153
|
-
case 164: /* 2210 */
|
|
3154
|
-
shapeCoordinates.pentagon_bl_lr(cell, x0, x1, x2, x3, opt);
|
|
3155
|
-
break;
|
|
3156
|
-
|
|
3157
|
-
case 41: /* 0221 */
|
|
3158
|
-
shapeCoordinates.pentagon_lt_tb(cell, x0, x1, x2, x3, opt);
|
|
3159
|
-
break;
|
|
3160
|
-
|
|
3161
|
-
case 66: /* 1002 */
|
|
3162
|
-
shapeCoordinates.pentagon_bl_tb(cell, x0, x1, x2, x3, opt);
|
|
3163
|
-
break;
|
|
3164
|
-
|
|
3165
|
-
case 144: /* 2100 */
|
|
3166
|
-
shapeCoordinates.pentagon_lt_rl(cell, x0, x1, x2, x3, opt);
|
|
3167
|
-
break;
|
|
3168
|
-
|
|
3169
|
-
case 36: /* 0210 */
|
|
3170
|
-
shapeCoordinates.pentagon_tr_bt(cell, x0, x1, x2, x3, opt);
|
|
3171
|
-
break;
|
|
3172
|
-
|
|
3173
|
-
case 9: /* 0021 */
|
|
3174
|
-
shapeCoordinates.pentagon_rb_lr(cell, x0, x1, x2, x3, opt);
|
|
3175
|
-
break;
|
|
3176
|
-
|
|
3177
|
-
case 104: /* 1220 */
|
|
3178
|
-
shapeCoordinates.pentagon_bl_tb(cell, x0, x1, x2, x3, opt);
|
|
3179
|
-
break;
|
|
3180
|
-
|
|
3181
|
-
case 26: /* 0122 */
|
|
3182
|
-
shapeCoordinates.pentagon_lt_rl(cell, x0, x1, x2, x3, opt);
|
|
3183
|
-
break;
|
|
3184
|
-
|
|
3185
|
-
case 134: /* 2012 */
|
|
3186
|
-
shapeCoordinates.pentagon_tr_bt(cell, x0, x1, x2, x3, opt);
|
|
3187
|
-
break;
|
|
3188
|
-
|
|
3189
|
-
case 161: /* 2201 */
|
|
3190
|
-
shapeCoordinates.pentagon_rb_lr(cell, x0, x1, x2, x3, opt);
|
|
3191
|
-
break;
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
/* single hexagon cases */
|
|
3195
|
-
|
|
3196
|
-
case 37: /* 0211 */
|
|
3197
|
-
shapeCoordinates.hexagon_lt_tr(cell, x0, x1, x2, x3, opt);
|
|
3198
|
-
break;
|
|
3199
|
-
|
|
3200
|
-
case 148: /* 2110 */
|
|
3201
|
-
shapeCoordinates.hexagon_bl_lt(cell, x0, x1, x2, x3, opt);
|
|
3202
|
-
break;
|
|
3203
|
-
|
|
3204
|
-
case 82: /* 1102 */
|
|
3205
|
-
shapeCoordinates.hexagon_bl_rb(cell, x0, x1, x2, x3, opt);
|
|
3206
|
-
break;
|
|
3207
|
-
|
|
3208
|
-
case 73: /* 1021 */
|
|
3209
|
-
shapeCoordinates.hexagon_tr_rb(cell, x0, x1, x2, x3, opt);
|
|
3210
|
-
break;
|
|
3211
|
-
|
|
3212
|
-
case 133: /* 2011 */
|
|
3213
|
-
shapeCoordinates.hexagon_lt_tr(cell, x0, x1, x2, x3, opt);
|
|
3214
|
-
break;
|
|
3215
|
-
|
|
3216
|
-
case 22: /* 0112 */
|
|
3217
|
-
shapeCoordinates.hexagon_bl_lt(cell, x0, x1, x2, x3, opt);
|
|
3218
|
-
break;
|
|
3219
|
-
|
|
3220
|
-
case 88: /* 1120 */
|
|
3221
|
-
shapeCoordinates.hexagon_bl_rb(cell, x0, x1, x2, x3, opt);
|
|
3222
|
-
break;
|
|
3223
|
-
|
|
3224
|
-
case 97: /* 1201 */
|
|
3225
|
-
shapeCoordinates.hexagon_tr_rb(cell, x0, x1, x2, x3, opt);
|
|
3226
|
-
break;
|
|
3227
|
-
|
|
3228
|
-
case 145: /* 2101 */
|
|
3229
|
-
shapeCoordinates.hexagon_lt_rb(cell, x0, x1, x2, x3, opt);
|
|
3230
|
-
break;
|
|
3231
|
-
|
|
3232
|
-
case 25: /* 0121 */
|
|
3233
|
-
shapeCoordinates.hexagon_lt_rb(cell, x0, x1, x2, x3, opt);
|
|
3234
|
-
break;
|
|
3235
|
-
|
|
3236
|
-
case 70: /* 1012 */
|
|
3237
|
-
shapeCoordinates.hexagon_bl_tr(cell, x0, x1, x2, x3, opt);
|
|
3238
|
-
break;
|
|
3239
|
-
|
|
3240
|
-
case 100: /* 1210 */
|
|
3241
|
-
shapeCoordinates.hexagon_bl_tr(cell, x0, x1, x2, x3, opt);
|
|
3242
|
-
break;
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
/* 6-sided saddles */
|
|
3246
|
-
|
|
3247
|
-
case 17: /* 0101 */
|
|
3248
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3249
|
-
/* should never be center_avg === 2 */
|
|
3250
|
-
if (center_avg === 0) {
|
|
3251
|
-
shapeCoordinates.triangle_bl(cell, x0, x1, x2, x3, opt);
|
|
3252
|
-
shapeCoordinates.triangle_tr(cell, x0, x1, x2, x3, opt);
|
|
3253
|
-
} else {
|
|
3254
|
-
shapeCoordinates.hexagon_lt_rb(cell, x0, x1, x2, x3, opt);
|
|
3255
|
-
}
|
|
3256
|
-
break;
|
|
3257
|
-
|
|
3258
|
-
case 68: /* 1010 */
|
|
3259
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3260
|
-
/* should never be center_avg === 2 */
|
|
3261
|
-
if (center_avg === 0) {
|
|
3262
|
-
shapeCoordinates.triangle_tl(cell, x0, x1, x2, x3, opt);
|
|
3263
|
-
shapeCoordinates.triangle_br(cell, x0, x1, x2, x3, opt);
|
|
3264
|
-
} else {
|
|
3265
|
-
shapeCoordinates.hexagon_bl_tr(cell, x0, x1, x2, x3, opt);
|
|
3266
|
-
}
|
|
3267
|
-
break;
|
|
3268
|
-
|
|
3269
|
-
case 153: /* 2121 */
|
|
3270
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3271
|
-
/* should never be center_avg === 0 */
|
|
3272
|
-
if (center_avg === 2) {
|
|
3273
|
-
shapeCoordinates.triangle_bl(cell, x0, x1, x2, x3, opt);
|
|
3274
|
-
shapeCoordinates.triangle_tr(cell, x0, x1, x2, x3, opt);
|
|
3275
|
-
} else {
|
|
3276
|
-
shapeCoordinates.hexagon_lt_rb(cell, x0, x1, x2, x3, opt);
|
|
3277
|
-
}
|
|
3278
|
-
break;
|
|
3279
|
-
|
|
3280
|
-
case 102: /* 1212 */
|
|
3281
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3282
|
-
/* should never be center_avg === 0 */
|
|
3283
|
-
if (center_avg === 2) {
|
|
3284
|
-
shapeCoordinates.triangle_tl(cell, x0, x1, x2, x3, opt);
|
|
3285
|
-
shapeCoordinates.triangle_br(cell, x0, x1, x2, x3, opt);
|
|
3286
|
-
} else {
|
|
3287
|
-
shapeCoordinates.hexagon_bl_tr(cell, x0, x1, x2, x3, opt);
|
|
3288
|
-
}
|
|
3289
|
-
break;
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
/* 7-sided saddles */
|
|
3293
|
-
|
|
3294
|
-
case 152: /* 2120 */
|
|
3295
|
-
|
|
3296
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3297
|
-
/* should never be center_avg === 0 */
|
|
3298
|
-
if (center_avg === 2) {
|
|
3299
|
-
shapeCoordinates.triangle_tr(cell, x0, x1, x2, x3, opt);
|
|
3300
|
-
shapeCoordinates.tetragon_bl(cell, x0, x1, x2, x3, opt);
|
|
3301
|
-
} else {
|
|
3302
|
-
shapeCoordinates.heptagon_tr(cell, x0, x1, x2, x3, opt);
|
|
3303
|
-
}
|
|
3304
|
-
break;
|
|
3305
|
-
|
|
3306
|
-
case 137: /* 2021 */
|
|
3307
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3308
|
-
/* should never be center_avg === 0 */
|
|
3309
|
-
if (center_avg === 2) {
|
|
3310
|
-
shapeCoordinates.triangle_bl(cell, x0, x1, x2, x3, opt);
|
|
3311
|
-
shapeCoordinates.tetragon_tr(cell, x0, x1, x2, x3, opt);
|
|
3312
|
-
} else {
|
|
3313
|
-
shapeCoordinates.heptagon_bl(cell, x0, x1, x2, x3, opt);
|
|
3314
|
-
}
|
|
3315
|
-
break;
|
|
3316
|
-
|
|
3317
|
-
case 98: /* 1202 */
|
|
3318
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3319
|
-
/* should never be center_avg === 0 */
|
|
3320
|
-
if (center_avg === 2) {
|
|
3321
|
-
shapeCoordinates.triangle_tl(cell, x0, x1, x2, x3, opt);
|
|
3322
|
-
shapeCoordinates.tetragon_br(cell, x0, x1, x2, x3, opt);
|
|
3323
|
-
} else {
|
|
3324
|
-
shapeCoordinates.heptagon_tl(cell, x0, x1, x2, x3, opt);
|
|
3325
|
-
}
|
|
3326
|
-
break;
|
|
3327
|
-
|
|
3328
|
-
case 38: /* 0212 */
|
|
3329
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3330
|
-
/* should never be center_avg === 0 */
|
|
3331
|
-
if (center_avg === 2) {
|
|
3332
|
-
shapeCoordinates.triangle_br(cell, x0, x1, x2, x3, opt);
|
|
3333
|
-
shapeCoordinates.tetragon_tl(cell, x0, x1, x2, x3, opt);
|
|
3334
|
-
} else {
|
|
3335
|
-
shapeCoordinates.heptagon_br(cell, x0, x1, x2, x3, opt);
|
|
3336
|
-
}
|
|
3337
|
-
break;
|
|
3338
|
-
|
|
3339
|
-
case 18: /* 0102 */
|
|
3340
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3341
|
-
/* should never be center_avg === 2 */
|
|
3342
|
-
if (center_avg === 0) {
|
|
3343
|
-
shapeCoordinates.triangle_tr(cell, x0, x1, x2, x3, opt);
|
|
3344
|
-
shapeCoordinates.tetragon_bl(cell, x0, x1, x2, x3, opt);
|
|
3345
|
-
} else {
|
|
3346
|
-
shapeCoordinates.heptagon_tr(cell, x0, x1, x2, x3, opt);
|
|
3347
|
-
}
|
|
3348
|
-
break;
|
|
3349
|
-
|
|
3350
|
-
case 33: /* 0201 */
|
|
3351
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3352
|
-
/* should never be center_avg === 2 */
|
|
3353
|
-
if (center_avg === 0) {
|
|
3354
|
-
shapeCoordinates.triangle_bl(cell, x0, x1, x2, x3, opt);
|
|
3355
|
-
shapeCoordinates.tetragon_tr(cell, x0, x1, x2, x3, opt);
|
|
3356
|
-
} else {
|
|
3357
|
-
shapeCoordinates.heptagon_bl(cell, x0, x1, x2, x3, opt);
|
|
3358
|
-
}
|
|
3359
|
-
break;
|
|
3360
|
-
|
|
3361
|
-
case 72: /* 1020 */
|
|
3362
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3363
|
-
/* should never be center_avg === 2 */
|
|
3364
|
-
if (center_avg === 0) {
|
|
3365
|
-
shapeCoordinates.triangle_tl(cell, x0, x1, x2, x3, opt);
|
|
3366
|
-
shapeCoordinates.tetragon_br(cell, x0, x1, x2, x3, opt);
|
|
3367
|
-
} else {
|
|
3368
|
-
shapeCoordinates.heptagon_tl(cell, x0, x1, x2, x3, opt);
|
|
3369
|
-
}
|
|
3370
|
-
break;
|
|
3371
|
-
|
|
3372
|
-
case 132: /* 2010 */
|
|
3373
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3374
|
-
/* should never be center_avg === 2 */
|
|
3375
|
-
if (center_avg === 0) {
|
|
3376
|
-
shapeCoordinates.triangle_br(cell, x0, x1, x2, x3, opt);
|
|
3377
|
-
shapeCoordinates.tetragon_tl(cell, x0, x1, x2, x3, opt);
|
|
3378
|
-
} else {
|
|
3379
|
-
shapeCoordinates.heptagon_br(cell, x0, x1, x2, x3, opt);
|
|
3380
|
-
}
|
|
3381
|
-
break;
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
/* 8-sided saddles */
|
|
3385
|
-
|
|
3386
|
-
case 136: /* 2020 */
|
|
3387
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3388
|
-
if (center_avg === 0) {
|
|
3389
|
-
shapeCoordinates.tetragon_tl(cell, x0, x1, x2, x3, opt);
|
|
3390
|
-
shapeCoordinates.tetragon_br(cell, x0, x1, x2, x3, opt);
|
|
3391
|
-
} else if (center_avg === 1) {
|
|
3392
|
-
shapeCoordinates.octagon(cell, x0, x1, x2, x3, opt);
|
|
3393
|
-
} else {
|
|
3394
|
-
shapeCoordinates.tetragon_bl(cell, x0, x1, x2, x3, opt);
|
|
3395
|
-
shapeCoordinates.tetragon_tr(cell, x0, x1, x2, x3, opt);
|
|
3396
|
-
}
|
|
3397
|
-
break;
|
|
3398
|
-
|
|
3399
|
-
case 34: /* 0202 */
|
|
3400
|
-
center_avg = computeCenterAverage(x0, x1, x2, x3, minV, maxV);
|
|
3401
|
-
if (center_avg === 0) {
|
|
3402
|
-
shapeCoordinates.tetragon_bl(cell, x0, x1, x2, x3, opt);
|
|
3403
|
-
shapeCoordinates.tetragon_tr(cell, x0, x1, x2, x3, opt);
|
|
3404
|
-
} else if (center_avg === 1) {
|
|
3405
|
-
shapeCoordinates.octagon(cell, x0, x1, x2, x3, opt);
|
|
3406
|
-
} else {
|
|
3407
|
-
shapeCoordinates.tetragon_tl(cell, x0, x1, x2, x3, opt);
|
|
3408
|
-
shapeCoordinates.tetragon_br(cell, x0, x1, x2, x3, opt);
|
|
3409
|
-
}
|
|
3410
|
-
break;
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
return cell;
|
|
3414
|
-
}
|
|
3415
|
-
|
|
3416
|
-
exports.isoLines = isoLines;
|
|
3417
|
-
exports.isoContours = isoLines;
|
|
3418
|
-
exports.isoBands = isoBands;
|
|
3419
|
-
exports.QuadTree = QuadTree;
|
|
3420
|
-
exports.quadTree = QuadTree;
|
|
3421
|
-
|
|
3422
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3423
|
-
|
|
3424
|
-
})));
|