node-red-contrib-tak-registration 0.2.2 → 0.3.2
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/README.md +17 -7
- package/node_modules/@turf/along/LICENSE +20 -0
- package/node_modules/@turf/along/README.md +69 -0
- package/node_modules/@turf/along/dist/es/index.js +50 -0
- package/node_modules/@turf/along/dist/es/package.json +1 -0
- package/node_modules/@turf/along/dist/js/index.d.ts +22 -0
- package/node_modules/@turf/along/dist/js/index.js +56 -0
- package/node_modules/@turf/along/package.json +95 -0
- package/node_modules/@turf/angle/LICENSE +20 -0
- package/node_modules/@turf/angle/README.md +64 -0
- package/node_modules/@turf/angle/dist/es/index.js +50 -0
- package/node_modules/@turf/angle/dist/es/package.json +1 -0
- package/node_modules/@turf/angle/dist/js/index.d.ts +22 -0
- package/node_modules/@turf/angle/dist/js/index.js +55 -0
- package/node_modules/@turf/angle/package.json +102 -0
- package/node_modules/@turf/area/LICENSE +20 -0
- package/node_modules/@turf/area/README.md +54 -0
- package/node_modules/@turf/area/dist/es/index.js +114 -0
- package/node_modules/@turf/area/dist/es/package.json +1 -0
- package/node_modules/@turf/area/dist/js/index.d.ts +17 -0
- package/node_modules/@turf/area/dist/js/index.js +117 -0
- package/node_modules/@turf/area/package.json +94 -0
- package/node_modules/@turf/bbox/LICENSE +20 -0
- package/node_modules/@turf/bbox/README.md +53 -0
- package/node_modules/@turf/bbox/dist/es/index.js +35 -0
- package/node_modules/@turf/bbox/dist/es/package.json +1 -0
- package/node_modules/@turf/bbox/dist/js/index.d.ts +17 -0
- package/node_modules/@turf/bbox/dist/js/index.js +37 -0
- package/node_modules/@turf/bbox/package.json +108 -0
- package/node_modules/@turf/bbox-clip/LICENSE +20 -0
- package/node_modules/@turf/bbox-clip/README.md +68 -0
- package/node_modules/@turf/bbox-clip/dist/es/index.js +68 -0
- package/node_modules/@turf/bbox-clip/dist/es/lib/lineclip.js +107 -0
- package/node_modules/@turf/bbox-clip/dist/es/package.json +1 -0
- package/node_modules/@turf/bbox-clip/dist/js/index.d.ts +20 -0
- package/node_modules/@turf/bbox-clip/dist/js/index.js +71 -0
- package/node_modules/@turf/bbox-clip/dist/js/lib/lineclip.d.ts +3 -0
- package/node_modules/@turf/bbox-clip/dist/js/lib/lineclip.js +111 -0
- package/node_modules/@turf/bbox-clip/package.json +108 -0
- package/node_modules/@turf/bbox-polygon/LICENSE +20 -0
- package/node_modules/@turf/bbox-polygon/README.md +66 -0
- package/node_modules/@turf/bbox-polygon/dist/es/index.js +36 -0
- package/node_modules/@turf/bbox-polygon/dist/es/package.json +1 -0
- package/node_modules/@turf/bbox-polygon/dist/js/index.d.ts +22 -0
- package/node_modules/@turf/bbox-polygon/dist/js/index.js +39 -0
- package/node_modules/@turf/bbox-polygon/package.json +92 -0
- package/node_modules/@turf/bearing/LICENSE +20 -0
- package/node_modules/@turf/bearing/README.md +67 -0
- package/node_modules/@turf/bearing/dist/es/index.js +57 -0
- package/node_modules/@turf/bearing/dist/es/package.json +1 -0
- package/node_modules/@turf/bearing/dist/js/index.d.ts +26 -0
- package/node_modules/@turf/bearing/dist/js/index.js +60 -0
- package/node_modules/@turf/bearing/package.json +96 -0
- package/node_modules/@turf/bezier-spline/LICENSE +20 -0
- package/node_modules/@turf/bezier-spline/README.md +79 -0
- package/node_modules/@turf/bezier-spline/dist/es/index.js +60 -0
- package/node_modules/@turf/bezier-spline/dist/es/lib/spline.js +158 -0
- package/node_modules/@turf/bezier-spline/dist/es/package.json +1 -0
- package/node_modules/@turf/bezier-spline/dist/js/index.d.ts +37 -0
- package/node_modules/@turf/bezier-spline/dist/js/index.js +65 -0
- package/node_modules/@turf/bezier-spline/dist/js/lib/spline.d.ts +62 -0
- package/node_modules/@turf/bezier-spline/dist/js/lib/spline.js +160 -0
- package/node_modules/@turf/bezier-spline/package.json +93 -0
- package/node_modules/@turf/boolean-clockwise/LICENSE +20 -0
- package/node_modules/@turf/boolean-clockwise/README.md +60 -0
- package/node_modules/@turf/boolean-clockwise/dist/es/index.js +30 -0
- package/node_modules/@turf/boolean-clockwise/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-clockwise/dist/js/index.d.ts +17 -0
- package/node_modules/@turf/boolean-clockwise/dist/js/index.js +33 -0
- package/node_modules/@turf/boolean-clockwise/package.json +110 -0
- package/node_modules/@turf/boolean-contains/LICENSE +20 -0
- package/node_modules/@turf/boolean-contains/README.md +63 -0
- package/node_modules/@turf/boolean-contains/dist/es/index.js +225 -0
- package/node_modules/@turf/boolean-contains/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-contains/dist/js/index.d.ts +46 -0
- package/node_modules/@turf/boolean-contains/dist/js/index.js +241 -0
- package/node_modules/@turf/boolean-contains/package.json +107 -0
- package/node_modules/@turf/boolean-crosses/LICENSE +20 -0
- package/node_modules/@turf/boolean-crosses/README.md +64 -0
- package/node_modules/@turf/boolean-crosses/dist/es/index.js +166 -0
- package/node_modules/@turf/boolean-crosses/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-crosses/dist/js/index.d.ts +21 -0
- package/node_modules/@turf/boolean-crosses/dist/js/index.js +171 -0
- package/node_modules/@turf/boolean-crosses/package.json +106 -0
- package/node_modules/@turf/boolean-disjoint/LICENSE +20 -0
- package/node_modules/@turf/boolean-disjoint/README.md +60 -0
- package/node_modules/@turf/boolean-disjoint/dist/es/index.js +168 -0
- package/node_modules/@turf/boolean-disjoint/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-disjoint/dist/js/index.d.ts +17 -0
- package/node_modules/@turf/boolean-disjoint/dist/js/index.js +173 -0
- package/node_modules/@turf/boolean-disjoint/package.json +106 -0
- package/node_modules/@turf/boolean-equal/LICENSE +20 -0
- package/node_modules/@turf/boolean-equal/README.md +66 -0
- package/node_modules/@turf/boolean-equal/dist/es/index.js +30 -0
- package/node_modules/@turf/boolean-equal/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-equal/dist/js/index.d.ts +21 -0
- package/node_modules/@turf/boolean-equal/dist/js/index.js +35 -0
- package/node_modules/@turf/boolean-equal/package.json +112 -0
- package/node_modules/@turf/boolean-intersects/LICENSE +20 -0
- package/node_modules/@turf/boolean-intersects/README.md +55 -0
- package/node_modules/@turf/boolean-intersects/dist/es/index.js +28 -0
- package/node_modules/@turf/boolean-intersects/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-intersects/dist/js/index.d.ts +16 -0
- package/node_modules/@turf/boolean-intersects/dist/js/index.js +34 -0
- package/node_modules/@turf/boolean-intersects/package.json +104 -0
- package/node_modules/@turf/boolean-overlap/LICENSE +20 -0
- package/node_modules/@turf/boolean-overlap/README.md +73 -0
- package/node_modules/@turf/boolean-overlap/dist/es/index.js +80 -0
- package/node_modules/@turf/boolean-overlap/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-overlap/dist/js/index.d.ts +23 -0
- package/node_modules/@turf/boolean-overlap/dist/js/index.js +86 -0
- package/node_modules/@turf/boolean-overlap/package.json +110 -0
- package/node_modules/@turf/boolean-parallel/LICENSE +20 -0
- package/node_modules/@turf/boolean-parallel/README.md +57 -0
- package/node_modules/@turf/boolean-parallel/dist/es/index.js +71 -0
- package/node_modules/@turf/boolean-parallel/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-parallel/dist/js/index.d.ts +17 -0
- package/node_modules/@turf/boolean-parallel/dist/js/index.js +76 -0
- package/node_modules/@turf/boolean-parallel/package.json +100 -0
- package/node_modules/@turf/boolean-point-in-polygon/LICENSE +20 -0
- package/node_modules/@turf/boolean-point-in-polygon/README.md +76 -0
- package/node_modules/@turf/boolean-point-in-polygon/dist/es/index.js +115 -0
- package/node_modules/@turf/boolean-point-in-polygon/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-point-in-polygon/dist/js/index.d.ts +28 -0
- package/node_modules/@turf/boolean-point-in-polygon/dist/js/index.js +118 -0
- package/node_modules/@turf/boolean-point-in-polygon/package.json +104 -0
- package/node_modules/@turf/boolean-point-on-line/LICENSE +20 -0
- package/node_modules/@turf/boolean-point-on-line/README.md +60 -0
- package/node_modules/@turf/boolean-point-on-line/dist/es/index.js +102 -0
- package/node_modules/@turf/boolean-point-on-line/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-point-on-line/dist/js/index.d.ts +23 -0
- package/node_modules/@turf/boolean-point-on-line/dist/js/index.js +104 -0
- package/node_modules/@turf/boolean-point-on-line/package.json +100 -0
- package/node_modules/@turf/boolean-within/LICENSE +20 -0
- package/node_modules/@turf/boolean-within/README.md +58 -0
- package/node_modules/@turf/boolean-within/dist/es/index.js +215 -0
- package/node_modules/@turf/boolean-within/dist/es/package.json +1 -0
- package/node_modules/@turf/boolean-within/dist/js/index.d.ts +20 -0
- package/node_modules/@turf/boolean-within/dist/js/index.js +220 -0
- package/node_modules/@turf/boolean-within/package.json +108 -0
- package/node_modules/@turf/buffer/LICENSE +20 -0
- package/node_modules/@turf/buffer/README.md +76 -0
- package/node_modules/@turf/buffer/dist/es/index.js +175 -0
- package/node_modules/@turf/buffer/dist/es/package.json +1 -0
- package/node_modules/@turf/buffer/dist/js/index.js +182 -0
- package/node_modules/@turf/buffer/index.d.ts +61 -0
- package/node_modules/@turf/buffer/package.json +112 -0
- package/node_modules/@turf/center/LICENSE +20 -0
- package/node_modules/@turf/center/README.md +71 -0
- package/node_modules/@turf/center/dist/es/index.js +34 -0
- package/node_modules/@turf/center/dist/es/package.json +1 -0
- package/node_modules/@turf/center/dist/js/index.d.ts +31 -0
- package/node_modules/@turf/center/dist/js/index.js +39 -0
- package/node_modules/@turf/center/package.json +101 -0
- package/node_modules/@turf/center-mean/LICENSE +20 -0
- package/node_modules/@turf/center-mean/README.md +75 -0
- package/node_modules/@turf/center-mean/dist/es/index.js +51 -0
- package/node_modules/@turf/center-mean/dist/es/package.json +1 -0
- package/node_modules/@turf/center-mean/dist/js/index.d.ts +35 -0
- package/node_modules/@turf/center-mean/dist/js/index.js +53 -0
- package/node_modules/@turf/center-mean/package.json +108 -0
- package/node_modules/@turf/center-median/LICENSE +20 -0
- package/node_modules/@turf/center-median/README.md +103 -0
- package/node_modules/@turf/center-median/dist/es/index.js +135 -0
- package/node_modules/@turf/center-median/dist/es/package.json +1 -0
- package/node_modules/@turf/center-median/dist/js/index.d.ts +62 -0
- package/node_modules/@turf/center-median/dist/js/index.js +140 -0
- package/node_modules/@turf/center-median/package.json +103 -0
- package/node_modules/@turf/center-of-mass/LICENSE +20 -0
- package/node_modules/@turf/center-of-mass/README.md +67 -0
- package/node_modules/@turf/center-of-mass/dist/es/index.js +81 -0
- package/node_modules/@turf/center-of-mass/dist/es/package.json +1 -0
- package/node_modules/@turf/center-of-mass/dist/js/index.d.ts +21 -0
- package/node_modules/@turf/center-of-mass/dist/js/index.js +86 -0
- package/node_modules/@turf/center-of-mass/package.json +95 -0
- package/node_modules/@turf/centroid/LICENSE +20 -0
- package/node_modules/@turf/centroid/README.md +62 -0
- package/node_modules/@turf/centroid/dist/es/index.js +32 -0
- package/node_modules/@turf/centroid/dist/es/package.json +1 -0
- package/node_modules/@turf/centroid/dist/js/index.d.ts +22 -0
- package/node_modules/@turf/centroid/dist/js/index.js +34 -0
- package/node_modules/@turf/centroid/package.json +101 -0
- package/node_modules/@turf/circle/LICENSE +20 -0
- package/node_modules/@turf/circle/README.md +71 -0
- package/node_modules/@turf/circle/dist/es/index.js +41 -0
- package/node_modules/@turf/circle/dist/es/package.json +1 -0
- package/node_modules/@turf/circle/dist/js/index.d.ts +27 -0
- package/node_modules/@turf/circle/dist/js/index.js +46 -0
- package/node_modules/@turf/circle/package.json +99 -0
- package/node_modules/@turf/clean-coords/LICENSE +20 -0
- package/node_modules/@turf/clean-coords/README.md +61 -0
- package/node_modules/@turf/clean-coords/dist/es/index.js +159 -0
- package/node_modules/@turf/clean-coords/dist/es/package.json +1 -0
- package/node_modules/@turf/clean-coords/dist/js/index.d.ts +22 -0
- package/node_modules/@turf/clean-coords/dist/js/index.js +161 -0
- package/node_modules/@turf/clean-coords/package.json +103 -0
- package/node_modules/@turf/clone/LICENSE +20 -0
- package/node_modules/@turf/clone/README.md +49 -0
- package/node_modules/@turf/clone/dist/es/index.js +157 -0
- package/node_modules/@turf/clone/dist/es/package.json +1 -0
- package/node_modules/@turf/clone/dist/js/index.d.ts +15 -0
- package/node_modules/@turf/clone/dist/js/index.js +159 -0
- package/node_modules/@turf/clone/package.json +109 -0
- package/node_modules/@turf/clusters/LICENSE +20 -0
- package/node_modules/@turf/clusters/README.md +208 -0
- package/node_modules/@turf/clusters/dist/es/index.js +294 -0
- package/node_modules/@turf/clusters/dist/es/package.json +1 -0
- package/node_modules/@turf/clusters/dist/js/index.d.ts +197 -0
- package/node_modules/@turf/clusters/dist/js/index.js +303 -0
- package/node_modules/@turf/clusters/package.json +98 -0
- package/node_modules/@turf/clusters-dbscan/LICENSE +20 -0
- package/node_modules/@turf/clusters-dbscan/README.md +73 -0
- package/node_modules/@turf/clusters-dbscan/dist/es/index.js +70 -0
- package/node_modules/@turf/clusters-dbscan/dist/es/package.json +1 -0
- package/node_modules/@turf/clusters-dbscan/dist/js/index.d.ts +35 -0
- package/node_modules/@turf/clusters-dbscan/dist/js/index.js +75 -0
- package/node_modules/@turf/clusters-dbscan/package.json +118 -0
- package/node_modules/@turf/clusters-kmeans/LICENSE +20 -0
- package/node_modules/@turf/clusters-kmeans/README.md +69 -0
- package/node_modules/@turf/clusters-kmeans/dist/es/index.js +57 -0
- package/node_modules/@turf/clusters-kmeans/dist/es/package.json +1 -0
- package/node_modules/@turf/clusters-kmeans/dist/js/index.d.ts +31 -0
- package/node_modules/@turf/clusters-kmeans/dist/js/index.js +62 -0
- package/node_modules/@turf/clusters-kmeans/package.json +119 -0
- package/node_modules/@turf/collect/LICENSE +20 -0
- package/node_modules/@turf/collect/README.md +73 -0
- package/node_modules/@turf/collect/dist/es/index.js +68 -0
- package/node_modules/@turf/collect/dist/es/package.json +1 -0
- package/node_modules/@turf/collect/dist/js/index.d.ts +33 -0
- package/node_modules/@turf/collect/dist/js/index.js +73 -0
- package/node_modules/@turf/collect/node_modules/quickselect/LICENSE +15 -0
- package/node_modules/@turf/collect/node_modules/quickselect/README.md +28 -0
- package/node_modules/@turf/collect/node_modules/quickselect/index.js +54 -0
- package/node_modules/@turf/collect/node_modules/quickselect/package.json +69 -0
- package/node_modules/@turf/collect/node_modules/quickselect/quickselect.js +63 -0
- package/node_modules/@turf/collect/node_modules/rbush/LICENSE +21 -0
- package/node_modules/@turf/collect/node_modules/rbush/README.md +291 -0
- package/node_modules/@turf/collect/node_modules/rbush/index.js +562 -0
- package/node_modules/@turf/collect/node_modules/rbush/package.json +85 -0
- package/node_modules/@turf/collect/node_modules/rbush/rbush.js +626 -0
- package/node_modules/@turf/collect/node_modules/rbush/rbush.min.js +1 -0
- package/node_modules/@turf/collect/package.json +101 -0
- package/node_modules/@turf/combine/LICENSE +20 -0
- package/node_modules/@turf/combine/README.md +81 -0
- package/node_modules/@turf/combine/dist/es/index.js +79 -0
- package/node_modules/@turf/combine/dist/es/package.json +1 -0
- package/node_modules/@turf/combine/dist/js/index.d.ts +27 -0
- package/node_modules/@turf/combine/dist/js/index.js +81 -0
- package/node_modules/@turf/combine/package.json +91 -0
- package/node_modules/@turf/concave/LICENSE +20 -0
- package/node_modules/@turf/concave/README.md +81 -0
- package/node_modules/@turf/concave/dist/es/index.js +83 -0
- package/node_modules/@turf/concave/dist/es/lib/turf-dissolve.js +71 -0
- package/node_modules/@turf/concave/dist/es/lib/turf-line-dissolve.js +105 -0
- package/node_modules/@turf/concave/dist/es/lib/turf-polygon-dissolve.js +36 -0
- package/node_modules/@turf/concave/dist/es/package.json +1 -0
- package/node_modules/@turf/concave/dist/js/index.d.ts +33 -0
- package/node_modules/@turf/concave/dist/js/index.js +88 -0
- package/node_modules/@turf/concave/dist/js/lib/turf-dissolve.d.ts +15 -0
- package/node_modules/@turf/concave/dist/js/lib/turf-dissolve.js +76 -0
- package/node_modules/@turf/concave/dist/js/lib/turf-line-dissolve.d.ts +14 -0
- package/node_modules/@turf/concave/dist/js/lib/turf-line-dissolve.js +110 -0
- package/node_modules/@turf/concave/dist/js/lib/turf-polygon-dissolve.d.ts +12 -0
- package/node_modules/@turf/concave/dist/js/lib/turf-polygon-dissolve.js +42 -0
- package/node_modules/@turf/concave/package.json +138 -0
- package/node_modules/@turf/convex/LICENSE +20 -0
- package/node_modules/@turf/convex/README.md +83 -0
- package/node_modules/@turf/convex/dist/es/index.js +51 -0
- package/node_modules/@turf/convex/dist/es/package.json +1 -0
- package/node_modules/@turf/convex/dist/js/index.d.ts +33 -0
- package/node_modules/@turf/convex/dist/js/index.js +57 -0
- package/node_modules/@turf/convex/package.json +94 -0
- package/node_modules/@turf/destination/LICENSE +20 -0
- package/node_modules/@turf/destination/README.md +75 -0
- package/node_modules/@turf/destination/dist/es/index.js +47 -0
- package/node_modules/@turf/destination/dist/es/package.json +1 -0
- package/node_modules/@turf/destination/dist/js/index.d.ts +31 -0
- package/node_modules/@turf/destination/dist/js/index.js +50 -0
- package/node_modules/@turf/destination/package.json +102 -0
- package/node_modules/@turf/difference/LICENSE +20 -0
- package/node_modules/@turf/difference/README.md +77 -0
- package/node_modules/@turf/difference/dist/es/index.js +53 -0
- package/node_modules/@turf/difference/dist/es/package.json +1 -0
- package/node_modules/@turf/difference/dist/js/index.js +60 -0
- package/node_modules/@turf/difference/index.d.ts +9 -0
- package/node_modules/@turf/difference/package.json +88 -0
- package/node_modules/@turf/dissolve/LICENSE +20 -0
- package/node_modules/@turf/dissolve/README.md +96 -0
- package/node_modules/@turf/dissolve/dist/es/index.js +81 -0
- package/node_modules/@turf/dissolve/dist/es/package.json +1 -0
- package/node_modules/@turf/dissolve/dist/js/index.js +89 -0
- package/node_modules/@turf/dissolve/index.d.ts +11 -0
- package/node_modules/@turf/dissolve/package.json +91 -0
- package/node_modules/@turf/distance/LICENSE +20 -0
- package/node_modules/@turf/distance/README.md +69 -0
- package/node_modules/@turf/distance/dist/es/index.js +39 -0
- package/node_modules/@turf/distance/dist/es/package.json +1 -0
- package/node_modules/@turf/distance/dist/js/index.d.ts +27 -0
- package/node_modules/@turf/distance/dist/js/index.js +41 -0
- package/node_modules/@turf/distance/package.json +109 -0
- package/node_modules/@turf/distance-weight/LICENSE +20 -0
- package/node_modules/@turf/distance-weight/README.md +64 -0
- package/node_modules/@turf/distance-weight/dist/es/index.js +105 -0
- package/node_modules/@turf/distance-weight/dist/es/package.json +1 -0
- package/node_modules/@turf/distance-weight/dist/js/index.d.ts +37 -0
- package/node_modules/@turf/distance-weight/dist/js/index.js +112 -0
- package/node_modules/@turf/distance-weight/package.json +99 -0
- package/node_modules/@turf/ellipse/LICENSE +20 -0
- package/node_modules/@turf/ellipse/README.md +72 -0
- package/node_modules/@turf/ellipse/dist/es/index.js +104 -0
- package/node_modules/@turf/ellipse/dist/es/package.json +1 -0
- package/node_modules/@turf/ellipse/dist/js/index.js +112 -0
- package/node_modules/@turf/ellipse/index.d.ts +15 -0
- package/node_modules/@turf/ellipse/package.json +101 -0
- package/node_modules/@turf/envelope/LICENSE +20 -0
- package/node_modules/@turf/envelope/README.md +61 -0
- package/node_modules/@turf/envelope/dist/es/index.js +26 -0
- package/node_modules/@turf/envelope/dist/es/package.json +1 -0
- package/node_modules/@turf/envelope/dist/js/index.js +34 -0
- package/node_modules/@turf/envelope/index.d.ts +6 -0
- package/node_modules/@turf/envelope/package.json +90 -0
- package/node_modules/@turf/explode/LICENSE +20 -0
- package/node_modules/@turf/explode/README.md +59 -0
- package/node_modules/@turf/explode/dist/es/index.js +35 -0
- package/node_modules/@turf/explode/dist/es/package.json +1 -0
- package/node_modules/@turf/explode/dist/js/index.js +38 -0
- package/node_modules/@turf/explode/index.d.ts +6 -0
- package/node_modules/@turf/explode/package.json +92 -0
- package/node_modules/@turf/flatten/LICENSE +20 -0
- package/node_modules/@turf/flatten/README.md +63 -0
- package/node_modules/@turf/flatten/dist/es/index.js +32 -0
- package/node_modules/@turf/flatten/dist/es/package.json +1 -0
- package/node_modules/@turf/flatten/dist/js/index.js +35 -0
- package/node_modules/@turf/flatten/index.d.ts +27 -0
- package/node_modules/@turf/flatten/package.json +100 -0
- package/node_modules/@turf/flip/LICENSE +20 -0
- package/node_modules/@turf/flip/README.md +57 -0
- package/node_modules/@turf/flip/dist/es/index.js +42 -0
- package/node_modules/@turf/flip/dist/es/package.json +1 -0
- package/node_modules/@turf/flip/dist/js/index.js +49 -0
- package/node_modules/@turf/flip/index.d.ts +8 -0
- package/node_modules/@turf/flip/package.json +90 -0
- package/node_modules/@turf/great-circle/LICENSE +20 -0
- package/node_modules/@turf/great-circle/README.md +74 -0
- package/node_modules/@turf/great-circle/dist/es/index.js +333 -0
- package/node_modules/@turf/great-circle/dist/es/package.json +1 -0
- package/node_modules/@turf/great-circle/dist/js/index.js +336 -0
- package/node_modules/@turf/great-circle/index.d.ts +20 -0
- package/node_modules/@turf/great-circle/package.json +105 -0
- package/node_modules/@turf/helpers/LICENSE +20 -0
- package/node_modules/@turf/helpers/README.md +579 -0
- package/node_modules/@turf/helpers/dist/es/index.js +696 -0
- package/node_modules/@turf/helpers/dist/es/lib/geojson.js +7 -0
- package/node_modules/@turf/helpers/dist/es/package.json +1 -0
- package/node_modules/@turf/helpers/dist/js/index.d.ts +482 -0
- package/node_modules/@turf/helpers/dist/js/index.js +724 -0
- package/node_modules/@turf/helpers/dist/js/lib/geojson.d.ts +193 -0
- package/node_modules/@turf/helpers/dist/js/lib/geojson.js +9 -0
- package/node_modules/@turf/helpers/package.json +211 -0
- package/node_modules/@turf/hex-grid/LICENSE +20 -0
- package/node_modules/@turf/hex-grid/README.md +82 -0
- package/node_modules/@turf/hex-grid/dist/es/index.js +157 -0
- package/node_modules/@turf/hex-grid/dist/es/package.json +1 -0
- package/node_modules/@turf/hex-grid/dist/js/index.d.ts +33 -0
- package/node_modules/@turf/hex-grid/dist/js/index.js +162 -0
- package/node_modules/@turf/hex-grid/package.json +126 -0
- package/node_modules/@turf/interpolate/LICENSE +20 -0
- package/node_modules/@turf/interpolate/README.md +74 -0
- package/node_modules/@turf/interpolate/dist/es/index.js +107 -0
- package/node_modules/@turf/interpolate/dist/es/package.json +1 -0
- package/node_modules/@turf/interpolate/dist/js/index.js +121 -0
- package/node_modules/@turf/interpolate/index.d.ts +25 -0
- package/node_modules/@turf/interpolate/package.json +105 -0
- package/node_modules/@turf/intersect/LICENSE +20 -0
- package/node_modules/@turf/intersect/README.md +81 -0
- package/node_modules/@turf/intersect/dist/es/index.js +50 -0
- package/node_modules/@turf/intersect/dist/es/package.json +1 -0
- package/node_modules/@turf/intersect/dist/js/index.d.ts +40 -0
- package/node_modules/@turf/intersect/dist/js/index.js +56 -0
- package/node_modules/@turf/intersect/package.json +96 -0
- package/node_modules/@turf/invariant/LICENSE +20 -0
- package/node_modules/@turf/invariant/README.md +202 -0
- package/node_modules/@turf/invariant/dist/es/index.js +223 -0
- package/node_modules/@turf/invariant/dist/es/package.json +1 -0
- package/node_modules/@turf/invariant/dist/js/index.d.ts +105 -0
- package/node_modules/@turf/invariant/dist/js/index.js +233 -0
- package/node_modules/@turf/invariant/package.json +154 -0
- package/node_modules/@turf/isobands/LICENSE +20 -0
- package/node_modules/@turf/isobands/README.md +64 -0
- package/node_modules/@turf/isobands/dist/es/index.js +3793 -0
- package/node_modules/@turf/isobands/dist/es/package.json +1 -0
- package/node_modules/@turf/isobands/dist/js/index.js +3804 -0
- package/node_modules/@turf/isobands/index.d.ts +19 -0
- package/node_modules/@turf/isobands/package.json +110 -0
- package/node_modules/@turf/isolines/LICENSE +20 -0
- package/node_modules/@turf/isolines/README.md +86 -0
- package/node_modules/@turf/isolines/dist/es/index.js +647 -0
- package/node_modules/@turf/isolines/dist/es/package.json +1 -0
- package/node_modules/@turf/isolines/dist/js/index.js +655 -0
- package/node_modules/@turf/isolines/index.d.ts +19 -0
- package/node_modules/@turf/isolines/package.json +106 -0
- package/node_modules/@turf/kinks/LICENSE +20 -0
- package/node_modules/@turf/kinks/README.md +79 -0
- package/node_modules/@turf/kinks/dist/es/index.js +136 -0
- package/node_modules/@turf/kinks/dist/es/lib/sweepline-intersections.js +288 -0
- package/node_modules/@turf/kinks/dist/es/package.json +1 -0
- package/node_modules/@turf/kinks/dist/js/index.d.ts +24 -0
- package/node_modules/@turf/kinks/dist/js/index.js +139 -0
- package/node_modules/@turf/kinks/dist/js/lib/sweepline-intersections.d.ts +2 -0
- package/node_modules/@turf/kinks/dist/js/lib/sweepline-intersections.js +290 -0
- package/node_modules/@turf/kinks/package.json +90 -0
- package/node_modules/@turf/length/LICENSE +20 -0
- package/node_modules/@turf/length/README.md +67 -0
- package/node_modules/@turf/length/dist/es/index.js +26 -0
- package/node_modules/@turf/length/dist/es/package.json +1 -0
- package/node_modules/@turf/length/dist/js/index.d.ts +20 -0
- package/node_modules/@turf/length/dist/js/index.js +32 -0
- package/node_modules/@turf/length/package.json +106 -0
- package/node_modules/@turf/line-arc/LICENSE +20 -0
- package/node_modules/@turf/line-arc/README.md +71 -0
- package/node_modules/@turf/line-arc/dist/es/index.js +70 -0
- package/node_modules/@turf/line-arc/dist/es/package.json +1 -0
- package/node_modules/@turf/line-arc/dist/js/index.d.ts +29 -0
- package/node_modules/@turf/line-arc/dist/js/index.js +76 -0
- package/node_modules/@turf/line-arc/package.json +92 -0
- package/node_modules/@turf/line-chunk/LICENSE +20 -0
- package/node_modules/@turf/line-chunk/README.md +74 -0
- package/node_modules/@turf/line-chunk/dist/es/index.js +87 -0
- package/node_modules/@turf/line-chunk/dist/es/package.json +1 -0
- package/node_modules/@turf/line-chunk/dist/js/index.js +95 -0
- package/node_modules/@turf/line-chunk/index.d.ts +25 -0
- package/node_modules/@turf/line-chunk/package.json +111 -0
- package/node_modules/@turf/line-intersect/LICENSE +20 -0
- package/node_modules/@turf/line-intersect/README.md +66 -0
- package/node_modules/@turf/line-intersect/dist/es/index.js +107 -0
- package/node_modules/@turf/line-intersect/dist/es/package.json +1 -0
- package/node_modules/@turf/line-intersect/dist/js/index.d.ts +18 -0
- package/node_modules/@turf/line-intersect/dist/js/index.js +112 -0
- package/node_modules/@turf/line-intersect/package.json +112 -0
- package/node_modules/@turf/line-offset/LICENSE +20 -0
- package/node_modules/@turf/line-offset/README.md +69 -0
- package/node_modules/@turf/line-offset/dist/es/index.js +243 -0
- package/node_modules/@turf/line-offset/dist/es/package.json +1 -0
- package/node_modules/@turf/line-offset/dist/js/index.js +246 -0
- package/node_modules/@turf/line-offset/index.d.ts +12 -0
- package/node_modules/@turf/line-offset/package.json +105 -0
- package/node_modules/@turf/line-overlap/LICENSE +20 -0
- package/node_modules/@turf/line-overlap/README.md +71 -0
- package/node_modules/@turf/line-overlap/dist/es/index.js +128 -0
- package/node_modules/@turf/line-overlap/dist/es/package.json +1 -0
- package/node_modules/@turf/line-overlap/dist/js/index.d.ts +23 -0
- package/node_modules/@turf/line-overlap/dist/js/index.js +133 -0
- package/node_modules/@turf/line-overlap/package.json +108 -0
- package/node_modules/@turf/line-segment/LICENSE +20 -0
- package/node_modules/@turf/line-segment/README.md +68 -0
- package/node_modules/@turf/line-segment/dist/es/index.js +93 -0
- package/node_modules/@turf/line-segment/dist/es/package.json +1 -0
- package/node_modules/@turf/line-segment/dist/js/index.d.ts +17 -0
- package/node_modules/@turf/line-segment/dist/js/index.js +95 -0
- package/node_modules/@turf/line-segment/package.json +96 -0
- package/node_modules/@turf/line-slice/LICENSE +20 -0
- package/node_modules/@turf/line-slice/README.md +74 -0
- package/node_modules/@turf/line-slice/dist/es/index.js +60 -0
- package/node_modules/@turf/line-slice/dist/es/package.json +1 -0
- package/node_modules/@turf/line-slice/dist/js/index.js +67 -0
- package/node_modules/@turf/line-slice/index.d.ts +10 -0
- package/node_modules/@turf/line-slice/package.json +93 -0
- package/node_modules/@turf/line-slice-along/LICENSE +20 -0
- package/node_modules/@turf/line-slice-along/README.md +72 -0
- package/node_modules/@turf/line-slice-along/dist/es/index.js +87 -0
- package/node_modules/@turf/line-slice-along/dist/es/package.json +1 -0
- package/node_modules/@turf/line-slice-along/dist/js/index.js +96 -0
- package/node_modules/@turf/line-slice-along/index.d.ts +13 -0
- package/node_modules/@turf/line-slice-along/package.json +90 -0
- package/node_modules/@turf/line-split/LICENSE +20 -0
- package/node_modules/@turf/line-split/README.md +57 -0
- package/node_modules/@turf/line-split/dist/es/index.js +215 -0
- package/node_modules/@turf/line-split/dist/es/package.json +1 -0
- package/node_modules/@turf/line-split/dist/js/index.js +228 -0
- package/node_modules/@turf/line-split/index.d.ts +22 -0
- package/node_modules/@turf/line-split/package.json +103 -0
- package/node_modules/@turf/line-to-polygon/LICENSE +20 -0
- package/node_modules/@turf/line-to-polygon/README.md +69 -0
- package/node_modules/@turf/line-to-polygon/dist/es/index.js +130 -0
- package/node_modules/@turf/line-to-polygon/dist/es/package.json +1 -0
- package/node_modules/@turf/line-to-polygon/dist/js/index.d.ts +27 -0
- package/node_modules/@turf/line-to-polygon/dist/js/index.js +135 -0
- package/node_modules/@turf/line-to-polygon/package.json +102 -0
- package/node_modules/@turf/mask/LICENSE +20 -0
- package/node_modules/@turf/mask/README.md +74 -0
- package/node_modules/@turf/mask/dist/es/index.js +79 -0
- package/node_modules/@turf/mask/dist/es/package.json +1 -0
- package/node_modules/@turf/mask/dist/js/index.js +86 -0
- package/node_modules/@turf/mask/index.d.ts +14 -0
- package/node_modules/@turf/mask/package.json +89 -0
- package/node_modules/@turf/meta/LICENSE +20 -0
- package/node_modules/@turf/meta/README.md +858 -0
- package/node_modules/@turf/meta/dist/es/index.js +1401 -0
- package/node_modules/@turf/meta/dist/es/package.json +1 -0
- package/node_modules/@turf/meta/dist/js/index.js +1421 -0
- package/node_modules/@turf/meta/index.d.ts +301 -0
- package/node_modules/@turf/meta/package.json +169 -0
- package/node_modules/@turf/midpoint/LICENSE +20 -0
- package/node_modules/@turf/midpoint/README.md +61 -0
- package/node_modules/@turf/midpoint/dist/es/index.js +31 -0
- package/node_modules/@turf/midpoint/dist/es/package.json +1 -0
- package/node_modules/@turf/midpoint/dist/js/index.js +40 -0
- package/node_modules/@turf/midpoint/index.d.ts +6 -0
- package/node_modules/@turf/midpoint/package.json +89 -0
- package/node_modules/@turf/moran-index/LICENSE +20 -0
- package/node_modules/@turf/moran-index/README.md +107 -0
- package/node_modules/@turf/moran-index/dist/es/index.js +133 -0
- package/node_modules/@turf/moran-index/dist/es/package.json +1 -0
- package/node_modules/@turf/moran-index/dist/js/index.d.ts +63 -0
- package/node_modules/@turf/moran-index/dist/js/index.js +139 -0
- package/node_modules/@turf/moran-index/package.json +97 -0
- package/node_modules/@turf/nearest-point/LICENSE +20 -0
- package/node_modules/@turf/nearest-point/README.md +69 -0
- package/node_modules/@turf/nearest-point/dist/es/index.js +49 -0
- package/node_modules/@turf/nearest-point/dist/es/package.json +1 -0
- package/node_modules/@turf/nearest-point/dist/js/index.d.ts +34 -0
- package/node_modules/@turf/nearest-point/dist/js/index.js +54 -0
- package/node_modules/@turf/nearest-point/package.json +97 -0
- package/node_modules/@turf/nearest-point-on-line/LICENSE +20 -0
- package/node_modules/@turf/nearest-point-on-line/README.md +83 -0
- package/node_modules/@turf/nearest-point-on-line/dist/es/index.js +88 -0
- package/node_modules/@turf/nearest-point-on-line/dist/es/package.json +1 -0
- package/node_modules/@turf/nearest-point-on-line/dist/js/index.d.ts +39 -0
- package/node_modules/@turf/nearest-point-on-line/dist/js/index.js +93 -0
- package/node_modules/@turf/nearest-point-on-line/package.json +98 -0
- package/node_modules/@turf/nearest-point-to-line/LICENSE +20 -0
- package/node_modules/@turf/nearest-point-to-line/README.md +86 -0
- package/node_modules/@turf/nearest-point-to-line/dist/es/index.js +91 -0
- package/node_modules/@turf/nearest-point-to-line/dist/es/package.json +1 -0
- package/node_modules/@turf/nearest-point-to-line/dist/js/index.d.ts +32 -0
- package/node_modules/@turf/nearest-point-to-line/dist/js/index.js +96 -0
- package/node_modules/@turf/nearest-point-to-line/package.json +106 -0
- package/node_modules/@turf/planepoint/LICENSE +20 -0
- package/node_modules/@turf/planepoint/README.md +79 -0
- package/node_modules/@turf/planepoint/dist/es/index.js +77 -0
- package/node_modules/@turf/planepoint/dist/es/package.json +1 -0
- package/node_modules/@turf/planepoint/dist/js/index.js +80 -0
- package/node_modules/@turf/planepoint/index.d.ts +9 -0
- package/node_modules/@turf/planepoint/package.json +88 -0
- package/node_modules/@turf/point-grid/LICENSE +20 -0
- package/node_modules/@turf/point-grid/README.md +80 -0
- package/node_modules/@turf/point-grid/dist/es/index.js +72 -0
- package/node_modules/@turf/point-grid/dist/es/package.json +1 -0
- package/node_modules/@turf/point-grid/dist/js/index.d.ts +28 -0
- package/node_modules/@turf/point-grid/dist/js/index.js +77 -0
- package/node_modules/@turf/point-grid/package.json +108 -0
- package/node_modules/@turf/point-on-feature/LICENSE +20 -0
- package/node_modules/@turf/point-on-feature/README.md +73 -0
- package/node_modules/@turf/point-on-feature/dist/es/index.js +149 -0
- package/node_modules/@turf/point-on-feature/dist/es/package.json +1 -0
- package/node_modules/@turf/point-on-feature/dist/js/index.js +159 -0
- package/node_modules/@turf/point-on-feature/index.d.ts +6 -0
- package/node_modules/@turf/point-on-feature/package.json +93 -0
- package/node_modules/@turf/point-to-line-distance/LICENSE +20 -0
- package/node_modules/@turf/point-to-line-distance/README.md +71 -0
- package/node_modules/@turf/point-to-line-distance/dist/es/index.js +106 -0
- package/node_modules/@turf/point-to-line-distance/dist/es/package.json +1 -0
- package/node_modules/@turf/point-to-line-distance/dist/js/index.d.ts +26 -0
- package/node_modules/@turf/point-to-line-distance/dist/js/index.js +111 -0
- package/node_modules/@turf/point-to-line-distance/package.json +106 -0
- package/node_modules/@turf/points-within-polygon/LICENSE +20 -0
- package/node_modules/@turf/points-within-polygon/README.md +86 -0
- package/node_modules/@turf/points-within-polygon/dist/es/index.js +71 -0
- package/node_modules/@turf/points-within-polygon/dist/es/package.json +1 -0
- package/node_modules/@turf/points-within-polygon/dist/js/index.js +78 -0
- package/node_modules/@turf/points-within-polygon/index.d.ts +21 -0
- package/node_modules/@turf/points-within-polygon/package.json +90 -0
- package/node_modules/@turf/polygon-smooth/LICENSE +20 -0
- package/node_modules/@turf/polygon-smooth/README.md +70 -0
- package/node_modules/@turf/polygon-smooth/dist/es/index.js +162 -0
- package/node_modules/@turf/polygon-smooth/dist/es/package.json +1 -0
- package/node_modules/@turf/polygon-smooth/dist/js/index.js +165 -0
- package/node_modules/@turf/polygon-smooth/index.d.ts +16 -0
- package/node_modules/@turf/polygon-smooth/package.json +95 -0
- package/node_modules/@turf/polygon-tangents/LICENSE +20 -0
- package/node_modules/@turf/polygon-tangents/README.md +67 -0
- package/node_modules/@turf/polygon-tangents/dist/es/index.js +147 -0
- package/node_modules/@turf/polygon-tangents/dist/es/package.json +1 -0
- package/node_modules/@turf/polygon-tangents/dist/js/index.js +156 -0
- package/node_modules/@turf/polygon-tangents/index.d.ts +16 -0
- package/node_modules/@turf/polygon-tangents/package.json +104 -0
- package/node_modules/@turf/polygon-to-line/LICENSE +20 -0
- package/node_modules/@turf/polygon-to-line/README.md +71 -0
- package/node_modules/@turf/polygon-to-line/dist/es/index.js +75 -0
- package/node_modules/@turf/polygon-to-line/dist/es/package.json +1 -0
- package/node_modules/@turf/polygon-to-line/dist/js/index.d.ts +37 -0
- package/node_modules/@turf/polygon-to-line/dist/js/index.js +81 -0
- package/node_modules/@turf/polygon-to-line/package.json +95 -0
- package/node_modules/@turf/polygonize/LICENSE +20 -0
- package/node_modules/@turf/polygonize/README.md +69 -0
- package/node_modules/@turf/polygonize/dist/es/index.js +46 -0
- package/node_modules/@turf/polygonize/dist/es/lib/Edge.js +77 -0
- package/node_modules/@turf/polygonize/dist/es/lib/EdgeRing.js +199 -0
- package/node_modules/@turf/polygonize/dist/es/lib/Graph.js +302 -0
- package/node_modules/@turf/polygonize/dist/es/lib/Node.js +93 -0
- package/node_modules/@turf/polygonize/dist/es/lib/util.js +66 -0
- package/node_modules/@turf/polygonize/dist/es/package.json +1 -0
- package/node_modules/@turf/polygonize/dist/js/index.d.ts +20 -0
- package/node_modules/@turf/polygonize/dist/js/index.js +52 -0
- package/node_modules/@turf/polygonize/dist/js/lib/Edge.d.ts +55 -0
- package/node_modules/@turf/polygonize/dist/js/lib/Edge.js +79 -0
- package/node_modules/@turf/polygonize/dist/js/lib/EdgeRing.d.ts +122 -0
- package/node_modules/@turf/polygonize/dist/js/lib/EdgeRing.js +204 -0
- package/node_modules/@turf/polygonize/dist/js/lib/Graph.d.ts +124 -0
- package/node_modules/@turf/polygonize/dist/js/lib/Graph.js +307 -0
- package/node_modules/@turf/polygonize/dist/js/lib/Node.d.ts +40 -0
- package/node_modules/@turf/polygonize/dist/js/lib/Node.js +95 -0
- package/node_modules/@turf/polygonize/dist/js/lib/util.d.ts +46 -0
- package/node_modules/@turf/polygonize/dist/js/lib/util.js +75 -0
- package/node_modules/@turf/polygonize/package.json +105 -0
- package/node_modules/@turf/projection/LICENSE +20 -0
- package/node_modules/@turf/projection/README.md +78 -0
- package/node_modules/@turf/projection/dist/es/index.js +137 -0
- package/node_modules/@turf/projection/dist/es/package.json +1 -0
- package/node_modules/@turf/projection/dist/js/index.d.ts +37 -0
- package/node_modules/@turf/projection/dist/js/index.js +144 -0
- package/node_modules/@turf/projection/package.json +113 -0
- package/node_modules/@turf/random/LICENSE +20 -0
- package/node_modules/@turf/random/README.md +129 -0
- package/node_modules/@turf/random/dist/es/index.js +188 -0
- package/node_modules/@turf/random/dist/es/package.json +1 -0
- package/node_modules/@turf/random/dist/js/index.d.ts +72 -0
- package/node_modules/@turf/random/dist/js/index.js +194 -0
- package/node_modules/@turf/random/package.json +88 -0
- package/node_modules/@turf/rectangle-grid/LICENSE +20 -0
- package/node_modules/@turf/rectangle-grid/README.md +60 -0
- package/node_modules/@turf/rectangle-grid/dist/es/index.js +77 -0
- package/node_modules/@turf/rectangle-grid/dist/es/package.json +1 -0
- package/node_modules/@turf/rectangle-grid/dist/js/index.d.ts +32 -0
- package/node_modules/@turf/rectangle-grid/dist/js/index.js +82 -0
- package/node_modules/@turf/rectangle-grid/package.json +104 -0
- package/node_modules/@turf/rewind/LICENSE +20 -0
- package/node_modules/@turf/rewind/README.md +64 -0
- package/node_modules/@turf/rewind/dist/es/index.js +134 -0
- package/node_modules/@turf/rewind/dist/es/package.json +1 -0
- package/node_modules/@turf/rewind/dist/js/index.js +142 -0
- package/node_modules/@turf/rewind/index.d.ts +12 -0
- package/node_modules/@turf/rewind/package.json +110 -0
- package/node_modules/@turf/rhumb-bearing/LICENSE +20 -0
- package/node_modules/@turf/rhumb-bearing/README.md +66 -0
- package/node_modules/@turf/rhumb-bearing/dist/es/index.js +69 -0
- package/node_modules/@turf/rhumb-bearing/dist/es/package.json +1 -0
- package/node_modules/@turf/rhumb-bearing/dist/js/index.d.ts +26 -0
- package/node_modules/@turf/rhumb-bearing/dist/js/index.js +71 -0
- package/node_modules/@turf/rhumb-bearing/package.json +112 -0
- package/node_modules/@turf/rhumb-destination/LICENSE +20 -0
- package/node_modules/@turf/rhumb-destination/README.md +73 -0
- package/node_modules/@turf/rhumb-destination/dist/es/index.js +86 -0
- package/node_modules/@turf/rhumb-destination/dist/es/package.json +1 -0
- package/node_modules/@turf/rhumb-destination/dist/js/index.d.ts +30 -0
- package/node_modules/@turf/rhumb-destination/dist/js/index.js +88 -0
- package/node_modules/@turf/rhumb-destination/package.json +116 -0
- package/node_modules/@turf/rhumb-distance/LICENSE +20 -0
- package/node_modules/@turf/rhumb-distance/README.md +67 -0
- package/node_modules/@turf/rhumb-distance/dist/es/index.js +84 -0
- package/node_modules/@turf/rhumb-distance/dist/es/package.json +1 -0
- package/node_modules/@turf/rhumb-distance/dist/js/index.d.ts +27 -0
- package/node_modules/@turf/rhumb-distance/dist/js/index.js +86 -0
- package/node_modules/@turf/rhumb-distance/package.json +113 -0
- package/node_modules/@turf/sample/LICENSE +20 -0
- package/node_modules/@turf/sample/README.md +62 -0
- package/node_modules/@turf/sample/dist/es/index.js +50 -0
- package/node_modules/@turf/sample/dist/es/package.json +1 -0
- package/node_modules/@turf/sample/dist/js/index.js +53 -0
- package/node_modules/@turf/sample/index.d.ts +9 -0
- package/node_modules/@turf/sample/package.json +85 -0
- package/node_modules/@turf/sector/LICENSE +20 -0
- package/node_modules/@turf/sector/README.md +74 -0
- package/node_modules/@turf/sector/dist/es/index.js +75 -0
- package/node_modules/@turf/sector/dist/es/package.json +1 -0
- package/node_modules/@turf/sector/dist/js/index.js +83 -0
- package/node_modules/@turf/sector/index.d.ts +16 -0
- package/node_modules/@turf/sector/package.json +91 -0
- package/node_modules/@turf/shortest-path/LICENSE +20 -0
- package/node_modules/@turf/shortest-path/README.md +86 -0
- package/node_modules/@turf/shortest-path/dist/es/index.js +589 -0
- package/node_modules/@turf/shortest-path/dist/es/package.json +1 -0
- package/node_modules/@turf/shortest-path/dist/js/index.js +601 -0
- package/node_modules/@turf/shortest-path/index.d.ts +22 -0
- package/node_modules/@turf/shortest-path/package.json +106 -0
- package/node_modules/@turf/simplify/LICENSE +20 -0
- package/node_modules/@turf/simplify/README.md +87 -0
- package/node_modules/@turf/simplify/dist/es/index.js +300 -0
- package/node_modules/@turf/simplify/dist/es/package.json +1 -0
- package/node_modules/@turf/simplify/dist/js/index.js +308 -0
- package/node_modules/@turf/simplify/index.d.ts +13 -0
- package/node_modules/@turf/simplify/package.json +104 -0
- package/node_modules/@turf/square/LICENSE +20 -0
- package/node_modules/@turf/square/README.md +51 -0
- package/node_modules/@turf/square/dist/es/index.js +44 -0
- package/node_modules/@turf/square/dist/es/package.json +1 -0
- package/node_modules/@turf/square/dist/js/index.js +51 -0
- package/node_modules/@turf/square/index.d.ts +6 -0
- package/node_modules/@turf/square/package.json +87 -0
- package/node_modules/@turf/square-grid/LICENSE +20 -0
- package/node_modules/@turf/square-grid/README.md +58 -0
- package/node_modules/@turf/square-grid/dist/es/index.js +28 -0
- package/node_modules/@turf/square-grid/dist/es/package.json +1 -0
- package/node_modules/@turf/square-grid/dist/js/index.d.ts +29 -0
- package/node_modules/@turf/square-grid/dist/js/index.js +34 -0
- package/node_modules/@turf/square-grid/package.json +95 -0
- package/node_modules/@turf/standard-deviational-ellipse/LICENSE +20 -0
- package/node_modules/@turf/standard-deviational-ellipse/README.md +94 -0
- package/node_modules/@turf/standard-deviational-ellipse/dist/es/index.js +151 -0
- package/node_modules/@turf/standard-deviational-ellipse/dist/es/package.json +1 -0
- package/node_modules/@turf/standard-deviational-ellipse/dist/js/index.js +160 -0
- package/node_modules/@turf/standard-deviational-ellipse/index.d.ts +37 -0
- package/node_modules/@turf/standard-deviational-ellipse/package.json +101 -0
- package/node_modules/@turf/tag/LICENSE +20 -0
- package/node_modules/@turf/tag/README.md +70 -0
- package/node_modules/@turf/tag/dist/es/index.js +56 -0
- package/node_modules/@turf/tag/dist/es/package.json +1 -0
- package/node_modules/@turf/tag/dist/js/index.js +64 -0
- package/node_modules/@turf/tag/index.d.ts +11 -0
- package/node_modules/@turf/tag/package.json +93 -0
- package/node_modules/@turf/tesselate/LICENSE +20 -0
- package/node_modules/@turf/tesselate/README.md +61 -0
- package/node_modules/@turf/tesselate/dist/es/index.js +79 -0
- package/node_modules/@turf/tesselate/dist/es/package.json +1 -0
- package/node_modules/@turf/tesselate/dist/js/index.js +86 -0
- package/node_modules/@turf/tesselate/index.d.ts +6 -0
- package/node_modules/@turf/tesselate/package.json +106 -0
- package/node_modules/@turf/tin/LICENSE +20 -0
- package/node_modules/@turf/tin/README.md +79 -0
- package/node_modules/@turf/tin/dist/es/index.js +240 -0
- package/node_modules/@turf/tin/dist/es/package.json +1 -0
- package/node_modules/@turf/tin/dist/js/index.d.ts +44 -0
- package/node_modules/@turf/tin/dist/js/index.js +243 -0
- package/node_modules/@turf/tin/package.json +90 -0
- package/node_modules/@turf/transform-rotate/LICENSE +20 -0
- package/node_modules/@turf/transform-rotate/README.md +67 -0
- package/node_modules/@turf/transform-rotate/dist/es/index.js +62 -0
- package/node_modules/@turf/transform-rotate/dist/es/package.json +1 -0
- package/node_modules/@turf/transform-rotate/dist/js/index.js +73 -0
- package/node_modules/@turf/transform-rotate/index.d.ts +13 -0
- package/node_modules/@turf/transform-rotate/package.json +107 -0
- package/node_modules/@turf/transform-scale/LICENSE +20 -0
- package/node_modules/@turf/transform-scale/README.md +66 -0
- package/node_modules/@turf/transform-scale/dist/es/index.js +144 -0
- package/node_modules/@turf/transform-scale/dist/es/package.json +1 -0
- package/node_modules/@turf/transform-scale/dist/js/index.js +157 -0
- package/node_modules/@turf/transform-scale/index.d.ts +13 -0
- package/node_modules/@turf/transform-scale/package.json +115 -0
- package/node_modules/@turf/transform-translate/LICENSE +20 -0
- package/node_modules/@turf/transform-translate/README.md +66 -0
- package/node_modules/@turf/transform-translate/dist/es/index.js +72 -0
- package/node_modules/@turf/transform-translate/dist/es/package.json +1 -0
- package/node_modules/@turf/transform-translate/dist/js/index.js +80 -0
- package/node_modules/@turf/transform-translate/index.d.ts +15 -0
- package/node_modules/@turf/transform-translate/package.json +105 -0
- package/node_modules/@turf/triangle-grid/LICENSE +20 -0
- package/node_modules/@turf/triangle-grid/README.md +72 -0
- package/node_modules/@turf/triangle-grid/dist/es/index.js +139 -0
- package/node_modules/@turf/triangle-grid/dist/es/package.json +1 -0
- package/node_modules/@turf/triangle-grid/dist/js/index.d.ts +28 -0
- package/node_modules/@turf/triangle-grid/dist/js/index.js +144 -0
- package/node_modules/@turf/triangle-grid/package.json +99 -0
- package/node_modules/@turf/truncate/LICENSE +20 -0
- package/node_modules/@turf/truncate/README.md +66 -0
- package/node_modules/@turf/truncate/dist/es/index.js +76 -0
- package/node_modules/@turf/truncate/dist/es/package.json +1 -0
- package/node_modules/@turf/truncate/dist/js/index.d.ts +30 -0
- package/node_modules/@turf/truncate/dist/js/index.js +78 -0
- package/node_modules/@turf/truncate/package.json +100 -0
- package/node_modules/@turf/turf/LICENSE +20 -0
- package/node_modules/@turf/turf/README.md +31 -0
- package/node_modules/@turf/turf/dist/es/index.js +118 -0
- package/node_modules/@turf/turf/dist/es/package.json +1 -0
- package/node_modules/@turf/turf/dist/js/index.js +984 -0
- package/node_modules/@turf/turf/index.d.ts +146 -0
- package/node_modules/@turf/turf/package.json +216 -0
- package/node_modules/@turf/turf/turf.min.js +88 -0
- package/node_modules/@turf/union/LICENSE +20 -0
- package/node_modules/@turf/union/README.md +77 -0
- package/node_modules/@turf/union/dist/es/index.js +46 -0
- package/node_modules/@turf/union/dist/es/package.json +1 -0
- package/node_modules/@turf/union/dist/js/index.d.ts +35 -0
- package/node_modules/@turf/union/dist/js/index.js +51 -0
- package/node_modules/@turf/union/package.json +94 -0
- package/node_modules/@turf/unkink-polygon/LICENSE +20 -0
- package/node_modules/@turf/unkink-polygon/README.md +60 -0
- package/node_modules/@turf/unkink-polygon/dist/es/index.js +790 -0
- package/node_modules/@turf/unkink-polygon/dist/es/package.json +1 -0
- package/node_modules/@turf/unkink-polygon/dist/js/index.js +799 -0
- package/node_modules/@turf/unkink-polygon/index.d.ts +13 -0
- package/node_modules/@turf/unkink-polygon/node_modules/quickselect/LICENSE +15 -0
- package/node_modules/@turf/unkink-polygon/node_modules/quickselect/README.md +28 -0
- package/node_modules/@turf/unkink-polygon/node_modules/quickselect/index.js +54 -0
- package/node_modules/@turf/unkink-polygon/node_modules/quickselect/package.json +69 -0
- package/node_modules/@turf/unkink-polygon/node_modules/quickselect/quickselect.js +63 -0
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/LICENSE +21 -0
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/README.md +291 -0
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/index.js +562 -0
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/package.json +85 -0
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.js +626 -0
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.min.js +1 -0
- package/node_modules/@turf/unkink-polygon/package.json +94 -0
- package/node_modules/@turf/voronoi/LICENSE +20 -0
- package/node_modules/@turf/voronoi/README.md +68 -0
- package/node_modules/@turf/voronoi/dist/es/index.js +66 -0
- package/node_modules/@turf/voronoi/dist/es/package.json +1 -0
- package/node_modules/@turf/voronoi/dist/js/index.js +69 -0
- package/node_modules/@turf/voronoi/index.d.ts +9 -0
- package/node_modules/@turf/voronoi/package.json +109 -0
- package/node_modules/@types/geojson/LICENSE +21 -0
- package/node_modules/@types/geojson/README.md +16 -0
- package/node_modules/@types/geojson/index.d.ts +175 -0
- package/node_modules/@types/geojson/package.json +69 -0
- package/node_modules/call-bind/.eslintignore +1 -0
- package/node_modules/call-bind/.eslintrc +17 -0
- package/node_modules/call-bind/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind/.nycrc +13 -0
- package/node_modules/call-bind/CHANGELOG.md +42 -0
- package/node_modules/call-bind/LICENSE +21 -0
- package/node_modules/call-bind/README.md +2 -0
- package/node_modules/call-bind/callBound.js +15 -0
- package/node_modules/call-bind/index.js +47 -0
- package/node_modules/call-bind/package.json +111 -0
- package/node_modules/call-bind/test/callBound.js +55 -0
- package/node_modules/call-bind/test/index.js +66 -0
- package/node_modules/commander/CHANGELOG.md +419 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +428 -0
- package/node_modules/commander/index.js +1224 -0
- package/node_modules/commander/package.json +71 -0
- package/node_modules/commander/typings/index.d.ts +310 -0
- package/node_modules/concaveman/.travis.yml +4 -0
- package/node_modules/concaveman/LICENSE +15 -0
- package/node_modules/concaveman/README.md +52 -0
- package/node_modules/concaveman/index.js +383 -0
- package/node_modules/concaveman/package.json +69 -0
- package/node_modules/d3-array/.eslintrc.json +15 -0
- package/node_modules/d3-array/LICENSE +27 -0
- package/node_modules/d3-array/README.md +382 -0
- package/node_modules/d3-array/dist/d3-array.js +590 -0
- package/node_modules/d3-array/dist/d3-array.min.js +2 -0
- package/node_modules/d3-array/package.json +70 -0
- package/node_modules/d3-array/rollup.config.js +36 -0
- package/node_modules/d3-array/src/array.js +4 -0
- package/node_modules/d3-array/src/ascending.js +3 -0
- package/node_modules/d3-array/src/bisect.js +7 -0
- package/node_modules/d3-array/src/bisector.js +33 -0
- package/node_modules/d3-array/src/constant.js +5 -0
- package/node_modules/d3-array/src/cross.js +21 -0
- package/node_modules/d3-array/src/descending.js +3 -0
- package/node_modules/d3-array/src/deviation.js +6 -0
- package/node_modules/d3-array/src/extent.js +37 -0
- package/node_modules/d3-array/src/histogram.js +75 -0
- package/node_modules/d3-array/src/identity.js +3 -0
- package/node_modules/d3-array/src/index.js +27 -0
- package/node_modules/d3-array/src/max.js +34 -0
- package/node_modules/d3-array/src/mean.js +25 -0
- package/node_modules/d3-array/src/median.js +28 -0
- package/node_modules/d3-array/src/merge.js +21 -0
- package/node_modules/d3-array/src/min.js +34 -0
- package/node_modules/d3-array/src/number.js +3 -0
- package/node_modules/d3-array/src/pairs.js +10 -0
- package/node_modules/d3-array/src/permute.js +5 -0
- package/node_modules/d3-array/src/quantile.js +14 -0
- package/node_modules/d3-array/src/range.js +13 -0
- package/node_modules/d3-array/src/scan.js +20 -0
- package/node_modules/d3-array/src/shuffle.js +14 -0
- package/node_modules/d3-array/src/sum.js +20 -0
- package/node_modules/d3-array/src/threshold/freedmanDiaconis.js +9 -0
- package/node_modules/d3-array/src/threshold/scott.js +5 -0
- package/node_modules/d3-array/src/threshold/sturges.js +3 -0
- package/node_modules/d3-array/src/ticks.js +51 -0
- package/node_modules/d3-array/src/transpose.js +15 -0
- package/node_modules/d3-array/src/variance.js +33 -0
- package/node_modules/d3-array/src/zip.js +5 -0
- package/node_modules/d3-array/yarn.lock +939 -0
- package/node_modules/d3-geo/.eslintrc +13 -0
- package/node_modules/d3-geo/LICENSE +48 -0
- package/node_modules/d3-geo/README.md +619 -0
- package/node_modules/d3-geo/build/d3-geo.js +2987 -0
- package/node_modules/d3-geo/build/d3-geo.min.js +2 -0
- package/node_modules/d3-geo/img/albers.png +0 -0
- package/node_modules/d3-geo/img/albersUsa-parameters.png +0 -0
- package/node_modules/d3-geo/img/albersUsa.png +0 -0
- package/node_modules/d3-geo/img/azimuthalEqualArea.png +0 -0
- package/node_modules/d3-geo/img/azimuthalEquidistant.png +0 -0
- package/node_modules/d3-geo/img/conicConformal.png +0 -0
- package/node_modules/d3-geo/img/conicEqualArea.png +0 -0
- package/node_modules/d3-geo/img/conicEquidistant.png +0 -0
- package/node_modules/d3-geo/img/equirectangular.png +0 -0
- package/node_modules/d3-geo/img/gnomonic.png +0 -0
- package/node_modules/d3-geo/img/graticule.png +0 -0
- package/node_modules/d3-geo/img/mercator.png +0 -0
- package/node_modules/d3-geo/img/naturalEarth1.png +0 -0
- package/node_modules/d3-geo/img/orthographic.png +0 -0
- package/node_modules/d3-geo/img/stereographic.png +0 -0
- package/node_modules/d3-geo/img/transverseMercator.png +0 -0
- package/node_modules/d3-geo/index.js +30 -0
- package/node_modules/d3-geo/package.json +72 -0
- package/node_modules/d3-geo/rollup.config.js +15 -0
- package/node_modules/d3-geo/src/adder.js +40 -0
- package/node_modules/d3-geo/src/area.js +74 -0
- package/node_modules/d3-geo/src/bounds.js +176 -0
- package/node_modules/d3-geo/src/cartesian.js +33 -0
- package/node_modules/d3-geo/src/centroid.js +140 -0
- package/node_modules/d3-geo/src/circle.js +72 -0
- package/node_modules/d3-geo/src/clip/antimeridian.js +92 -0
- package/node_modules/d3-geo/src/clip/buffer.js +24 -0
- package/node_modules/d3-geo/src/clip/circle.js +181 -0
- package/node_modules/d3-geo/src/clip/extent.js +187 -0
- package/node_modules/d3-geo/src/clip/index.js +135 -0
- package/node_modules/d3-geo/src/clip/line.js +59 -0
- package/node_modules/d3-geo/src/clip/polygon.js +101 -0
- package/node_modules/d3-geo/src/compose.js +12 -0
- package/node_modules/d3-geo/src/constant.js +5 -0
- package/node_modules/d3-geo/src/contains.js +84 -0
- package/node_modules/d3-geo/src/distance.js +10 -0
- package/node_modules/d3-geo/src/graticule.js +105 -0
- package/node_modules/d3-geo/src/identity.js +3 -0
- package/node_modules/d3-geo/src/interpolate.js +36 -0
- package/node_modules/d3-geo/src/length.js +53 -0
- package/node_modules/d3-geo/src/math.js +35 -0
- package/node_modules/d3-geo/src/noop.js +1 -0
- package/node_modules/d3-geo/src/path/area.js +50 -0
- package/node_modules/d3-geo/src/path/bounds.js +28 -0
- package/node_modules/d3-geo/src/path/centroid.js +100 -0
- package/node_modules/d3-geo/src/path/context.js +45 -0
- package/node_modules/d3-geo/src/path/index.js +61 -0
- package/node_modules/d3-geo/src/path/measure.js +45 -0
- package/node_modules/d3-geo/src/path/string.js +59 -0
- package/node_modules/d3-geo/src/pointEqual.js +5 -0
- package/node_modules/d3-geo/src/polygonContains.js +68 -0
- package/node_modules/d3-geo/src/projection/albers.js +10 -0
- package/node_modules/d3-geo/src/projection/albersUsa.js +103 -0
- package/node_modules/d3-geo/src/projection/azimuthal.js +26 -0
- package/node_modules/d3-geo/src/projection/azimuthalEqualArea.js +17 -0
- package/node_modules/d3-geo/src/projection/azimuthalEquidistant.js +17 -0
- package/node_modules/d3-geo/src/projection/conic.js +15 -0
- package/node_modules/d3-geo/src/projection/conicConformal.js +35 -0
- package/node_modules/d3-geo/src/projection/conicEqualArea.js +30 -0
- package/node_modules/d3-geo/src/projection/conicEquidistant.js +29 -0
- package/node_modules/d3-geo/src/projection/cylindricalEqualArea.js +15 -0
- package/node_modules/d3-geo/src/projection/equirectangular.js +12 -0
- package/node_modules/d3-geo/src/projection/fit.js +31 -0
- package/node_modules/d3-geo/src/projection/gnomonic.js +16 -0
- package/node_modules/d3-geo/src/projection/identity.js +52 -0
- package/node_modules/d3-geo/src/projection/index.js +106 -0
- package/node_modules/d3-geo/src/projection/mercator.js +52 -0
- package/node_modules/d3-geo/src/projection/naturalEarth1.js +28 -0
- package/node_modules/d3-geo/src/projection/orthographic.js +15 -0
- package/node_modules/d3-geo/src/projection/resample.js +102 -0
- package/node_modules/d3-geo/src/projection/stereographic.js +18 -0
- package/node_modules/d3-geo/src/projection/transverseMercator.js +27 -0
- package/node_modules/d3-geo/src/rotation.js +76 -0
- package/node_modules/d3-geo/src/stream.js +69 -0
- package/node_modules/d3-geo/src/transform.js +26 -0
- package/node_modules/d3-voronoi/.eslintrc +9 -0
- package/node_modules/d3-voronoi/.npmignore +3 -0
- package/node_modules/d3-voronoi/LICENSE +50 -0
- package/node_modules/d3-voronoi/README.md +160 -0
- package/node_modules/d3-voronoi/build/d3-voronoi.js +999 -0
- package/node_modules/d3-voronoi/build/d3-voronoi.min.js +2 -0
- package/node_modules/d3-voronoi/graph.png +0 -0
- package/node_modules/d3-voronoi/index.js +1 -0
- package/node_modules/d3-voronoi/package.json +65 -0
- package/node_modules/d3-voronoi/src/Beach.js +193 -0
- package/node_modules/d3-voronoi/src/Cell.js +126 -0
- package/node_modules/d3-voronoi/src/Circle.js +78 -0
- package/node_modules/d3-voronoi/src/Diagram.js +142 -0
- package/node_modules/d3-voronoi/src/Edge.js +168 -0
- package/node_modules/d3-voronoi/src/RedBlackTree.js +237 -0
- package/node_modules/d3-voronoi/src/constant.js +5 -0
- package/node_modules/d3-voronoi/src/point.js +7 -0
- package/node_modules/d3-voronoi/src/voronoi.js +48 -0
- package/node_modules/deep-equal/.eslintrc +22 -0
- package/node_modules/deep-equal/.travis.yml +12 -0
- package/node_modules/deep-equal/CHANGELOG.md +120 -0
- package/node_modules/deep-equal/LICENSE +21 -0
- package/node_modules/deep-equal/example/cmp.js +11 -0
- package/node_modules/deep-equal/index.js +112 -0
- package/node_modules/deep-equal/lib/is_arguments.js +1 -0
- package/node_modules/deep-equal/lib/keys.js +1 -0
- package/node_modules/deep-equal/package.json +117 -0
- package/node_modules/deep-equal/readme.markdown +57 -0
- package/node_modules/deep-equal/test/_tape.js +21 -0
- package/node_modules/deep-equal/test/cmp.js +344 -0
- package/node_modules/define-properties/.editorconfig +13 -0
- package/node_modules/define-properties/.eslintrc +12 -0
- package/node_modules/define-properties/.jscs.json +175 -0
- package/node_modules/define-properties/.travis.yml +233 -0
- package/node_modules/define-properties/CHANGELOG.md +44 -0
- package/node_modules/define-properties/LICENSE +21 -0
- package/node_modules/define-properties/README.md +86 -0
- package/node_modules/define-properties/index.js +58 -0
- package/node_modules/define-properties/package.json +97 -0
- package/node_modules/define-properties/test/index.js +125 -0
- package/node_modules/density-clustering/.jscsrc +64 -0
- package/node_modules/density-clustering/.jshintrc +5 -0
- package/node_modules/density-clustering/.remote-sync.json +13 -0
- package/node_modules/density-clustering/CHANGELOG.md +11 -0
- package/node_modules/density-clustering/LICENSE +22 -0
- package/node_modules/density-clustering/README.md +171 -0
- package/node_modules/density-clustering/bower.json +40 -0
- package/node_modules/density-clustering/example/browser.html +20 -0
- package/node_modules/density-clustering/example/dbscan.js +11 -0
- package/node_modules/density-clustering/example/kmeans.js +11 -0
- package/node_modules/density-clustering/example/optics.js +12 -0
- package/node_modules/density-clustering/example/priorityQueue.js +12 -0
- package/node_modules/density-clustering/gulpfile.js +30 -0
- package/node_modules/density-clustering/lib/DBSCAN.js +236 -0
- package/node_modules/density-clustering/lib/KMEANS.js +213 -0
- package/node_modules/density-clustering/lib/OPTICS.js +269 -0
- package/node_modules/density-clustering/lib/PriorityQueue.js +180 -0
- package/node_modules/density-clustering/lib/Utils.js +37 -0
- package/node_modules/density-clustering/lib/index.js +9 -0
- package/node_modules/density-clustering/package.json +70 -0
- package/node_modules/density-clustering/test/DBSCAN.test.js +73 -0
- package/node_modules/density-clustering/test/KMEANS.test.js +70 -0
- package/node_modules/density-clustering/test/OPTICS.test.js +98 -0
- package/node_modules/density-clustering/test/PriorityQueue.test.js +27 -0
- package/node_modules/earcut/LICENSE +15 -0
- package/node_modules/earcut/README.md +246 -0
- package/node_modules/earcut/dist/earcut.dev.js +690 -0
- package/node_modules/earcut/dist/earcut.min.js +1 -0
- package/node_modules/earcut/package.json +77 -0
- package/node_modules/earcut/src/earcut.js +684 -0
- package/node_modules/function-bind/.editorconfig +20 -0
- package/node_modules/function-bind/.eslintrc +15 -0
- package/node_modules/function-bind/.jscs.json +176 -0
- package/node_modules/function-bind/.npmignore +22 -0
- package/node_modules/function-bind/.travis.yml +168 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +48 -0
- package/node_modules/function-bind/implementation.js +52 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +96 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/geojson-equality/.npmignore +2 -0
- package/node_modules/geojson-equality/LICENSE.md +22 -0
- package/node_modules/geojson-equality/README.md +78 -0
- package/node_modules/geojson-equality/dist/geojson-equality.js +295 -0
- package/node_modules/geojson-equality/dist/geojson-equality.js.map +21 -0
- package/node_modules/geojson-equality/dist/geojson-equality.min.js +1 -0
- package/node_modules/geojson-equality/index.js +161 -0
- package/node_modules/geojson-equality/package.json +74 -0
- package/node_modules/geojson-equality/test/mocha.opts +1 -0
- package/node_modules/geojson-equality/test/test.js +364 -0
- package/node_modules/geojson-rbush/LICENSE +20 -0
- package/node_modules/geojson-rbush/README.md +213 -0
- package/node_modules/geojson-rbush/index.d.ts +19 -0
- package/node_modules/geojson-rbush/index.js +208 -0
- package/node_modules/geojson-rbush/package.json +89 -0
- package/node_modules/get-intrinsic/.eslintignore +1 -0
- package/node_modules/get-intrinsic/.eslintrc +43 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +13 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +64 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +65 -0
- package/node_modules/get-intrinsic/index.js +330 -0
- package/node_modules/get-intrinsic/package.json +106 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +260 -0
- package/node_modules/has/LICENSE-MIT +22 -0
- package/node_modules/has/README.md +18 -0
- package/node_modules/has/package.json +73 -0
- package/node_modules/has/src/index.js +5 -0
- package/node_modules/has/test/index.js +10 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +75 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.js +13 -0
- package/node_modules/has-symbols/package.json +127 -0
- package/node_modules/has-symbols/shams.js +42 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +28 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +28 -0
- package/node_modules/has-symbols/test/tests.js +56 -0
- package/node_modules/has-tostringtag/.eslintrc +11 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +20 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.js +7 -0
- package/node_modules/has-tostringtag/package.json +111 -0
- package/node_modules/has-tostringtag/shams.js +7 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +28 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +28 -0
- package/node_modules/has-tostringtag/test/tests.js +14 -0
- package/node_modules/is-arguments/.editorconfig +20 -0
- package/node_modules/is-arguments/.eslintignore +1 -0
- package/node_modules/is-arguments/.eslintrc +10 -0
- package/node_modules/is-arguments/.github/FUNDING.yml +12 -0
- package/node_modules/is-arguments/.nycrc +9 -0
- package/node_modules/is-arguments/CHANGELOG.md +179 -0
- package/node_modules/is-arguments/LICENSE +20 -0
- package/node_modules/is-arguments/README.md +47 -0
- package/node_modules/is-arguments/index.js +33 -0
- package/node_modules/is-arguments/package.json +116 -0
- package/node_modules/is-arguments/test/index.js +44 -0
- package/node_modules/is-date-object/.editorconfig +20 -0
- package/node_modules/is-date-object/.eslintignore +1 -0
- package/node_modules/is-date-object/.eslintrc +9 -0
- package/node_modules/is-date-object/.github/FUNDING.yml +12 -0
- package/node_modules/is-date-object/.nycrc +10 -0
- package/node_modules/is-date-object/CHANGELOG.md +114 -0
- package/node_modules/is-date-object/LICENSE +22 -0
- package/node_modules/is-date-object/README.md +52 -0
- package/node_modules/is-date-object/index.js +22 -0
- package/node_modules/is-date-object/package.json +110 -0
- package/node_modules/is-date-object/test/index.js +36 -0
- package/node_modules/is-regex/.editorconfig +20 -0
- package/node_modules/is-regex/.eslintignore +1 -0
- package/node_modules/is-regex/.eslintrc +19 -0
- package/node_modules/is-regex/.nycrc +10 -0
- package/node_modules/is-regex/CHANGELOG.md +197 -0
- package/node_modules/is-regex/LICENSE +20 -0
- package/node_modules/is-regex/README.md +52 -0
- package/node_modules/is-regex/index.js +58 -0
- package/node_modules/is-regex/package.json +114 -0
- package/node_modules/is-regex/test/index.js +104 -0
- package/node_modules/object-assign/index.js +90 -0
- package/node_modules/object-assign/license +21 -0
- package/node_modules/object-assign/package.json +76 -0
- package/node_modules/object-assign/readme.md +61 -0
- package/node_modules/object-is/.eslintignore +1 -0
- package/node_modules/object-is/.eslintrc +5 -0
- package/node_modules/object-is/.nycrc +13 -0
- package/node_modules/object-is/CHANGELOG.md +150 -0
- package/node_modules/object-is/LICENSE +20 -0
- package/node_modules/object-is/README.md +60 -0
- package/node_modules/object-is/auto.js +3 -0
- package/node_modules/object-is/implementation.js +19 -0
- package/node_modules/object-is/index.js +18 -0
- package/node_modules/object-is/package.json +114 -0
- package/node_modules/object-is/polyfill.js +7 -0
- package/node_modules/object-is/shim.js +14 -0
- package/node_modules/object-is/test/implementation.js +12 -0
- package/node_modules/object-is/test/index.js +12 -0
- package/node_modules/object-is/test/shimmed.js +28 -0
- package/node_modules/object-is/test/tests.js +57 -0
- package/node_modules/object-keys/.editorconfig +13 -0
- package/node_modules/object-keys/.eslintrc +17 -0
- package/node_modules/object-keys/.travis.yml +277 -0
- package/node_modules/object-keys/CHANGELOG.md +232 -0
- package/node_modules/object-keys/LICENSE +21 -0
- package/node_modules/object-keys/README.md +76 -0
- package/node_modules/object-keys/implementation.js +122 -0
- package/node_modules/object-keys/index.js +32 -0
- package/node_modules/object-keys/isArguments.js +17 -0
- package/node_modules/object-keys/package.json +118 -0
- package/node_modules/object-keys/test/index.js +5 -0
- package/node_modules/point-in-polygon/LICENSE +21 -0
- package/node_modules/point-in-polygon/example/inside.js +6 -0
- package/node_modules/point-in-polygon/flat.js +15 -0
- package/node_modules/point-in-polygon/index.js +12 -0
- package/node_modules/point-in-polygon/nested.js +18 -0
- package/node_modules/point-in-polygon/package.json +61 -0
- package/node_modules/point-in-polygon/readme.markdown +51 -0
- package/node_modules/point-in-polygon/test/box-offset.js +24 -0
- package/node_modules/point-in-polygon/test/box.js +34 -0
- package/node_modules/point-in-polygon/test/flat-offset.js +24 -0
- package/node_modules/point-in-polygon/test/flat.js +24 -0
- package/node_modules/polygon-clipping/CHANGELOG.md +129 -0
- package/node_modules/polygon-clipping/LICENSE.md +11 -0
- package/node_modules/polygon-clipping/README.md +99 -0
- package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +1826 -0
- package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +11 -0
- package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +1820 -0
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +2557 -0
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +10 -0
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +1 -0
- package/node_modules/polygon-clipping/package.json +113 -0
- package/node_modules/quickselect/LICENSE +15 -0
- package/node_modules/quickselect/README.md +28 -0
- package/node_modules/quickselect/index.js +54 -0
- package/node_modules/quickselect/package.json +70 -0
- package/node_modules/quickselect/quickselect.js +63 -0
- package/node_modules/rbush/LICENSE +21 -0
- package/node_modules/rbush/README.md +218 -0
- package/node_modules/rbush/index.js +512 -0
- package/node_modules/rbush/package.json +87 -0
- package/node_modules/rbush/rbush.js +574 -0
- package/node_modules/rbush/rbush.min.js +1 -0
- package/node_modules/regexp.prototype.flags/.editorconfig +13 -0
- package/node_modules/regexp.prototype.flags/.eslintrc +18 -0
- package/node_modules/regexp.prototype.flags/.nycrc +9 -0
- package/node_modules/regexp.prototype.flags/CHANGELOG.md +184 -0
- package/node_modules/regexp.prototype.flags/LICENSE +22 -0
- package/node_modules/regexp.prototype.flags/README.md +54 -0
- package/node_modules/regexp.prototype.flags/auto.js +3 -0
- package/node_modules/regexp.prototype.flags/implementation.js +33 -0
- package/node_modules/regexp.prototype.flags/index.js +18 -0
- package/node_modules/regexp.prototype.flags/package.json +124 -0
- package/node_modules/regexp.prototype.flags/polyfill.js +36 -0
- package/node_modules/regexp.prototype.flags/shim.js +26 -0
- package/node_modules/regexp.prototype.flags/test/implementation.js +20 -0
- package/node_modules/regexp.prototype.flags/test/index.js +17 -0
- package/node_modules/regexp.prototype.flags/test/shimmed.js +47 -0
- package/node_modules/regexp.prototype.flags/test/tests.js +141 -0
- package/node_modules/robust-predicates/LICENSE +24 -0
- package/node_modules/robust-predicates/README.md +82 -0
- package/node_modules/robust-predicates/esm/incircle.js +765 -0
- package/node_modules/robust-predicates/esm/insphere.js +775 -0
- package/node_modules/robust-predicates/esm/orient2d.js +186 -0
- package/node_modules/robust-predicates/esm/orient3d.js +462 -0
- package/node_modules/robust-predicates/esm/util.js +138 -0
- package/node_modules/robust-predicates/index.js +5 -0
- package/node_modules/robust-predicates/package.json +95 -0
- package/node_modules/robust-predicates/umd/incircle.js +910 -0
- package/node_modules/robust-predicates/umd/incircle.min.js +1 -0
- package/node_modules/robust-predicates/umd/insphere.js +925 -0
- package/node_modules/robust-predicates/umd/insphere.min.js +1 -0
- package/node_modules/robust-predicates/umd/orient2d.js +284 -0
- package/node_modules/robust-predicates/umd/orient2d.min.js +1 -0
- package/node_modules/robust-predicates/umd/orient3d.js +603 -0
- package/node_modules/robust-predicates/umd/orient3d.min.js +1 -0
- package/node_modules/robust-predicates/umd/predicates.js +2341 -0
- package/node_modules/robust-predicates/umd/predicates.min.js +1 -0
- package/node_modules/skmeans/.gitattributes +17 -0
- package/node_modules/skmeans/.npmignore +52 -0
- package/node_modules/skmeans/Gruntfile.js +49 -0
- package/node_modules/skmeans/README.md +62 -0
- package/node_modules/skmeans/browser.js +19 -0
- package/node_modules/skmeans/dist/browser/skmeans.js +339 -0
- package/node_modules/skmeans/dist/browser/skmeans.js.map +1 -0
- package/node_modules/skmeans/dist/browser/skmeans.min.js +3 -0
- package/node_modules/skmeans/dist/index.html +15 -0
- package/node_modules/skmeans/dist/node/Gruntfile.js +49 -0
- package/node_modules/skmeans/dist/node/Gruntfile.js.map +1 -0
- package/node_modules/skmeans/dist/node/browser.js +19 -0
- package/node_modules/skmeans/dist/node/browser.js.map +1 -0
- package/node_modules/skmeans/dist/node/distance.js +39 -0
- package/node_modules/skmeans/dist/node/distance.js.map +1 -0
- package/node_modules/skmeans/dist/node/kinit.js +110 -0
- package/node_modules/skmeans/dist/node/kinit.js.map +1 -0
- package/node_modules/skmeans/dist/node/main.js +161 -0
- package/node_modules/skmeans/dist/node/main.js.map +1 -0
- package/node_modules/skmeans/distance.js +37 -0
- package/node_modules/skmeans/kinit.js +102 -0
- package/node_modules/skmeans/main.js +147 -0
- package/node_modules/skmeans/package.json +68 -0
- package/node_modules/skmeans/test/data/random_pts.js +1 -0
- package/node_modules/skmeans/test/data/well-separated.js +1 -0
- package/node_modules/skmeans/test/multi.js +15 -0
- package/node_modules/skmeans/test/stats.js +65 -0
- package/node_modules/skmeans/test/test.js +42 -0
- package/node_modules/skmeans/test/test_rand.js +23 -0
- package/node_modules/skmeans/test/test_ws.js +23 -0
- package/node_modules/skmeans/test/uni.js +15 -0
- package/node_modules/splaytree/Readme.md +221 -0
- package/node_modules/splaytree/dist/splay.esm.js +673 -0
- package/node_modules/splaytree/dist/splay.esm.js.map +1 -0
- package/node_modules/splaytree/dist/splay.js +681 -0
- package/node_modules/splaytree/dist/splay.js.map +1 -0
- package/node_modules/splaytree/package.json +123 -0
- package/node_modules/splaytree/src/index.ts +667 -0
- package/node_modules/splaytree/src/node.ts +15 -0
- package/node_modules/splaytree/src/types.ts +2 -0
- package/node_modules/splaytree/typings/index.d.ts +82 -0
- package/node_modules/splaytree/typings/node.d.ts +8 -0
- package/node_modules/splaytree/typings/types.d.ts +2 -0
- package/node_modules/tinyqueue/LICENSE +15 -0
- package/node_modules/tinyqueue/README.md +59 -0
- package/node_modules/tinyqueue/index.d.ts +11 -0
- package/node_modules/tinyqueue/index.js +79 -0
- package/node_modules/tinyqueue/package.json +78 -0
- package/node_modules/tinyqueue/tinyqueue.js +93 -0
- package/node_modules/tinyqueue/tinyqueue.min.js +1 -0
- package/node_modules/topojson-client/LICENSE +13 -0
- package/node_modules/topojson-client/README.md +242 -0
- package/node_modules/topojson-client/bin/topo2geo +106 -0
- package/node_modules/topojson-client/bin/topomerge +216 -0
- package/node_modules/topojson-client/bin/topoquantize +74 -0
- package/node_modules/topojson-client/dist/topojson-client.js +508 -0
- package/node_modules/topojson-client/dist/topojson-client.min.js +2 -0
- package/node_modules/topojson-client/package.json +77 -0
- package/node_modules/topojson-client/src/bbox.js +39 -0
- package/node_modules/topojson-client/src/bisect.js +9 -0
- package/node_modules/topojson-client/src/feature.js +70 -0
- package/node_modules/topojson-client/src/identity.js +3 -0
- package/node_modules/topojson-client/src/index.js +8 -0
- package/node_modules/topojson-client/src/merge.js +103 -0
- package/node_modules/topojson-client/src/mesh.js +53 -0
- package/node_modules/topojson-client/src/neighbors.js +45 -0
- package/node_modules/topojson-client/src/quantize.js +54 -0
- package/node_modules/topojson-client/src/reverse.js +4 -0
- package/node_modules/topojson-client/src/stitch.js +73 -0
- package/node_modules/topojson-client/src/transform.js +19 -0
- package/node_modules/topojson-client/src/untransform.js +23 -0
- package/node_modules/topojson-server/LICENSE +13 -0
- package/node_modules/topojson-server/README.md +75 -0
- package/node_modules/topojson-server/bin/geo2topo +125 -0
- package/node_modules/topojson-server/dist/topojson-server.js +838 -0
- package/node_modules/topojson-server/dist/topojson-server.min.js +2 -0
- package/node_modules/topojson-server/package.json +75 -0
- package/node_modules/topojson-server/src/bounds.js +46 -0
- package/node_modules/topojson-server/src/cut.js +62 -0
- package/node_modules/topojson-server/src/dedup.js +187 -0
- package/node_modules/topojson-server/src/delta.js +30 -0
- package/node_modules/topojson-server/src/extract.js +67 -0
- package/node_modules/topojson-server/src/geometry.js +39 -0
- package/node_modules/topojson-server/src/hash/hashmap.js +70 -0
- package/node_modules/topojson-server/src/hash/hashset.js +53 -0
- package/node_modules/topojson-server/src/hash/point-equal.js +3 -0
- package/node_modules/topojson-server/src/hash/point-hash.js +13 -0
- package/node_modules/topojson-server/src/index.js +1 -0
- package/node_modules/topojson-server/src/join.js +116 -0
- package/node_modules/topojson-server/src/object.js +1 -0
- package/node_modules/topojson-server/src/prequantize.js +72 -0
- package/node_modules/topojson-server/src/topology.js +80 -0
- package/node_modules/turf-jsts/README.md +19 -0
- package/node_modules/turf-jsts/jsts.js +18750 -0
- package/node_modules/turf-jsts/jsts.min.js +1 -0
- package/node_modules/turf-jsts/jsts.mjs +18742 -0
- package/node_modules/turf-jsts/package.json +100 -0
- package/node_modules/turf-jsts/src/Array.js +36 -0
- package/node_modules/turf-jsts/src/Map.js +150 -0
- package/node_modules/turf-jsts/src/Math.js +6 -0
- package/node_modules/turf-jsts/src/Number.js +18 -0
- package/node_modules/turf-jsts/src/extend.js +5 -0
- package/node_modules/turf-jsts/src/hasInterface.js +3 -0
- package/node_modules/turf-jsts/src/index.js +18 -0
- package/node_modules/turf-jsts/src/inherits.js +4 -0
- package/node_modules/turf-jsts/src/java/io/ByteArrayOutputStream.js +1 -0
- package/node_modules/turf-jsts/src/java/io/IOException.js +1 -0
- package/node_modules/turf-jsts/src/java/io/InputStream.js +1 -0
- package/node_modules/turf-jsts/src/java/io/LineNumberReader.js +1 -0
- package/node_modules/turf-jsts/src/java/io/OutputStream.js +1 -0
- package/node_modules/turf-jsts/src/java/io/PrintStream.js +1 -0
- package/node_modules/turf-jsts/src/java/io/Serializable.js +1 -0
- package/node_modules/turf-jsts/src/java/io/StringReader.js +1 -0
- package/node_modules/turf-jsts/src/java/io/StringWriter.js +1 -0
- package/node_modules/turf-jsts/src/java/io/Writer.js +1 -0
- package/node_modules/turf-jsts/src/java/lang/Character.js +4 -0
- package/node_modules/turf-jsts/src/java/lang/Cloneable.js +1 -0
- package/node_modules/turf-jsts/src/java/lang/Comparable.js +1 -0
- package/node_modules/turf-jsts/src/java/lang/Double.js +7 -0
- package/node_modules/turf-jsts/src/java/lang/Exception.js +1 -0
- package/node_modules/turf-jsts/src/java/lang/IllegalArgumentException.js +8 -0
- package/node_modules/turf-jsts/src/java/lang/Integer.js +14 -0
- package/node_modules/turf-jsts/src/java/lang/RuntimeException.js +8 -0
- package/node_modules/turf-jsts/src/java/lang/StringBuffer.js +16 -0
- package/node_modules/turf-jsts/src/java/lang/System.js +15 -0
- package/node_modules/turf-jsts/src/java/text/DecimalFormat.js +1 -0
- package/node_modules/turf-jsts/src/java/text/DecimalFormatSymbols.js +1 -0
- package/node_modules/turf-jsts/src/java/util/ArrayList.js +181 -0
- package/node_modules/turf-jsts/src/java/util/Arrays.js +60 -0
- package/node_modules/turf-jsts/src/java/util/Collection.js +58 -0
- package/node_modules/turf-jsts/src/java/util/Collections.js +34 -0
- package/node_modules/turf-jsts/src/java/util/Comparator.js +1 -0
- package/node_modules/turf-jsts/src/java/util/EmptyStackException.js +15 -0
- package/node_modules/turf-jsts/src/java/util/HashMap.js +61 -0
- package/node_modules/turf-jsts/src/java/util/HashSet.js +151 -0
- package/node_modules/turf-jsts/src/java/util/IndexOutOfBoundsException.js +15 -0
- package/node_modules/turf-jsts/src/java/util/Iterator.js +24 -0
- package/node_modules/turf-jsts/src/java/util/LinkedList.js +14 -0
- package/node_modules/turf-jsts/src/java/util/List.js +32 -0
- package/node_modules/turf-jsts/src/java/util/Map.js +53 -0
- package/node_modules/turf-jsts/src/java/util/NoSuchElementException.js +15 -0
- package/node_modules/turf-jsts/src/java/util/OperationNotSupported.js +15 -0
- package/node_modules/turf-jsts/src/java/util/Set.js +21 -0
- package/node_modules/turf-jsts/src/java/util/SortedMap.js +10 -0
- package/node_modules/turf-jsts/src/java/util/SortedSet.js +11 -0
- package/node_modules/turf-jsts/src/java/util/Stack.js +132 -0
- package/node_modules/turf-jsts/src/java/util/TreeMap.js +246 -0
- package/node_modules/turf-jsts/src/java/util/TreeSet.js +157 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/JTSVersion.js +32 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/Angle.js +105 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/BoundaryNodeRule.js +66 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/CGAlgorithms.js +194 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/CGAlgorithms3D.js +65 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/CGAlgorithmsDD.js +72 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/Centroid.js +127 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/ConvexHull.js +252 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/HCoordinate.js +105 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/InteriorPointArea.js +137 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/InteriorPointLine.js +68 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/InteriorPointPoint.js +45 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/LineIntersector.js +156 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/MCPointInRing.js +102 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/MinimumBoundingCircle.js +170 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/MinimumDiameter.js +165 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/NonRobustCGAlgorithms.js +123 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/NonRobustLineIntersector.js +147 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/NotRepresentableException.js +13 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/PointInRing.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/PointLocator.js +120 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/RayCrossingCounter.js +95 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/RectangleLineIntersector.js +46 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/RobustDeterminant.js +202 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/RobustLineIntersector.js +231 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/SimplePointInRing.js +19 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/distance/DiscreteHausdorffDistance.js +139 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/distance/DistanceToPoint.js +61 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/distance/PointPairDistance.js +79 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/locate/IndexedPointInAreaLocator.js +95 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/locate/PointOnGeometryLocator.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/locate/SimplePointInAreaLocator.js +54 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/match/AreaSimilarityMeasure.js +15 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/match/HausdorffSimilarityMeasure.js +27 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/match/SimilarityMeasure.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm/match/SimilarityMeasureCombiner.js +11 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/algorithm.js +42 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/densify/Densifier.js +93 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/densify.js +2 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/dissolve/DissolveEdgeGraph.js +14 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/dissolve/DissolveHalfEdge.js +21 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/dissolve/LineDissolver.js +152 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/dissolve.js +4 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/edgegraph/EdgeGraph.js +63 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/edgegraph/EdgeGraphBuilder.js +53 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/edgegraph/HalfEdge.js +143 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/edgegraph/MarkHalfEdge.js +41 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/edgegraph.js +5 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Coordinate.js +202 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/CoordinateArrays.js +247 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/CoordinateFilter.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/CoordinateList.js +127 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/CoordinateSequence.js +26 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/CoordinateSequenceComparator.js +67 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/CoordinateSequenceFactory.js +23 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/CoordinateSequenceFilter.js +11 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/CoordinateSequences.js +104 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Dimension.js +60 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Envelope.js +347 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Geometry.js +209 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/GeometryCollection.js +216 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/GeometryCollectionIterator.js +68 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/GeometryComponentFilter.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/GeometryFactory.js +260 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/GeometryFilter.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/IntersectionMatrix.js +232 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/LineSegment.js +276 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/LineString.js +212 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Lineal.js +8 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/LinearRing.js +57 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Location.js +28 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/MultiLineString.js +69 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/MultiPoint.js +55 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/MultiPolygon.js +66 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/OctagonalEnvelope.js +278 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Point.js +145 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Polygon.js +282 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Polygonal.js +8 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/PrecisionModel.js +136 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Puntal.js +8 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/TopologyException.js +23 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/Triangle.js +143 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/impl/CoordinateArraySequence.js +152 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/impl/CoordinateArraySequenceFactory.js +40 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/AbstractPreparedPolygonContains.js +62 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/BasicPreparedGeometry.js +72 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedGeometry.js +19 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedGeometryFactory.js +26 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedLineString.js +25 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedLineStringIntersects.js +39 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedPoint.js +14 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedPolygon.js +59 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedPolygonContains.js +21 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedPolygonContainsProperly.js +29 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedPolygonCovers.js +25 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedPolygonIntersects.js +30 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/prep/PreparedPolygonPredicate.js +63 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/AffineTransformation.js +445 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/AffineTransformationBuilder.js +49 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/AffineTransformationFactory.js +72 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/ComponentCoordinateExtracter.js +24 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/GeometryCollectionMapper.js +26 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/GeometryCombiner.js +80 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/GeometryEditor.js +156 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/GeometryExtracter.js +36 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/GeometryMapper.js +36 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/GeometryTransformer.js +127 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/LineStringExtracter.js +37 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/LinearComponentExtracter.js +98 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/NoninvertibleTransformationException.js +10 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/PointExtracter.js +38 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/PolygonExtracter.js +34 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/ShortCircuitedGeometryVisitor.js +25 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom/util/SineStarFactory.js +50 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geom.js +73 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/Depth.js +92 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/DirectedEdge.js +147 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/DirectedEdgeStar.js +239 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/Edge.js +193 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/EdgeEnd.js +103 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/EdgeEndStar.js +177 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/EdgeIntersection.js +55 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/EdgeIntersectionList.js +78 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/EdgeList.js +61 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/EdgeNodingValidator.js +32 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/EdgeRing.js +163 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/GeometryGraph.js +255 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/GraphComponent.js +53 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/Label.js +147 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/Node.js +95 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/NodeFactory.js +13 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/NodeMap.js +68 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/PlanarGraph.js +142 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/Position.js +16 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/Quadrant.js +60 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/TopologyLocation.js +129 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/EdgeSetIntersector.js +8 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/MonotoneChain.js +19 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/MonotoneChainEdge.js +83 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/MonotoneChainIndexer.js +41 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/SegmentIntersector.js +115 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/SimpleEdgeSetIntersector.js +53 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/SimpleMCSweepLineIntersector.js +101 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/SimpleSweepLineIntersector.js +101 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/SweepLineEvent.js +65 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph/index/SweepLineSegment.js +31 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/geomgraph.js +34 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/ArrayListVisitor.js +20 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/ItemVisitor.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/SpatialIndex.js +18 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/bintree/Bintree.js +74 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/bintree/Interval.js +73 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/bintree/Key.js +46 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/bintree/Node.js +94 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/bintree/NodeBase.js +97 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/bintree/Root.js +37 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/chain/MonotoneChain.js +107 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/chain/MonotoneChainBuilder.js +67 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/chain/MonotoneChainOverlapAction.js +31 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/chain/MonotoneChainSelectAction.js +25 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/intervalrtree/IntervalRTreeBranchNode.js +31 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/intervalrtree/IntervalRTreeLeafNode.js +24 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/intervalrtree/IntervalRTreeNode.js +49 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/intervalrtree/SortedPackedIntervalRTree.js +68 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/intervalrtree.js +5 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/kdtree/KdNode.js +68 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/kdtree/KdNodeVisitor.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/kdtree/KdTree.js +201 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/kdtree.js +4 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/quadtree/DoubleBits.js +86 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/quadtree/IntervalSize.js +19 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/quadtree/Key.js +57 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/quadtree/Node.js +114 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/quadtree/NodeBase.js +131 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/quadtree/Quadtree.js +81 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/quadtree/Root.js +39 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/quadtree.js +8 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/AbstractNode.js +45 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/AbstractSTRtree.js +296 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/Boundable.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/BoundablePair.js +83 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/GeometryItemDistance.js +15 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/Interval.js +46 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/ItemBoundable.js +25 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/ItemDistance.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/SIRtree.js +88 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree/STRtree.js +234 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/strtree.js +11 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/sweepline/SweepLineEvent.js +53 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/sweepline/SweepLineIndex.js +53 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/sweepline/SweepLineInterval.js +34 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/sweepline/SweepLineOverlapAction.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index/sweepline.js +5 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/index.js +2 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/io/GeoJSONParser.js +439 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/io/GeoJSONReader.js +59 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/io/GeoJSONWriter.js +36 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/io/OL3Parser.js +181 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/io/WKTParser.js +398 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/io/WKTReader.js +62 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/io/WKTWriter.js +53 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/io.js +8 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/ExtractLineByLocation.js +69 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/LengthIndexOfPoint.js +65 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/LengthIndexedLine.js +86 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/LengthLocationMap.js +106 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/LinearGeometryBuilder.js +74 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/LinearIterator.js +88 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/LinearLocation.js +207 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/LocationIndexOfLine.js +33 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/LocationIndexOfPoint.js +68 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref/LocationIndexedLine.js +65 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/linearref.js +11 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/math/DD.js +639 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/math/MathUtil.js +71 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/math/Matrix.js +54 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/math/Plane3D.js +41 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/math/Vector2D.js +180 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/math/Vector3D.js +97 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/monkey.js +167 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/BasicSegmentString.js +46 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/FastNodingValidator.js +64 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/FastSegmentSetIntersectionFinder.js +31 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/InteriorIntersectionFinder.js +96 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/InteriorIntersectionFinderAdder.js +41 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/IntersectionAdder.js +90 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/IteratedNoder.js +54 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/MCIndexNoder.js +91 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/MCIndexSegmentSetMutualIntersector.js +88 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/NodableSegmentString.js +11 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/NodedSegmentString.js +103 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/Noder.js +10 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/NodingValidator.js +105 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/Octant.js +40 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/OrientedCoordinateArray.js +46 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/ScaledNoder.js +99 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SegmentIntersectionDetector.js +81 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SegmentIntersector.js +10 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SegmentNode.js +50 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SegmentNodeList.js +210 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SegmentPointComparator.js +48 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SegmentSetMutualIntersector.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SegmentString.js +14 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SegmentStringDissolver.js +58 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SegmentStringUtil.js +49 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SimpleNoder.js +37 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SimpleSegmentSetMutualIntersector.js +35 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/SinglePassNoder.js +20 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/snapround/GeometryNoder.js +63 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/snapround/HotPixel.js +126 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/snapround/MCIndexPointSnapper.js +75 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/snapround/MCIndexSnapRounder.js +90 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding/snapround/SimpleSnapRounder.js +109 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/noding.js +3 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/boundary/BoundaryOp.js +117 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/boundary.js +2 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/BufferBuilder.js +150 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/BufferInputLineSimplifier.js +98 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/BufferOp.js +139 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/BufferParameters.js +95 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/BufferSubgraph.js +151 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/OffsetCurveBuilder.js +170 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/OffsetCurveSetBuilder.js +122 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/OffsetSegmentGenerator.js +289 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/OffsetSegmentString.js +68 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/RightmostEdgeFinder.js +95 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/SubgraphDepthLocater.js +111 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/validate/BufferCurveMaximumDistanceFinder.js +92 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/validate/BufferDistanceValidator.js +107 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/validate/BufferResultValidator.js +116 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/validate/DistanceToPointFinder.js +61 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer/validate/PointPairDistance.js +75 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/buffer.js +19 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance/ConnectedElementLocationFilter.js +28 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance/ConnectedElementPointFilter.js +27 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance/DistanceOp.js +239 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance/FacetSequence.js +114 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance/FacetSequenceTreeBuilder.js +57 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance/GeometryLocation.js +38 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance/IndexedFacetDistance.js +45 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance.js +8 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance3d/AxisPlaneCoordinateSequence.js +80 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance3d/Distance3DOp.js +312 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance3d/PlanarPolygon3D.js +117 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/distance3d.js +4 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/geometrygraph/GeometryGraphOp.js +46 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/geometrygraph.js +2 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/issimple/IsSimpleOp.js +164 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/issimple.js +2 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/linemerge/EdgeString.js +46 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/linemerge/LineMergeDirectedEdge.js +28 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/linemerge/LineMergeEdge.js +17 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/linemerge/LineMergeGraph.js +38 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/linemerge/LineMerger.js +116 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/linemerge/LineSequencer.js +249 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/linemerge.js +7 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/ConsistentPolygonRingChecker.js +74 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/EdgeSetNoder.js +32 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/LineBuilder.js +96 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/MaximalEdgeRing.js +43 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/MinimalEdgeRing.js +21 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/OverlayNodeFactory.js +15 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/OverlayOp.js +332 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/PointBuilder.js +45 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/PolygonBuilder.js +152 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/snap/GeometrySnapper.js +115 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/snap/LineStringSnapper.js +93 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/snap/SnapIfNeededOverlayOp.js +57 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/snap/SnapOverlayOp.js +73 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/validate/FuzzyPointLocator.js +77 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/validate/OffsetPointGenerator.js +55 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay/validate/OverlayResultValidator.js +88 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/overlay.js +21 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/polygonize/EdgeRing.js +232 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/polygonize/PolygonizeDirectedEdge.js +41 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/polygonize/PolygonizeEdge.js +17 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/polygonize/PolygonizeGraph.js +249 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/polygonize/Polygonizer.js +186 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/polygonize.js +6 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/predicate/RectangleContains.js +64 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/predicate/RectangleIntersects.js +158 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/predicate.js +3 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/relate/EdgeEndBuilder.js +64 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/relate/EdgeEndBundle.js +96 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/relate/EdgeEndBundleStar.js +26 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/relate/RelateComputer.js +172 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/relate/RelateNode.js +21 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/relate/RelateNodeFactory.js +15 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/relate/RelateNodeGraph.js +52 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/relate/RelateOp.js +109 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/relate.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/union/CascadedPolygonUnion.js +157 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/union/PointGeometryUnion.js +47 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/union/UnaryUnionOp.js +105 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/union/UnionInteracting.js +75 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/union/UnionOp.js +21 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/union.js +6 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid/ConnectedInteriorTester.js +121 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid/ConsistentAreaTester.js +54 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid/IndexedNestedRingTester.js +60 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid/IsValidOp.js +324 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid/QuadtreeNestedRingTester.js +61 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid/RepeatedPointTester.js +56 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid/SimpleNestedRingTester.js +46 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid/SweeplineNestedRingTester.js +57 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid/TopologyValidationError.js +48 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation/valid.js +10 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/operation.js +4 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/planargraph/DirectedEdge.js +101 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/planargraph/DirectedEdgeStar.js +79 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/planargraph/Edge.js +51 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/planargraph/GraphComponent.js +56 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/planargraph/Node.js +60 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/planargraph/NodeMap.js +29 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/planargraph/PlanarGraph.js +100 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/planargraph/Subgraph.js +43 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/planargraph/algorithm/ConnectedSubgraphFinder.js +52 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision/CommonBits.js +67 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision/CommonBitsOp.js +63 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision/CommonBitsRemover.js +87 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision/CoordinatePrecisionReducerFilter.js +25 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision/EnhancedPrecisionOp.js +116 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision/GeometryPrecisionReducer.js +82 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision/MinimumClearance.js +132 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision/PrecisionReducerCoordinateOperation.js +39 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision/SimpleMinimumClearance.js +126 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/precision.js +10 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/shape/GeometricShapeBuilder.js +54 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/shape/fractal/KochSnowflakeBuilder.js +66 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/shape/fractal/SierpinskiCarpetBuilder.js +57 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/shape/random/RandomPointsBuilder.js +56 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/shape/random/RandomPointsInGridBuilder.js +70 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/DouglasPeuckerLineSimplifier.js +64 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/DouglasPeuckerSimplifier.js +90 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/LineSegmentIndex.js +63 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/TaggedLineSegment.js +36 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/TaggedLineString.js +78 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/TaggedLineStringSimplifier.js +129 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/TaggedLinesSimplifier.js +29 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/TopologyPreservingSimplifier.js +88 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/VWLineSimplifier.js +135 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify/VWSimplifier.js +90 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/simplify.js +11 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/ConformingDelaunayTriangulationBuilder.js +95 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/ConformingDelaunayTriangulator.js +216 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/ConstraintEnforcementException.js +29 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/ConstraintSplitPointFinder.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/ConstraintVertex.js +34 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/ConstraintVertexFactory.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/DelaunayTriangulationBuilder.js +84 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/IncrementalDelaunayTriangulator.js +50 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/MidpointSplitPointFinder.js +16 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/NonEncroachingSplitPointFinder.js +31 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/Segment.js +96 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/SplitSegment.js +56 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/VertexTaggedGeometryDataMapper.js +48 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/VoronoiDiagramBuilder.js +77 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/EdgeConnectedTriangleTraversal.js +39 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/LastFoundQuadEdgeLocator.js +32 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/LocateFailureException.js +32 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/QuadEdge.js +146 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/QuadEdgeLocator.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/QuadEdgeSubdivision.js +456 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/QuadEdgeTriangle.js +191 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/QuadEdgeUtil.js +19 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/TraversalVisitor.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/TrianglePredicate.js +113 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/TriangleVisitor.js +9 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge/Vertex.js +210 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate/quadedge.js +5 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/triangulate.js +15 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/Assert.js +53 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/AssertionFailedException.js +19 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/CollectionUtil.js +35 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/CoordinateArrayFilter.js +22 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/CoordinateCountFilter.js +19 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/GeometricShapeFactory.js +266 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/Memory.js +47 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/NumberUtil.js +11 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/ObjectCounter.js +44 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/PriorityQueue.js +55 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/StringUtil.js +79 -0
- package/node_modules/turf-jsts/src/org/locationtech/jts/util/UniqueCoordinateArrayFilter.js +33 -0
- package/package.json +3 -1
- package/tak-registration.html +6 -2
- package/tak-registration.js +173 -22
|
@@ -0,0 +1,3804 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var bbox = require('@turf/bbox');
|
|
4
|
+
var area = require('@turf/area');
|
|
5
|
+
var booleanPointInPolygon = require('@turf/boolean-point-in-polygon');
|
|
6
|
+
var explode = require('@turf/explode');
|
|
7
|
+
var invariant = require('@turf/invariant');
|
|
8
|
+
var helpers = require('@turf/helpers');
|
|
9
|
+
var objectAssign = require('object-assign');
|
|
10
|
+
var meta = require('@turf/meta');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var bbox__default = /*#__PURE__*/_interopDefaultLegacy(bbox);
|
|
15
|
+
var area__default = /*#__PURE__*/_interopDefaultLegacy(area);
|
|
16
|
+
var booleanPointInPolygon__default = /*#__PURE__*/_interopDefaultLegacy(booleanPointInPolygon);
|
|
17
|
+
var explode__default = /*#__PURE__*/_interopDefaultLegacy(explode);
|
|
18
|
+
var objectAssign__default = /*#__PURE__*/_interopDefaultLegacy(objectAssign);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Takes a {@link Point} grid and returns a correspondent matrix {Array<Array<number>>}
|
|
22
|
+
* of the 'property' values
|
|
23
|
+
*
|
|
24
|
+
* @name gridToMatrix
|
|
25
|
+
* @param {FeatureCollection<Point>} grid of points
|
|
26
|
+
* @param {Object} [options={}] Optional parameters
|
|
27
|
+
* @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled
|
|
28
|
+
* @param {boolean} [options.flip=false] returns the matrix upside-down
|
|
29
|
+
* @param {boolean} [options.flags=false] flags, adding a `matrixPosition` array field ([row, column]) to its properties,
|
|
30
|
+
* the grid points with coordinates on the matrix
|
|
31
|
+
* @returns {Array<Array<number>>} matrix of property values
|
|
32
|
+
* @example
|
|
33
|
+
* var extent = [-70.823364, -33.553984, -70.473175, -33.302986];
|
|
34
|
+
* var cellSize = 3;
|
|
35
|
+
* var grid = turf.pointGrid(extent, cellSize);
|
|
36
|
+
* // add a random property to each point between 0 and 60
|
|
37
|
+
* for (var i = 0; i < grid.features.length; i++) {
|
|
38
|
+
* grid.features[i].properties.elevation = (Math.random() * 60);
|
|
39
|
+
* }
|
|
40
|
+
* gridToMatrix(grid);
|
|
41
|
+
* //= [
|
|
42
|
+
* [ 1, 13, 10, 9, 10, 13, 18],
|
|
43
|
+
* [34, 8, 5, 4, 5, 8, 13],
|
|
44
|
+
* [10, 5, 2, 1, 2, 5, 4],
|
|
45
|
+
* [ 0, 4, 56, 19, 1, 4, 9],
|
|
46
|
+
* [10, 5, 2, 1, 2, 5, 10],
|
|
47
|
+
* [57, 8, 5, 4, 5, 0, 57],
|
|
48
|
+
* [ 3, 13, 10, 9, 5, 13, 18],
|
|
49
|
+
* [18, 13, 10, 9, 78, 13, 18]
|
|
50
|
+
* ]
|
|
51
|
+
*/
|
|
52
|
+
function gridToMatrix(grid, options) {
|
|
53
|
+
// Optional parameters
|
|
54
|
+
options = options || {};
|
|
55
|
+
if (!helpers.isObject(options)) throw new Error("options is invalid");
|
|
56
|
+
var zProperty = options.zProperty || "elevation";
|
|
57
|
+
var flip = options.flip;
|
|
58
|
+
var flags = options.flags;
|
|
59
|
+
|
|
60
|
+
// validation
|
|
61
|
+
invariant.collectionOf(grid, "Point", "input must contain Points");
|
|
62
|
+
|
|
63
|
+
var pointsMatrix = sortPointsByLatLng(grid, flip);
|
|
64
|
+
|
|
65
|
+
var matrix = [];
|
|
66
|
+
// create property matrix from sorted points
|
|
67
|
+
// looping order matters here
|
|
68
|
+
for (var r = 0; r < pointsMatrix.length; r++) {
|
|
69
|
+
var pointRow = pointsMatrix[r];
|
|
70
|
+
var row = [];
|
|
71
|
+
for (var c = 0; c < pointRow.length; c++) {
|
|
72
|
+
var point = pointRow[c];
|
|
73
|
+
// Check if zProperty exist
|
|
74
|
+
if (point.properties[zProperty]) row.push(point.properties[zProperty]);
|
|
75
|
+
else row.push(0);
|
|
76
|
+
// add flags
|
|
77
|
+
if (flags === true) point.properties.matrixPosition = [r, c];
|
|
78
|
+
}
|
|
79
|
+
matrix.push(row);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return matrix;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Sorts points by latitude and longitude, creating a 2-dimensional array of points
|
|
87
|
+
*
|
|
88
|
+
* @private
|
|
89
|
+
* @param {FeatureCollection<Point>} points GeoJSON Point features
|
|
90
|
+
* @param {boolean} [flip=false] returns the matrix upside-down
|
|
91
|
+
* @returns {Array<Array<Point>>} points ordered by latitude and longitude
|
|
92
|
+
*/
|
|
93
|
+
function sortPointsByLatLng(points, flip) {
|
|
94
|
+
var pointsByLatitude = {};
|
|
95
|
+
|
|
96
|
+
// divide points by rows with the same latitude
|
|
97
|
+
meta.featureEach(points, function (point) {
|
|
98
|
+
var lat = invariant.getCoords(point)[1];
|
|
99
|
+
if (!pointsByLatitude[lat]) pointsByLatitude[lat] = [];
|
|
100
|
+
pointsByLatitude[lat].push(point);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// sort points (with the same latitude) by longitude
|
|
104
|
+
var orderedRowsByLatitude = Object.keys(pointsByLatitude).map(function (lat) {
|
|
105
|
+
var row = pointsByLatitude[lat];
|
|
106
|
+
var rowOrderedByLongitude = row.sort(function (a, b) {
|
|
107
|
+
return invariant.getCoords(a)[0] - invariant.getCoords(b)[0];
|
|
108
|
+
});
|
|
109
|
+
return rowOrderedByLongitude;
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// sort rows (of points with the same latitude) by latitude
|
|
113
|
+
var pointMatrix = orderedRowsByLatitude.sort(function (a, b) {
|
|
114
|
+
if (flip) return invariant.getCoords(a[0])[1] - invariant.getCoords(b[0])[1];
|
|
115
|
+
else return invariant.getCoords(b[0])[1] - invariant.getCoords(a[0])[1];
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
return pointMatrix;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/*!
|
|
122
|
+
* @license GNU Affero General Public License.
|
|
123
|
+
* Copyright (c) 2015, 2015 Ronny Lorenz <ronny@tbi.univie.ac.at>
|
|
124
|
+
* v. 1.2.0
|
|
125
|
+
* https://github.com/RaumZeit/MarchingSquares.js
|
|
126
|
+
*
|
|
127
|
+
* MarchingSquaresJS is free software: you can redistribute it and/or modify
|
|
128
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
129
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
130
|
+
* (at your option) any later version.
|
|
131
|
+
*
|
|
132
|
+
* MarchingSquaresJS is distributed in the hope that it will be useful,
|
|
133
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
134
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
135
|
+
* GNU Affero General Public License for more details.
|
|
136
|
+
*
|
|
137
|
+
* As additional permission under GNU Affero General Public License version 3
|
|
138
|
+
* section 7, third-party projects (personal or commercial) may distribute,
|
|
139
|
+
* include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the
|
|
140
|
+
* requirement that said third-party project for that reason alone becomes
|
|
141
|
+
* subject to any requirement of the GNU Affero General Public License version 3.
|
|
142
|
+
* Any modifications to MarchingSquaresJS, however, must be shared with the public
|
|
143
|
+
* and made available.
|
|
144
|
+
*
|
|
145
|
+
* In summary this:
|
|
146
|
+
* - allows you to use MarchingSquaresJS at no cost
|
|
147
|
+
* - allows you to use MarchingSquaresJS for both personal and commercial purposes
|
|
148
|
+
* - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any
|
|
149
|
+
* license as long as this license notice is included
|
|
150
|
+
* - enables you to keep the source code of your program that uses MarchingSquaresJS
|
|
151
|
+
* undisclosed
|
|
152
|
+
* - forces you to share any modifications you have made to MarchingSquaresJS,
|
|
153
|
+
* e.g. bug-fixes
|
|
154
|
+
*
|
|
155
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
156
|
+
* along with MarchingSquaresJS. If not, see <http://www.gnu.org/licenses/>.
|
|
157
|
+
*/
|
|
158
|
+
var defaultSettings = {
|
|
159
|
+
successCallback: null,
|
|
160
|
+
verbose: false,
|
|
161
|
+
polygons: false,
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
var settings = {};
|
|
165
|
+
|
|
166
|
+
/*
|
|
167
|
+
Compute isobands(s) of a scalar 2D field given a certain
|
|
168
|
+
threshold and a bandwidth by applying the Marching Squares
|
|
169
|
+
Algorithm. The function returns a list of path coordinates
|
|
170
|
+
either for individual polygons within each grid cell, or the
|
|
171
|
+
outline of connected polygons.
|
|
172
|
+
*/
|
|
173
|
+
function isoBands(data, minV, bandwidth, options) {
|
|
174
|
+
/* process options */
|
|
175
|
+
options = options ? options : {};
|
|
176
|
+
|
|
177
|
+
var optionKeys = Object.keys(defaultSettings);
|
|
178
|
+
|
|
179
|
+
for (var i = 0; i < optionKeys.length; i++) {
|
|
180
|
+
var key = optionKeys[i];
|
|
181
|
+
var val = options[key];
|
|
182
|
+
val =
|
|
183
|
+
typeof val !== "undefined" && val !== null ? val : defaultSettings[key];
|
|
184
|
+
|
|
185
|
+
settings[key] = val;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (settings.verbose)
|
|
189
|
+
console.log(
|
|
190
|
+
"MarchingSquaresJS-isoBands: computing isobands for [" +
|
|
191
|
+
minV +
|
|
192
|
+
":" +
|
|
193
|
+
(minV + bandwidth) +
|
|
194
|
+
"]"
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
var grid = computeBandGrid(data, minV, bandwidth);
|
|
198
|
+
|
|
199
|
+
var ret;
|
|
200
|
+
if (settings.polygons) {
|
|
201
|
+
if (settings.verbose)
|
|
202
|
+
console.log(
|
|
203
|
+
"MarchingSquaresJS-isoBands: returning single polygons for each grid cell"
|
|
204
|
+
);
|
|
205
|
+
ret = BandGrid2Areas(grid);
|
|
206
|
+
} else {
|
|
207
|
+
if (settings.verbose)
|
|
208
|
+
console.log(
|
|
209
|
+
"MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"
|
|
210
|
+
);
|
|
211
|
+
ret = BandGrid2AreaPaths(grid);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (typeof settings.successCallback === "function")
|
|
215
|
+
settings.successCallback(ret);
|
|
216
|
+
|
|
217
|
+
return ret;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/*
|
|
221
|
+
Thats all for the public interface, below follows the actual
|
|
222
|
+
implementation
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
/* Some private variables */
|
|
226
|
+
var Node0 = 64,
|
|
227
|
+
Node1 = 16,
|
|
228
|
+
Node2 = 4,
|
|
229
|
+
Node3 = 1;
|
|
230
|
+
|
|
231
|
+
/*
|
|
232
|
+
The look-up tables for tracing back the contour path
|
|
233
|
+
of isoBands
|
|
234
|
+
*/
|
|
235
|
+
|
|
236
|
+
var isoBandNextXTL = [];
|
|
237
|
+
var isoBandNextYTL = [];
|
|
238
|
+
var isoBandNextOTL = [];
|
|
239
|
+
|
|
240
|
+
var isoBandNextXTR = [];
|
|
241
|
+
var isoBandNextYTR = [];
|
|
242
|
+
var isoBandNextOTR = [];
|
|
243
|
+
|
|
244
|
+
var isoBandNextXRT = [];
|
|
245
|
+
var isoBandNextYRT = [];
|
|
246
|
+
var isoBandNextORT = [];
|
|
247
|
+
|
|
248
|
+
var isoBandNextXRB = [];
|
|
249
|
+
var isoBandNextYRB = [];
|
|
250
|
+
var isoBandNextORB = [];
|
|
251
|
+
|
|
252
|
+
var isoBandNextXBL = [];
|
|
253
|
+
var isoBandNextYBL = [];
|
|
254
|
+
var isoBandNextOBL = [];
|
|
255
|
+
|
|
256
|
+
var isoBandNextXBR = [];
|
|
257
|
+
var isoBandNextYBR = [];
|
|
258
|
+
var isoBandNextOBR = [];
|
|
259
|
+
|
|
260
|
+
var isoBandNextXLT = [];
|
|
261
|
+
var isoBandNextYLT = [];
|
|
262
|
+
var isoBandNextOLT = [];
|
|
263
|
+
|
|
264
|
+
var isoBandNextXLB = [];
|
|
265
|
+
var isoBandNextYLB = [];
|
|
266
|
+
var isoBandNextOLB = [];
|
|
267
|
+
|
|
268
|
+
isoBandNextXRT[85] = isoBandNextXRB[85] = -1;
|
|
269
|
+
isoBandNextYRT[85] = isoBandNextYRB[85] = 0;
|
|
270
|
+
isoBandNextORT[85] = isoBandNextORB[85] = 1;
|
|
271
|
+
isoBandNextXLT[85] = isoBandNextXLB[85] = 1;
|
|
272
|
+
isoBandNextYLT[85] = isoBandNextYLB[85] = 0;
|
|
273
|
+
isoBandNextOLT[85] = isoBandNextOLB[85] = 1;
|
|
274
|
+
|
|
275
|
+
isoBandNextXTL[85] = isoBandNextXTR[85] = 0;
|
|
276
|
+
isoBandNextYTL[85] = isoBandNextYTR[85] = -1;
|
|
277
|
+
isoBandNextOTL[85] = isoBandNextOBL[85] = 0;
|
|
278
|
+
isoBandNextXBR[85] = isoBandNextXBL[85] = 0;
|
|
279
|
+
isoBandNextYBR[85] = isoBandNextYBL[85] = 1;
|
|
280
|
+
isoBandNextOTR[85] = isoBandNextOBR[85] = 1;
|
|
281
|
+
|
|
282
|
+
/* triangle cases */
|
|
283
|
+
isoBandNextXLB[1] = isoBandNextXLB[169] = 0;
|
|
284
|
+
isoBandNextYLB[1] = isoBandNextYLB[169] = -1;
|
|
285
|
+
isoBandNextOLB[1] = isoBandNextOLB[169] = 0;
|
|
286
|
+
isoBandNextXBL[1] = isoBandNextXBL[169] = -1;
|
|
287
|
+
isoBandNextYBL[1] = isoBandNextYBL[169] = 0;
|
|
288
|
+
isoBandNextOBL[1] = isoBandNextOBL[169] = 0;
|
|
289
|
+
|
|
290
|
+
isoBandNextXRB[4] = isoBandNextXRB[166] = 0;
|
|
291
|
+
isoBandNextYRB[4] = isoBandNextYRB[166] = -1;
|
|
292
|
+
isoBandNextORB[4] = isoBandNextORB[166] = 1;
|
|
293
|
+
isoBandNextXBR[4] = isoBandNextXBR[166] = 1;
|
|
294
|
+
isoBandNextYBR[4] = isoBandNextYBR[166] = 0;
|
|
295
|
+
isoBandNextOBR[4] = isoBandNextOBR[166] = 0;
|
|
296
|
+
|
|
297
|
+
isoBandNextXRT[16] = isoBandNextXRT[154] = 0;
|
|
298
|
+
isoBandNextYRT[16] = isoBandNextYRT[154] = 1;
|
|
299
|
+
isoBandNextORT[16] = isoBandNextORT[154] = 1;
|
|
300
|
+
isoBandNextXTR[16] = isoBandNextXTR[154] = 1;
|
|
301
|
+
isoBandNextYTR[16] = isoBandNextYTR[154] = 0;
|
|
302
|
+
isoBandNextOTR[16] = isoBandNextOTR[154] = 1;
|
|
303
|
+
|
|
304
|
+
isoBandNextXLT[64] = isoBandNextXLT[106] = 0;
|
|
305
|
+
isoBandNextYLT[64] = isoBandNextYLT[106] = 1;
|
|
306
|
+
isoBandNextOLT[64] = isoBandNextOLT[106] = 0;
|
|
307
|
+
isoBandNextXTL[64] = isoBandNextXTL[106] = -1;
|
|
308
|
+
isoBandNextYTL[64] = isoBandNextYTL[106] = 0;
|
|
309
|
+
isoBandNextOTL[64] = isoBandNextOTL[106] = 1;
|
|
310
|
+
|
|
311
|
+
/* single trapezoid cases */
|
|
312
|
+
isoBandNextXLT[2] = isoBandNextXLT[168] = 0;
|
|
313
|
+
isoBandNextYLT[2] = isoBandNextYLT[168] = -1;
|
|
314
|
+
isoBandNextOLT[2] = isoBandNextOLT[168] = 1;
|
|
315
|
+
isoBandNextXLB[2] = isoBandNextXLB[168] = 0;
|
|
316
|
+
isoBandNextYLB[2] = isoBandNextYLB[168] = -1;
|
|
317
|
+
isoBandNextOLB[2] = isoBandNextOLB[168] = 0;
|
|
318
|
+
isoBandNextXBL[2] = isoBandNextXBL[168] = -1;
|
|
319
|
+
isoBandNextYBL[2] = isoBandNextYBL[168] = 0;
|
|
320
|
+
isoBandNextOBL[2] = isoBandNextOBL[168] = 0;
|
|
321
|
+
isoBandNextXBR[2] = isoBandNextXBR[168] = -1;
|
|
322
|
+
isoBandNextYBR[2] = isoBandNextYBR[168] = 0;
|
|
323
|
+
isoBandNextOBR[2] = isoBandNextOBR[168] = 1;
|
|
324
|
+
|
|
325
|
+
isoBandNextXRT[8] = isoBandNextXRT[162] = 0;
|
|
326
|
+
isoBandNextYRT[8] = isoBandNextYRT[162] = -1;
|
|
327
|
+
isoBandNextORT[8] = isoBandNextORT[162] = 0;
|
|
328
|
+
isoBandNextXRB[8] = isoBandNextXRB[162] = 0;
|
|
329
|
+
isoBandNextYRB[8] = isoBandNextYRB[162] = -1;
|
|
330
|
+
isoBandNextORB[8] = isoBandNextORB[162] = 1;
|
|
331
|
+
isoBandNextXBL[8] = isoBandNextXBL[162] = 1;
|
|
332
|
+
isoBandNextYBL[8] = isoBandNextYBL[162] = 0;
|
|
333
|
+
isoBandNextOBL[8] = isoBandNextOBL[162] = 1;
|
|
334
|
+
isoBandNextXBR[8] = isoBandNextXBR[162] = 1;
|
|
335
|
+
isoBandNextYBR[8] = isoBandNextYBR[162] = 0;
|
|
336
|
+
isoBandNextOBR[8] = isoBandNextOBR[162] = 0;
|
|
337
|
+
|
|
338
|
+
isoBandNextXRT[32] = isoBandNextXRT[138] = 0;
|
|
339
|
+
isoBandNextYRT[32] = isoBandNextYRT[138] = 1;
|
|
340
|
+
isoBandNextORT[32] = isoBandNextORT[138] = 1;
|
|
341
|
+
isoBandNextXRB[32] = isoBandNextXRB[138] = 0;
|
|
342
|
+
isoBandNextYRB[32] = isoBandNextYRB[138] = 1;
|
|
343
|
+
isoBandNextORB[32] = isoBandNextORB[138] = 0;
|
|
344
|
+
isoBandNextXTL[32] = isoBandNextXTL[138] = 1;
|
|
345
|
+
isoBandNextYTL[32] = isoBandNextYTL[138] = 0;
|
|
346
|
+
isoBandNextOTL[32] = isoBandNextOTL[138] = 0;
|
|
347
|
+
isoBandNextXTR[32] = isoBandNextXTR[138] = 1;
|
|
348
|
+
isoBandNextYTR[32] = isoBandNextYTR[138] = 0;
|
|
349
|
+
isoBandNextOTR[32] = isoBandNextOTR[138] = 1;
|
|
350
|
+
|
|
351
|
+
isoBandNextXLB[128] = isoBandNextXLB[42] = 0;
|
|
352
|
+
isoBandNextYLB[128] = isoBandNextYLB[42] = 1;
|
|
353
|
+
isoBandNextOLB[128] = isoBandNextOLB[42] = 1;
|
|
354
|
+
isoBandNextXLT[128] = isoBandNextXLT[42] = 0;
|
|
355
|
+
isoBandNextYLT[128] = isoBandNextYLT[42] = 1;
|
|
356
|
+
isoBandNextOLT[128] = isoBandNextOLT[42] = 0;
|
|
357
|
+
isoBandNextXTL[128] = isoBandNextXTL[42] = -1;
|
|
358
|
+
isoBandNextYTL[128] = isoBandNextYTL[42] = 0;
|
|
359
|
+
isoBandNextOTL[128] = isoBandNextOTL[42] = 1;
|
|
360
|
+
isoBandNextXTR[128] = isoBandNextXTR[42] = -1;
|
|
361
|
+
isoBandNextYTR[128] = isoBandNextYTR[42] = 0;
|
|
362
|
+
isoBandNextOTR[128] = isoBandNextOTR[42] = 0;
|
|
363
|
+
|
|
364
|
+
/* single rectangle cases */
|
|
365
|
+
isoBandNextXRB[5] = isoBandNextXRB[165] = -1;
|
|
366
|
+
isoBandNextYRB[5] = isoBandNextYRB[165] = 0;
|
|
367
|
+
isoBandNextORB[5] = isoBandNextORB[165] = 0;
|
|
368
|
+
isoBandNextXLB[5] = isoBandNextXLB[165] = 1;
|
|
369
|
+
isoBandNextYLB[5] = isoBandNextYLB[165] = 0;
|
|
370
|
+
isoBandNextOLB[5] = isoBandNextOLB[165] = 0;
|
|
371
|
+
|
|
372
|
+
isoBandNextXBR[20] = isoBandNextXBR[150] = 0;
|
|
373
|
+
isoBandNextYBR[20] = isoBandNextYBR[150] = 1;
|
|
374
|
+
isoBandNextOBR[20] = isoBandNextOBR[150] = 1;
|
|
375
|
+
isoBandNextXTR[20] = isoBandNextXTR[150] = 0;
|
|
376
|
+
isoBandNextYTR[20] = isoBandNextYTR[150] = -1;
|
|
377
|
+
isoBandNextOTR[20] = isoBandNextOTR[150] = 1;
|
|
378
|
+
|
|
379
|
+
isoBandNextXRT[80] = isoBandNextXRT[90] = -1;
|
|
380
|
+
isoBandNextYRT[80] = isoBandNextYRT[90] = 0;
|
|
381
|
+
isoBandNextORT[80] = isoBandNextORT[90] = 1;
|
|
382
|
+
isoBandNextXLT[80] = isoBandNextXLT[90] = 1;
|
|
383
|
+
isoBandNextYLT[80] = isoBandNextYLT[90] = 0;
|
|
384
|
+
isoBandNextOLT[80] = isoBandNextOLT[90] = 1;
|
|
385
|
+
|
|
386
|
+
isoBandNextXBL[65] = isoBandNextXBL[105] = 0;
|
|
387
|
+
isoBandNextYBL[65] = isoBandNextYBL[105] = 1;
|
|
388
|
+
isoBandNextOBL[65] = isoBandNextOBL[105] = 0;
|
|
389
|
+
isoBandNextXTL[65] = isoBandNextXTL[105] = 0;
|
|
390
|
+
isoBandNextYTL[65] = isoBandNextYTL[105] = -1;
|
|
391
|
+
isoBandNextOTL[65] = isoBandNextOTL[105] = 0;
|
|
392
|
+
|
|
393
|
+
isoBandNextXRT[160] = isoBandNextXRT[10] = -1;
|
|
394
|
+
isoBandNextYRT[160] = isoBandNextYRT[10] = 0;
|
|
395
|
+
isoBandNextORT[160] = isoBandNextORT[10] = 1;
|
|
396
|
+
isoBandNextXRB[160] = isoBandNextXRB[10] = -1;
|
|
397
|
+
isoBandNextYRB[160] = isoBandNextYRB[10] = 0;
|
|
398
|
+
isoBandNextORB[160] = isoBandNextORB[10] = 0;
|
|
399
|
+
isoBandNextXLB[160] = isoBandNextXLB[10] = 1;
|
|
400
|
+
isoBandNextYLB[160] = isoBandNextYLB[10] = 0;
|
|
401
|
+
isoBandNextOLB[160] = isoBandNextOLB[10] = 0;
|
|
402
|
+
isoBandNextXLT[160] = isoBandNextXLT[10] = 1;
|
|
403
|
+
isoBandNextYLT[160] = isoBandNextYLT[10] = 0;
|
|
404
|
+
isoBandNextOLT[160] = isoBandNextOLT[10] = 1;
|
|
405
|
+
|
|
406
|
+
isoBandNextXBR[130] = isoBandNextXBR[40] = 0;
|
|
407
|
+
isoBandNextYBR[130] = isoBandNextYBR[40] = 1;
|
|
408
|
+
isoBandNextOBR[130] = isoBandNextOBR[40] = 1;
|
|
409
|
+
isoBandNextXBL[130] = isoBandNextXBL[40] = 0;
|
|
410
|
+
isoBandNextYBL[130] = isoBandNextYBL[40] = 1;
|
|
411
|
+
isoBandNextOBL[130] = isoBandNextOBL[40] = 0;
|
|
412
|
+
isoBandNextXTL[130] = isoBandNextXTL[40] = 0;
|
|
413
|
+
isoBandNextYTL[130] = isoBandNextYTL[40] = -1;
|
|
414
|
+
isoBandNextOTL[130] = isoBandNextOTL[40] = 0;
|
|
415
|
+
isoBandNextXTR[130] = isoBandNextXTR[40] = 0;
|
|
416
|
+
isoBandNextYTR[130] = isoBandNextYTR[40] = -1;
|
|
417
|
+
isoBandNextOTR[130] = isoBandNextOTR[40] = 1;
|
|
418
|
+
|
|
419
|
+
/* single hexagon cases */
|
|
420
|
+
isoBandNextXRB[37] = isoBandNextXRB[133] = 0;
|
|
421
|
+
isoBandNextYRB[37] = isoBandNextYRB[133] = 1;
|
|
422
|
+
isoBandNextORB[37] = isoBandNextORB[133] = 1;
|
|
423
|
+
isoBandNextXLB[37] = isoBandNextXLB[133] = 0;
|
|
424
|
+
isoBandNextYLB[37] = isoBandNextYLB[133] = 1;
|
|
425
|
+
isoBandNextOLB[37] = isoBandNextOLB[133] = 0;
|
|
426
|
+
isoBandNextXTL[37] = isoBandNextXTL[133] = -1;
|
|
427
|
+
isoBandNextYTL[37] = isoBandNextYTL[133] = 0;
|
|
428
|
+
isoBandNextOTL[37] = isoBandNextOTL[133] = 0;
|
|
429
|
+
isoBandNextXTR[37] = isoBandNextXTR[133] = 1;
|
|
430
|
+
isoBandNextYTR[37] = isoBandNextYTR[133] = 0;
|
|
431
|
+
isoBandNextOTR[37] = isoBandNextOTR[133] = 0;
|
|
432
|
+
|
|
433
|
+
isoBandNextXBR[148] = isoBandNextXBR[22] = -1;
|
|
434
|
+
isoBandNextYBR[148] = isoBandNextYBR[22] = 0;
|
|
435
|
+
isoBandNextOBR[148] = isoBandNextOBR[22] = 0;
|
|
436
|
+
isoBandNextXLB[148] = isoBandNextXLB[22] = 0;
|
|
437
|
+
isoBandNextYLB[148] = isoBandNextYLB[22] = -1;
|
|
438
|
+
isoBandNextOLB[148] = isoBandNextOLB[22] = 1;
|
|
439
|
+
isoBandNextXLT[148] = isoBandNextXLT[22] = 0;
|
|
440
|
+
isoBandNextYLT[148] = isoBandNextYLT[22] = 1;
|
|
441
|
+
isoBandNextOLT[148] = isoBandNextOLT[22] = 1;
|
|
442
|
+
isoBandNextXTR[148] = isoBandNextXTR[22] = -1;
|
|
443
|
+
isoBandNextYTR[148] = isoBandNextYTR[22] = 0;
|
|
444
|
+
isoBandNextOTR[148] = isoBandNextOTR[22] = 1;
|
|
445
|
+
|
|
446
|
+
isoBandNextXRT[82] = isoBandNextXRT[88] = 0;
|
|
447
|
+
isoBandNextYRT[82] = isoBandNextYRT[88] = -1;
|
|
448
|
+
isoBandNextORT[82] = isoBandNextORT[88] = 1;
|
|
449
|
+
isoBandNextXBR[82] = isoBandNextXBR[88] = 1;
|
|
450
|
+
isoBandNextYBR[82] = isoBandNextYBR[88] = 0;
|
|
451
|
+
isoBandNextOBR[82] = isoBandNextOBR[88] = 1;
|
|
452
|
+
isoBandNextXBL[82] = isoBandNextXBL[88] = -1;
|
|
453
|
+
isoBandNextYBL[82] = isoBandNextYBL[88] = 0;
|
|
454
|
+
isoBandNextOBL[82] = isoBandNextOBL[88] = 1;
|
|
455
|
+
isoBandNextXLT[82] = isoBandNextXLT[88] = 0;
|
|
456
|
+
isoBandNextYLT[82] = isoBandNextYLT[88] = -1;
|
|
457
|
+
isoBandNextOLT[82] = isoBandNextOLT[88] = 0;
|
|
458
|
+
|
|
459
|
+
isoBandNextXRT[73] = isoBandNextXRT[97] = 0;
|
|
460
|
+
isoBandNextYRT[73] = isoBandNextYRT[97] = 1;
|
|
461
|
+
isoBandNextORT[73] = isoBandNextORT[97] = 0;
|
|
462
|
+
isoBandNextXRB[73] = isoBandNextXRB[97] = 0;
|
|
463
|
+
isoBandNextYRB[73] = isoBandNextYRB[97] = -1;
|
|
464
|
+
isoBandNextORB[73] = isoBandNextORB[97] = 0;
|
|
465
|
+
isoBandNextXBL[73] = isoBandNextXBL[97] = 1;
|
|
466
|
+
isoBandNextYBL[73] = isoBandNextYBL[97] = 0;
|
|
467
|
+
isoBandNextOBL[73] = isoBandNextOBL[97] = 0;
|
|
468
|
+
isoBandNextXTL[73] = isoBandNextXTL[97] = 1;
|
|
469
|
+
isoBandNextYTL[73] = isoBandNextYTL[97] = 0;
|
|
470
|
+
isoBandNextOTL[73] = isoBandNextOTL[97] = 1;
|
|
471
|
+
|
|
472
|
+
isoBandNextXRT[145] = isoBandNextXRT[25] = 0;
|
|
473
|
+
isoBandNextYRT[145] = isoBandNextYRT[25] = -1;
|
|
474
|
+
isoBandNextORT[145] = isoBandNextORT[25] = 0;
|
|
475
|
+
isoBandNextXBL[145] = isoBandNextXBL[25] = 1;
|
|
476
|
+
isoBandNextYBL[145] = isoBandNextYBL[25] = 0;
|
|
477
|
+
isoBandNextOBL[145] = isoBandNextOBL[25] = 1;
|
|
478
|
+
isoBandNextXLB[145] = isoBandNextXLB[25] = 0;
|
|
479
|
+
isoBandNextYLB[145] = isoBandNextYLB[25] = 1;
|
|
480
|
+
isoBandNextOLB[145] = isoBandNextOLB[25] = 1;
|
|
481
|
+
isoBandNextXTR[145] = isoBandNextXTR[25] = -1;
|
|
482
|
+
isoBandNextYTR[145] = isoBandNextYTR[25] = 0;
|
|
483
|
+
isoBandNextOTR[145] = isoBandNextOTR[25] = 0;
|
|
484
|
+
|
|
485
|
+
isoBandNextXRB[70] = isoBandNextXRB[100] = 0;
|
|
486
|
+
isoBandNextYRB[70] = isoBandNextYRB[100] = 1;
|
|
487
|
+
isoBandNextORB[70] = isoBandNextORB[100] = 0;
|
|
488
|
+
isoBandNextXBR[70] = isoBandNextXBR[100] = -1;
|
|
489
|
+
isoBandNextYBR[70] = isoBandNextYBR[100] = 0;
|
|
490
|
+
isoBandNextOBR[70] = isoBandNextOBR[100] = 1;
|
|
491
|
+
isoBandNextXLT[70] = isoBandNextXLT[100] = 0;
|
|
492
|
+
isoBandNextYLT[70] = isoBandNextYLT[100] = -1;
|
|
493
|
+
isoBandNextOLT[70] = isoBandNextOLT[100] = 1;
|
|
494
|
+
isoBandNextXTL[70] = isoBandNextXTL[100] = 1;
|
|
495
|
+
isoBandNextYTL[70] = isoBandNextYTL[100] = 0;
|
|
496
|
+
isoBandNextOTL[70] = isoBandNextOTL[100] = 0;
|
|
497
|
+
|
|
498
|
+
/* single pentagon cases */
|
|
499
|
+
isoBandNextXRB[101] = isoBandNextXRB[69] = 0;
|
|
500
|
+
isoBandNextYRB[101] = isoBandNextYRB[69] = 1;
|
|
501
|
+
isoBandNextORB[101] = isoBandNextORB[69] = 0;
|
|
502
|
+
isoBandNextXTL[101] = isoBandNextXTL[69] = 1;
|
|
503
|
+
isoBandNextYTL[101] = isoBandNextYTL[69] = 0;
|
|
504
|
+
isoBandNextOTL[101] = isoBandNextOTL[69] = 0;
|
|
505
|
+
|
|
506
|
+
isoBandNextXLB[149] = isoBandNextXLB[21] = 0;
|
|
507
|
+
isoBandNextYLB[149] = isoBandNextYLB[21] = 1;
|
|
508
|
+
isoBandNextOLB[149] = isoBandNextOLB[21] = 1;
|
|
509
|
+
isoBandNextXTR[149] = isoBandNextXTR[21] = -1;
|
|
510
|
+
isoBandNextYTR[149] = isoBandNextYTR[21] = 0;
|
|
511
|
+
isoBandNextOTR[149] = isoBandNextOTR[21] = 0;
|
|
512
|
+
|
|
513
|
+
isoBandNextXBR[86] = isoBandNextXBR[84] = -1;
|
|
514
|
+
isoBandNextYBR[86] = isoBandNextYBR[84] = 0;
|
|
515
|
+
isoBandNextOBR[86] = isoBandNextOBR[84] = 1;
|
|
516
|
+
isoBandNextXLT[86] = isoBandNextXLT[84] = 0;
|
|
517
|
+
isoBandNextYLT[86] = isoBandNextYLT[84] = -1;
|
|
518
|
+
isoBandNextOLT[86] = isoBandNextOLT[84] = 1;
|
|
519
|
+
|
|
520
|
+
isoBandNextXRT[89] = isoBandNextXRT[81] = 0;
|
|
521
|
+
isoBandNextYRT[89] = isoBandNextYRT[81] = -1;
|
|
522
|
+
isoBandNextORT[89] = isoBandNextORT[81] = 0;
|
|
523
|
+
isoBandNextXBL[89] = isoBandNextXBL[81] = 1;
|
|
524
|
+
isoBandNextYBL[89] = isoBandNextYBL[81] = 0;
|
|
525
|
+
isoBandNextOBL[89] = isoBandNextOBL[81] = 1;
|
|
526
|
+
|
|
527
|
+
isoBandNextXRT[96] = isoBandNextXRT[74] = 0;
|
|
528
|
+
isoBandNextYRT[96] = isoBandNextYRT[74] = 1;
|
|
529
|
+
isoBandNextORT[96] = isoBandNextORT[74] = 0;
|
|
530
|
+
isoBandNextXRB[96] = isoBandNextXRB[74] = -1;
|
|
531
|
+
isoBandNextYRB[96] = isoBandNextYRB[74] = 0;
|
|
532
|
+
isoBandNextORB[96] = isoBandNextORB[74] = 1;
|
|
533
|
+
isoBandNextXLT[96] = isoBandNextXLT[74] = 1;
|
|
534
|
+
isoBandNextYLT[96] = isoBandNextYLT[74] = 0;
|
|
535
|
+
isoBandNextOLT[96] = isoBandNextOLT[74] = 0;
|
|
536
|
+
isoBandNextXTL[96] = isoBandNextXTL[74] = 1;
|
|
537
|
+
isoBandNextYTL[96] = isoBandNextYTL[74] = 0;
|
|
538
|
+
isoBandNextOTL[96] = isoBandNextOTL[74] = 1;
|
|
539
|
+
|
|
540
|
+
isoBandNextXRT[24] = isoBandNextXRT[146] = 0;
|
|
541
|
+
isoBandNextYRT[24] = isoBandNextYRT[146] = -1;
|
|
542
|
+
isoBandNextORT[24] = isoBandNextORT[146] = 1;
|
|
543
|
+
isoBandNextXBR[24] = isoBandNextXBR[146] = 1;
|
|
544
|
+
isoBandNextYBR[24] = isoBandNextYBR[146] = 0;
|
|
545
|
+
isoBandNextOBR[24] = isoBandNextOBR[146] = 1;
|
|
546
|
+
isoBandNextXBL[24] = isoBandNextXBL[146] = 0;
|
|
547
|
+
isoBandNextYBL[24] = isoBandNextYBL[146] = 1;
|
|
548
|
+
isoBandNextOBL[24] = isoBandNextOBL[146] = 1;
|
|
549
|
+
isoBandNextXTR[24] = isoBandNextXTR[146] = 0;
|
|
550
|
+
isoBandNextYTR[24] = isoBandNextYTR[146] = -1;
|
|
551
|
+
isoBandNextOTR[24] = isoBandNextOTR[146] = 0;
|
|
552
|
+
|
|
553
|
+
isoBandNextXRB[6] = isoBandNextXRB[164] = -1;
|
|
554
|
+
isoBandNextYRB[6] = isoBandNextYRB[164] = 0;
|
|
555
|
+
isoBandNextORB[6] = isoBandNextORB[164] = 1;
|
|
556
|
+
isoBandNextXBR[6] = isoBandNextXBR[164] = -1;
|
|
557
|
+
isoBandNextYBR[6] = isoBandNextYBR[164] = 0;
|
|
558
|
+
isoBandNextOBR[6] = isoBandNextOBR[164] = 0;
|
|
559
|
+
isoBandNextXLB[6] = isoBandNextXLB[164] = 0;
|
|
560
|
+
isoBandNextYLB[6] = isoBandNextYLB[164] = -1;
|
|
561
|
+
isoBandNextOLB[6] = isoBandNextOLB[164] = 1;
|
|
562
|
+
isoBandNextXLT[6] = isoBandNextXLT[164] = 1;
|
|
563
|
+
isoBandNextYLT[6] = isoBandNextYLT[164] = 0;
|
|
564
|
+
isoBandNextOLT[6] = isoBandNextOLT[164] = 0;
|
|
565
|
+
|
|
566
|
+
isoBandNextXBL[129] = isoBandNextXBL[41] = 0;
|
|
567
|
+
isoBandNextYBL[129] = isoBandNextYBL[41] = 1;
|
|
568
|
+
isoBandNextOBL[129] = isoBandNextOBL[41] = 1;
|
|
569
|
+
isoBandNextXLB[129] = isoBandNextXLB[41] = 0;
|
|
570
|
+
isoBandNextYLB[129] = isoBandNextYLB[41] = 1;
|
|
571
|
+
isoBandNextOLB[129] = isoBandNextOLB[41] = 0;
|
|
572
|
+
isoBandNextXTL[129] = isoBandNextXTL[41] = -1;
|
|
573
|
+
isoBandNextYTL[129] = isoBandNextYTL[41] = 0;
|
|
574
|
+
isoBandNextOTL[129] = isoBandNextOTL[41] = 0;
|
|
575
|
+
isoBandNextXTR[129] = isoBandNextXTR[41] = 0;
|
|
576
|
+
isoBandNextYTR[129] = isoBandNextYTR[41] = -1;
|
|
577
|
+
isoBandNextOTR[129] = isoBandNextOTR[41] = 0;
|
|
578
|
+
|
|
579
|
+
isoBandNextXBR[66] = isoBandNextXBR[104] = 0;
|
|
580
|
+
isoBandNextYBR[66] = isoBandNextYBR[104] = 1;
|
|
581
|
+
isoBandNextOBR[66] = isoBandNextOBR[104] = 0;
|
|
582
|
+
isoBandNextXBL[66] = isoBandNextXBL[104] = -1;
|
|
583
|
+
isoBandNextYBL[66] = isoBandNextYBL[104] = 0;
|
|
584
|
+
isoBandNextOBL[66] = isoBandNextOBL[104] = 1;
|
|
585
|
+
isoBandNextXLT[66] = isoBandNextXLT[104] = 0;
|
|
586
|
+
isoBandNextYLT[66] = isoBandNextYLT[104] = -1;
|
|
587
|
+
isoBandNextOLT[66] = isoBandNextOLT[104] = 0;
|
|
588
|
+
isoBandNextXTL[66] = isoBandNextXTL[104] = 0;
|
|
589
|
+
isoBandNextYTL[66] = isoBandNextYTL[104] = -1;
|
|
590
|
+
isoBandNextOTL[66] = isoBandNextOTL[104] = 1;
|
|
591
|
+
|
|
592
|
+
isoBandNextXRT[144] = isoBandNextXRT[26] = -1;
|
|
593
|
+
isoBandNextYRT[144] = isoBandNextYRT[26] = 0;
|
|
594
|
+
isoBandNextORT[144] = isoBandNextORT[26] = 0;
|
|
595
|
+
isoBandNextXLB[144] = isoBandNextXLB[26] = 1;
|
|
596
|
+
isoBandNextYLB[144] = isoBandNextYLB[26] = 0;
|
|
597
|
+
isoBandNextOLB[144] = isoBandNextOLB[26] = 1;
|
|
598
|
+
isoBandNextXLT[144] = isoBandNextXLT[26] = 0;
|
|
599
|
+
isoBandNextYLT[144] = isoBandNextYLT[26] = 1;
|
|
600
|
+
isoBandNextOLT[144] = isoBandNextOLT[26] = 1;
|
|
601
|
+
isoBandNextXTR[144] = isoBandNextXTR[26] = -1;
|
|
602
|
+
isoBandNextYTR[144] = isoBandNextYTR[26] = 0;
|
|
603
|
+
isoBandNextOTR[144] = isoBandNextOTR[26] = 1;
|
|
604
|
+
|
|
605
|
+
isoBandNextXRB[36] = isoBandNextXRB[134] = 0;
|
|
606
|
+
isoBandNextYRB[36] = isoBandNextYRB[134] = 1;
|
|
607
|
+
isoBandNextORB[36] = isoBandNextORB[134] = 1;
|
|
608
|
+
isoBandNextXBR[36] = isoBandNextXBR[134] = 0;
|
|
609
|
+
isoBandNextYBR[36] = isoBandNextYBR[134] = 1;
|
|
610
|
+
isoBandNextOBR[36] = isoBandNextOBR[134] = 0;
|
|
611
|
+
isoBandNextXTL[36] = isoBandNextXTL[134] = 0;
|
|
612
|
+
isoBandNextYTL[36] = isoBandNextYTL[134] = -1;
|
|
613
|
+
isoBandNextOTL[36] = isoBandNextOTL[134] = 1;
|
|
614
|
+
isoBandNextXTR[36] = isoBandNextXTR[134] = 1;
|
|
615
|
+
isoBandNextYTR[36] = isoBandNextYTR[134] = 0;
|
|
616
|
+
isoBandNextOTR[36] = isoBandNextOTR[134] = 0;
|
|
617
|
+
|
|
618
|
+
isoBandNextXRT[9] = isoBandNextXRT[161] = -1;
|
|
619
|
+
isoBandNextYRT[9] = isoBandNextYRT[161] = 0;
|
|
620
|
+
isoBandNextORT[9] = isoBandNextORT[161] = 0;
|
|
621
|
+
isoBandNextXRB[9] = isoBandNextXRB[161] = 0;
|
|
622
|
+
isoBandNextYRB[9] = isoBandNextYRB[161] = -1;
|
|
623
|
+
isoBandNextORB[9] = isoBandNextORB[161] = 0;
|
|
624
|
+
isoBandNextXBL[9] = isoBandNextXBL[161] = 1;
|
|
625
|
+
isoBandNextYBL[9] = isoBandNextYBL[161] = 0;
|
|
626
|
+
isoBandNextOBL[9] = isoBandNextOBL[161] = 0;
|
|
627
|
+
isoBandNextXLB[9] = isoBandNextXLB[161] = 1;
|
|
628
|
+
isoBandNextYLB[9] = isoBandNextYLB[161] = 0;
|
|
629
|
+
isoBandNextOLB[9] = isoBandNextOLB[161] = 1;
|
|
630
|
+
|
|
631
|
+
/* 8-sided cases */
|
|
632
|
+
isoBandNextXRT[136] = 0;
|
|
633
|
+
isoBandNextYRT[136] = 1;
|
|
634
|
+
isoBandNextORT[136] = 1;
|
|
635
|
+
isoBandNextXRB[136] = 0;
|
|
636
|
+
isoBandNextYRB[136] = 1;
|
|
637
|
+
isoBandNextORB[136] = 0;
|
|
638
|
+
isoBandNextXBR[136] = -1;
|
|
639
|
+
isoBandNextYBR[136] = 0;
|
|
640
|
+
isoBandNextOBR[136] = 1;
|
|
641
|
+
isoBandNextXBL[136] = -1;
|
|
642
|
+
isoBandNextYBL[136] = 0;
|
|
643
|
+
isoBandNextOBL[136] = 0;
|
|
644
|
+
isoBandNextXLB[136] = 0;
|
|
645
|
+
isoBandNextYLB[136] = -1;
|
|
646
|
+
isoBandNextOLB[136] = 0;
|
|
647
|
+
isoBandNextXLT[136] = 0;
|
|
648
|
+
isoBandNextYLT[136] = -1;
|
|
649
|
+
isoBandNextOLT[136] = 1;
|
|
650
|
+
isoBandNextXTL[136] = 1;
|
|
651
|
+
isoBandNextYTL[136] = 0;
|
|
652
|
+
isoBandNextOTL[136] = 0;
|
|
653
|
+
isoBandNextXTR[136] = 1;
|
|
654
|
+
isoBandNextYTR[136] = 0;
|
|
655
|
+
isoBandNextOTR[136] = 1;
|
|
656
|
+
|
|
657
|
+
isoBandNextXRT[34] = 0;
|
|
658
|
+
isoBandNextYRT[34] = -1;
|
|
659
|
+
isoBandNextORT[34] = 0;
|
|
660
|
+
isoBandNextXRB[34] = 0;
|
|
661
|
+
isoBandNextYRB[34] = -1;
|
|
662
|
+
isoBandNextORB[34] = 1;
|
|
663
|
+
isoBandNextXBR[34] = 1;
|
|
664
|
+
isoBandNextYBR[34] = 0;
|
|
665
|
+
isoBandNextOBR[34] = 0;
|
|
666
|
+
isoBandNextXBL[34] = 1;
|
|
667
|
+
isoBandNextYBL[34] = 0;
|
|
668
|
+
isoBandNextOBL[34] = 1;
|
|
669
|
+
isoBandNextXLB[34] = 0;
|
|
670
|
+
isoBandNextYLB[34] = 1;
|
|
671
|
+
isoBandNextOLB[34] = 1;
|
|
672
|
+
isoBandNextXLT[34] = 0;
|
|
673
|
+
isoBandNextYLT[34] = 1;
|
|
674
|
+
isoBandNextOLT[34] = 0;
|
|
675
|
+
isoBandNextXTL[34] = -1;
|
|
676
|
+
isoBandNextYTL[34] = 0;
|
|
677
|
+
isoBandNextOTL[34] = 1;
|
|
678
|
+
isoBandNextXTR[34] = -1;
|
|
679
|
+
isoBandNextYTR[34] = 0;
|
|
680
|
+
isoBandNextOTR[34] = 0;
|
|
681
|
+
|
|
682
|
+
isoBandNextXRT[35] = 0;
|
|
683
|
+
isoBandNextYRT[35] = 1;
|
|
684
|
+
isoBandNextORT[35] = 1;
|
|
685
|
+
isoBandNextXRB[35] = 0;
|
|
686
|
+
isoBandNextYRB[35] = -1;
|
|
687
|
+
isoBandNextORB[35] = 1;
|
|
688
|
+
isoBandNextXBR[35] = 1;
|
|
689
|
+
isoBandNextYBR[35] = 0;
|
|
690
|
+
isoBandNextOBR[35] = 0;
|
|
691
|
+
isoBandNextXBL[35] = -1;
|
|
692
|
+
isoBandNextYBL[35] = 0;
|
|
693
|
+
isoBandNextOBL[35] = 0;
|
|
694
|
+
isoBandNextXLB[35] = 0;
|
|
695
|
+
isoBandNextYLB[35] = -1;
|
|
696
|
+
isoBandNextOLB[35] = 0;
|
|
697
|
+
isoBandNextXLT[35] = 0;
|
|
698
|
+
isoBandNextYLT[35] = 1;
|
|
699
|
+
isoBandNextOLT[35] = 0;
|
|
700
|
+
isoBandNextXTL[35] = -1;
|
|
701
|
+
isoBandNextYTL[35] = 0;
|
|
702
|
+
isoBandNextOTL[35] = 1;
|
|
703
|
+
isoBandNextXTR[35] = 1;
|
|
704
|
+
isoBandNextYTR[35] = 0;
|
|
705
|
+
isoBandNextOTR[35] = 1;
|
|
706
|
+
|
|
707
|
+
/* 6-sided cases */
|
|
708
|
+
isoBandNextXRT[153] = 0;
|
|
709
|
+
isoBandNextYRT[153] = 1;
|
|
710
|
+
isoBandNextORT[153] = 1;
|
|
711
|
+
isoBandNextXBL[153] = -1;
|
|
712
|
+
isoBandNextYBL[153] = 0;
|
|
713
|
+
isoBandNextOBL[153] = 0;
|
|
714
|
+
isoBandNextXLB[153] = 0;
|
|
715
|
+
isoBandNextYLB[153] = -1;
|
|
716
|
+
isoBandNextOLB[153] = 0;
|
|
717
|
+
isoBandNextXTR[153] = 1;
|
|
718
|
+
isoBandNextYTR[153] = 0;
|
|
719
|
+
isoBandNextOTR[153] = 1;
|
|
720
|
+
|
|
721
|
+
isoBandNextXRB[102] = 0;
|
|
722
|
+
isoBandNextYRB[102] = -1;
|
|
723
|
+
isoBandNextORB[102] = 1;
|
|
724
|
+
isoBandNextXBR[102] = 1;
|
|
725
|
+
isoBandNextYBR[102] = 0;
|
|
726
|
+
isoBandNextOBR[102] = 0;
|
|
727
|
+
isoBandNextXLT[102] = 0;
|
|
728
|
+
isoBandNextYLT[102] = 1;
|
|
729
|
+
isoBandNextOLT[102] = 0;
|
|
730
|
+
isoBandNextXTL[102] = -1;
|
|
731
|
+
isoBandNextYTL[102] = 0;
|
|
732
|
+
isoBandNextOTL[102] = 1;
|
|
733
|
+
|
|
734
|
+
isoBandNextXRT[155] = 0;
|
|
735
|
+
isoBandNextYRT[155] = -1;
|
|
736
|
+
isoBandNextORT[155] = 0;
|
|
737
|
+
isoBandNextXBL[155] = 1;
|
|
738
|
+
isoBandNextYBL[155] = 0;
|
|
739
|
+
isoBandNextOBL[155] = 1;
|
|
740
|
+
isoBandNextXLB[155] = 0;
|
|
741
|
+
isoBandNextYLB[155] = 1;
|
|
742
|
+
isoBandNextOLB[155] = 1;
|
|
743
|
+
isoBandNextXTR[155] = -1;
|
|
744
|
+
isoBandNextYTR[155] = 0;
|
|
745
|
+
isoBandNextOTR[155] = 0;
|
|
746
|
+
|
|
747
|
+
isoBandNextXRB[103] = 0;
|
|
748
|
+
isoBandNextYRB[103] = 1;
|
|
749
|
+
isoBandNextORB[103] = 0;
|
|
750
|
+
isoBandNextXBR[103] = -1;
|
|
751
|
+
isoBandNextYBR[103] = 0;
|
|
752
|
+
isoBandNextOBR[103] = 1;
|
|
753
|
+
isoBandNextXLT[103] = 0;
|
|
754
|
+
isoBandNextYLT[103] = -1;
|
|
755
|
+
isoBandNextOLT[103] = 1;
|
|
756
|
+
isoBandNextXTL[103] = 1;
|
|
757
|
+
isoBandNextYTL[103] = 0;
|
|
758
|
+
isoBandNextOTL[103] = 0;
|
|
759
|
+
|
|
760
|
+
/* 7-sided cases */
|
|
761
|
+
isoBandNextXRT[152] = 0;
|
|
762
|
+
isoBandNextYRT[152] = 1;
|
|
763
|
+
isoBandNextORT[152] = 1;
|
|
764
|
+
isoBandNextXBR[152] = -1;
|
|
765
|
+
isoBandNextYBR[152] = 0;
|
|
766
|
+
isoBandNextOBR[152] = 1;
|
|
767
|
+
isoBandNextXBL[152] = -1;
|
|
768
|
+
isoBandNextYBL[152] = 0;
|
|
769
|
+
isoBandNextOBL[152] = 0;
|
|
770
|
+
isoBandNextXLB[152] = 0;
|
|
771
|
+
isoBandNextYLB[152] = -1;
|
|
772
|
+
isoBandNextOLB[152] = 0;
|
|
773
|
+
isoBandNextXLT[152] = 0;
|
|
774
|
+
isoBandNextYLT[152] = -1;
|
|
775
|
+
isoBandNextOLT[152] = 1;
|
|
776
|
+
isoBandNextXTR[152] = 1;
|
|
777
|
+
isoBandNextYTR[152] = 0;
|
|
778
|
+
isoBandNextOTR[152] = 1;
|
|
779
|
+
|
|
780
|
+
isoBandNextXRT[156] = 0;
|
|
781
|
+
isoBandNextYRT[156] = -1;
|
|
782
|
+
isoBandNextORT[156] = 1;
|
|
783
|
+
isoBandNextXBR[156] = 1;
|
|
784
|
+
isoBandNextYBR[156] = 0;
|
|
785
|
+
isoBandNextOBR[156] = 1;
|
|
786
|
+
isoBandNextXBL[156] = -1;
|
|
787
|
+
isoBandNextYBL[156] = 0;
|
|
788
|
+
isoBandNextOBL[156] = 0;
|
|
789
|
+
isoBandNextXLB[156] = 0;
|
|
790
|
+
isoBandNextYLB[156] = -1;
|
|
791
|
+
isoBandNextOLB[156] = 0;
|
|
792
|
+
isoBandNextXLT[156] = 0;
|
|
793
|
+
isoBandNextYLT[156] = 1;
|
|
794
|
+
isoBandNextOLT[156] = 1;
|
|
795
|
+
isoBandNextXTR[156] = -1;
|
|
796
|
+
isoBandNextYTR[156] = 0;
|
|
797
|
+
isoBandNextOTR[156] = 1;
|
|
798
|
+
|
|
799
|
+
isoBandNextXRT[137] = 0;
|
|
800
|
+
isoBandNextYRT[137] = 1;
|
|
801
|
+
isoBandNextORT[137] = 1;
|
|
802
|
+
isoBandNextXRB[137] = 0;
|
|
803
|
+
isoBandNextYRB[137] = 1;
|
|
804
|
+
isoBandNextORB[137] = 0;
|
|
805
|
+
isoBandNextXBL[137] = -1;
|
|
806
|
+
isoBandNextYBL[137] = 0;
|
|
807
|
+
isoBandNextOBL[137] = 0;
|
|
808
|
+
isoBandNextXLB[137] = 0;
|
|
809
|
+
isoBandNextYLB[137] = -1;
|
|
810
|
+
isoBandNextOLB[137] = 0;
|
|
811
|
+
isoBandNextXTL[137] = 1;
|
|
812
|
+
isoBandNextYTL[137] = 0;
|
|
813
|
+
isoBandNextOTL[137] = 0;
|
|
814
|
+
isoBandNextXTR[137] = 1;
|
|
815
|
+
isoBandNextYTR[137] = 0;
|
|
816
|
+
isoBandNextOTR[137] = 1;
|
|
817
|
+
|
|
818
|
+
isoBandNextXRT[139] = 0;
|
|
819
|
+
isoBandNextYRT[139] = 1;
|
|
820
|
+
isoBandNextORT[139] = 1;
|
|
821
|
+
isoBandNextXRB[139] = 0;
|
|
822
|
+
isoBandNextYRB[139] = -1;
|
|
823
|
+
isoBandNextORB[139] = 0;
|
|
824
|
+
isoBandNextXBL[139] = 1;
|
|
825
|
+
isoBandNextYBL[139] = 0;
|
|
826
|
+
isoBandNextOBL[139] = 0;
|
|
827
|
+
isoBandNextXLB[139] = 0;
|
|
828
|
+
isoBandNextYLB[139] = 1;
|
|
829
|
+
isoBandNextOLB[139] = 0;
|
|
830
|
+
isoBandNextXTL[139] = -1;
|
|
831
|
+
isoBandNextYTL[139] = 0;
|
|
832
|
+
isoBandNextOTL[139] = 0;
|
|
833
|
+
isoBandNextXTR[139] = 1;
|
|
834
|
+
isoBandNextYTR[139] = 0;
|
|
835
|
+
isoBandNextOTR[139] = 1;
|
|
836
|
+
|
|
837
|
+
isoBandNextXRT[98] = 0;
|
|
838
|
+
isoBandNextYRT[98] = -1;
|
|
839
|
+
isoBandNextORT[98] = 0;
|
|
840
|
+
isoBandNextXRB[98] = 0;
|
|
841
|
+
isoBandNextYRB[98] = -1;
|
|
842
|
+
isoBandNextORB[98] = 1;
|
|
843
|
+
isoBandNextXBR[98] = 1;
|
|
844
|
+
isoBandNextYBR[98] = 0;
|
|
845
|
+
isoBandNextOBR[98] = 0;
|
|
846
|
+
isoBandNextXBL[98] = 1;
|
|
847
|
+
isoBandNextYBL[98] = 0;
|
|
848
|
+
isoBandNextOBL[98] = 1;
|
|
849
|
+
isoBandNextXLT[98] = 0;
|
|
850
|
+
isoBandNextYLT[98] = 1;
|
|
851
|
+
isoBandNextOLT[98] = 0;
|
|
852
|
+
isoBandNextXTL[98] = -1;
|
|
853
|
+
isoBandNextYTL[98] = 0;
|
|
854
|
+
isoBandNextOTL[98] = 1;
|
|
855
|
+
|
|
856
|
+
isoBandNextXRT[99] = 0;
|
|
857
|
+
isoBandNextYRT[99] = 1;
|
|
858
|
+
isoBandNextORT[99] = 0;
|
|
859
|
+
isoBandNextXRB[99] = 0;
|
|
860
|
+
isoBandNextYRB[99] = -1;
|
|
861
|
+
isoBandNextORB[99] = 1;
|
|
862
|
+
isoBandNextXBR[99] = 1;
|
|
863
|
+
isoBandNextYBR[99] = 0;
|
|
864
|
+
isoBandNextOBR[99] = 0;
|
|
865
|
+
isoBandNextXBL[99] = -1;
|
|
866
|
+
isoBandNextYBL[99] = 0;
|
|
867
|
+
isoBandNextOBL[99] = 1;
|
|
868
|
+
isoBandNextXLT[99] = 0;
|
|
869
|
+
isoBandNextYLT[99] = -1;
|
|
870
|
+
isoBandNextOLT[99] = 0;
|
|
871
|
+
isoBandNextXTL[99] = 1;
|
|
872
|
+
isoBandNextYTL[99] = 0;
|
|
873
|
+
isoBandNextOTL[99] = 1;
|
|
874
|
+
|
|
875
|
+
isoBandNextXRB[38] = 0;
|
|
876
|
+
isoBandNextYRB[38] = -1;
|
|
877
|
+
isoBandNextORB[38] = 1;
|
|
878
|
+
isoBandNextXBR[38] = 1;
|
|
879
|
+
isoBandNextYBR[38] = 0;
|
|
880
|
+
isoBandNextOBR[38] = 0;
|
|
881
|
+
isoBandNextXLB[38] = 0;
|
|
882
|
+
isoBandNextYLB[38] = 1;
|
|
883
|
+
isoBandNextOLB[38] = 1;
|
|
884
|
+
isoBandNextXLT[38] = 0;
|
|
885
|
+
isoBandNextYLT[38] = 1;
|
|
886
|
+
isoBandNextOLT[38] = 0;
|
|
887
|
+
isoBandNextXTL[38] = -1;
|
|
888
|
+
isoBandNextYTL[38] = 0;
|
|
889
|
+
isoBandNextOTL[38] = 1;
|
|
890
|
+
isoBandNextXTR[38] = -1;
|
|
891
|
+
isoBandNextYTR[38] = 0;
|
|
892
|
+
isoBandNextOTR[38] = 0;
|
|
893
|
+
|
|
894
|
+
isoBandNextXRB[39] = 0;
|
|
895
|
+
isoBandNextYRB[39] = 1;
|
|
896
|
+
isoBandNextORB[39] = 1;
|
|
897
|
+
isoBandNextXBR[39] = -1;
|
|
898
|
+
isoBandNextYBR[39] = 0;
|
|
899
|
+
isoBandNextOBR[39] = 0;
|
|
900
|
+
isoBandNextXLB[39] = 0;
|
|
901
|
+
isoBandNextYLB[39] = -1;
|
|
902
|
+
isoBandNextOLB[39] = 1;
|
|
903
|
+
isoBandNextXLT[39] = 0;
|
|
904
|
+
isoBandNextYLT[39] = 1;
|
|
905
|
+
isoBandNextOLT[39] = 0;
|
|
906
|
+
isoBandNextXTL[39] = -1;
|
|
907
|
+
isoBandNextYTL[39] = 0;
|
|
908
|
+
isoBandNextOTL[39] = 1;
|
|
909
|
+
isoBandNextXTR[39] = 1;
|
|
910
|
+
isoBandNextYTR[39] = 0;
|
|
911
|
+
isoBandNextOTR[39] = 0;
|
|
912
|
+
|
|
913
|
+
/*
|
|
914
|
+
Define helper functions for the polygon_table
|
|
915
|
+
*/
|
|
916
|
+
|
|
917
|
+
/* triangle cases */
|
|
918
|
+
var p00 = function (cell) {
|
|
919
|
+
return [
|
|
920
|
+
[cell.bottomleft, 0],
|
|
921
|
+
[0, 0],
|
|
922
|
+
[0, cell.leftbottom],
|
|
923
|
+
];
|
|
924
|
+
};
|
|
925
|
+
var p01 = function (cell) {
|
|
926
|
+
return [
|
|
927
|
+
[1, cell.rightbottom],
|
|
928
|
+
[1, 0],
|
|
929
|
+
[cell.bottomright, 0],
|
|
930
|
+
];
|
|
931
|
+
};
|
|
932
|
+
var p02 = function (cell) {
|
|
933
|
+
return [
|
|
934
|
+
[cell.topright, 1],
|
|
935
|
+
[1, 1],
|
|
936
|
+
[1, cell.righttop],
|
|
937
|
+
];
|
|
938
|
+
};
|
|
939
|
+
var p03 = function (cell) {
|
|
940
|
+
return [
|
|
941
|
+
[0, cell.lefttop],
|
|
942
|
+
[0, 1],
|
|
943
|
+
[cell.topleft, 1],
|
|
944
|
+
];
|
|
945
|
+
};
|
|
946
|
+
/* trapezoid cases */
|
|
947
|
+
var p04 = function (cell) {
|
|
948
|
+
return [
|
|
949
|
+
[cell.bottomright, 0],
|
|
950
|
+
[cell.bottomleft, 0],
|
|
951
|
+
[0, cell.leftbottom],
|
|
952
|
+
[0, cell.lefttop],
|
|
953
|
+
];
|
|
954
|
+
};
|
|
955
|
+
var p05 = function (cell) {
|
|
956
|
+
return [
|
|
957
|
+
[cell.bottomright, 0],
|
|
958
|
+
[cell.bottomleft, 0],
|
|
959
|
+
[1, cell.righttop],
|
|
960
|
+
[1, cell.rightbottom],
|
|
961
|
+
];
|
|
962
|
+
};
|
|
963
|
+
var p06 = function (cell) {
|
|
964
|
+
return [
|
|
965
|
+
[1, cell.righttop],
|
|
966
|
+
[1, cell.rightbottom],
|
|
967
|
+
[cell.topleft, 1],
|
|
968
|
+
[cell.topright, 1],
|
|
969
|
+
];
|
|
970
|
+
};
|
|
971
|
+
var p07 = function (cell) {
|
|
972
|
+
return [
|
|
973
|
+
[0, cell.leftbottom],
|
|
974
|
+
[0, cell.lefttop],
|
|
975
|
+
[cell.topleft, 1],
|
|
976
|
+
[cell.topright, 1],
|
|
977
|
+
];
|
|
978
|
+
};
|
|
979
|
+
/* rectangle cases */
|
|
980
|
+
var p08 = function (cell) {
|
|
981
|
+
return [
|
|
982
|
+
[0, 0],
|
|
983
|
+
[0, cell.leftbottom],
|
|
984
|
+
[1, cell.rightbottom],
|
|
985
|
+
[1, 0],
|
|
986
|
+
];
|
|
987
|
+
};
|
|
988
|
+
var p09 = function (cell) {
|
|
989
|
+
return [
|
|
990
|
+
[1, 0],
|
|
991
|
+
[cell.bottomright, 0],
|
|
992
|
+
[cell.topright, 1],
|
|
993
|
+
[1, 1],
|
|
994
|
+
];
|
|
995
|
+
};
|
|
996
|
+
var p10 = function (cell) {
|
|
997
|
+
return [
|
|
998
|
+
[1, 1],
|
|
999
|
+
[1, cell.righttop],
|
|
1000
|
+
[0, cell.lefttop],
|
|
1001
|
+
[0, 1],
|
|
1002
|
+
];
|
|
1003
|
+
};
|
|
1004
|
+
var p11 = function (cell) {
|
|
1005
|
+
return [
|
|
1006
|
+
[cell.bottomleft, 0],
|
|
1007
|
+
[0, 0],
|
|
1008
|
+
[0, 1],
|
|
1009
|
+
[cell.topleft, 1],
|
|
1010
|
+
];
|
|
1011
|
+
};
|
|
1012
|
+
var p12 = function (cell) {
|
|
1013
|
+
return [
|
|
1014
|
+
[1, cell.righttop],
|
|
1015
|
+
[1, cell.rightbottom],
|
|
1016
|
+
[0, cell.leftbottom],
|
|
1017
|
+
[0, cell.lefttop],
|
|
1018
|
+
];
|
|
1019
|
+
};
|
|
1020
|
+
var p13 = function (cell) {
|
|
1021
|
+
return [
|
|
1022
|
+
[cell.topleft, 1],
|
|
1023
|
+
[cell.topright, 1],
|
|
1024
|
+
[cell.bottomright, 0],
|
|
1025
|
+
[cell.bottomleft, 0],
|
|
1026
|
+
];
|
|
1027
|
+
};
|
|
1028
|
+
/* square case */
|
|
1029
|
+
var p14 = function () {
|
|
1030
|
+
return [
|
|
1031
|
+
[0, 0],
|
|
1032
|
+
[0, 1],
|
|
1033
|
+
[1, 1],
|
|
1034
|
+
[1, 0],
|
|
1035
|
+
];
|
|
1036
|
+
};
|
|
1037
|
+
/* pentagon cases */
|
|
1038
|
+
var p15 = function (cell) {
|
|
1039
|
+
return [
|
|
1040
|
+
[1, cell.rightbottom],
|
|
1041
|
+
[1, 0],
|
|
1042
|
+
[0, 0],
|
|
1043
|
+
[0, 1],
|
|
1044
|
+
[cell.topleft, 1],
|
|
1045
|
+
];
|
|
1046
|
+
};
|
|
1047
|
+
/* 1211 || 1011 */
|
|
1048
|
+
var p16 = function (cell) {
|
|
1049
|
+
return [
|
|
1050
|
+
[cell.topright, 1],
|
|
1051
|
+
[1, 1],
|
|
1052
|
+
[1, 0],
|
|
1053
|
+
[0, 0],
|
|
1054
|
+
[0, cell.leftbottom],
|
|
1055
|
+
];
|
|
1056
|
+
};
|
|
1057
|
+
/* 2111 || 0111 */
|
|
1058
|
+
var p17 = function (cell) {
|
|
1059
|
+
return [
|
|
1060
|
+
[1, 0],
|
|
1061
|
+
[cell.bottomright, 0],
|
|
1062
|
+
[0, cell.lefttop],
|
|
1063
|
+
[0, 1],
|
|
1064
|
+
[1, 1],
|
|
1065
|
+
];
|
|
1066
|
+
};
|
|
1067
|
+
/* 1112 || 1110 */
|
|
1068
|
+
var p18 = function (cell) {
|
|
1069
|
+
return [
|
|
1070
|
+
[1, 1],
|
|
1071
|
+
[1, cell.righttop],
|
|
1072
|
+
[cell.bottomleft, 0],
|
|
1073
|
+
[0, 0],
|
|
1074
|
+
[0, 1],
|
|
1075
|
+
];
|
|
1076
|
+
};
|
|
1077
|
+
/* 1121 || 1101 */
|
|
1078
|
+
var p19 = function (cell) {
|
|
1079
|
+
return [
|
|
1080
|
+
[1, cell.righttop],
|
|
1081
|
+
[1, cell.rightbottom],
|
|
1082
|
+
[0, cell.lefttop],
|
|
1083
|
+
[0, 1],
|
|
1084
|
+
[cell.topleft, 1],
|
|
1085
|
+
];
|
|
1086
|
+
};
|
|
1087
|
+
/* 1200 || 1022 */
|
|
1088
|
+
var p20 = function (cell) {
|
|
1089
|
+
return [
|
|
1090
|
+
[1, 1],
|
|
1091
|
+
[1, cell.righttop],
|
|
1092
|
+
[cell.bottomright, 0],
|
|
1093
|
+
[cell.bottomleft, 0],
|
|
1094
|
+
[cell.topright, 1],
|
|
1095
|
+
];
|
|
1096
|
+
};
|
|
1097
|
+
/* 0120 || 2102 */
|
|
1098
|
+
var p21 = function (cell) {
|
|
1099
|
+
return [
|
|
1100
|
+
[1, cell.rightbottom],
|
|
1101
|
+
[1, 0],
|
|
1102
|
+
[cell.bottomright, 0],
|
|
1103
|
+
[0, cell.leftbottom],
|
|
1104
|
+
[0, cell.lefttop],
|
|
1105
|
+
];
|
|
1106
|
+
};
|
|
1107
|
+
/* 0012 || 2210 */
|
|
1108
|
+
var p22 = function (cell) {
|
|
1109
|
+
return [
|
|
1110
|
+
[cell.topright, 1],
|
|
1111
|
+
[cell.bottomleft, 0],
|
|
1112
|
+
[0, 0],
|
|
1113
|
+
[0, cell.leftbottom],
|
|
1114
|
+
[cell.topleft, 1],
|
|
1115
|
+
];
|
|
1116
|
+
};
|
|
1117
|
+
/* 2001 || 0221 */
|
|
1118
|
+
var p23 = function (cell) {
|
|
1119
|
+
return [
|
|
1120
|
+
[cell.bottomright, 0],
|
|
1121
|
+
[cell.bottomleft, 0],
|
|
1122
|
+
[0, cell.lefttop],
|
|
1123
|
+
[0, 1],
|
|
1124
|
+
[cell.topleft, 1],
|
|
1125
|
+
];
|
|
1126
|
+
};
|
|
1127
|
+
/* 1002 || 1220 */
|
|
1128
|
+
var p24 = function (cell) {
|
|
1129
|
+
return [
|
|
1130
|
+
[1, 1],
|
|
1131
|
+
[1, cell.righttop],
|
|
1132
|
+
[0, cell.leftbottom],
|
|
1133
|
+
[0, cell.lefttop],
|
|
1134
|
+
[cell.topright, 1],
|
|
1135
|
+
];
|
|
1136
|
+
};
|
|
1137
|
+
/* 2100 || 0122 */
|
|
1138
|
+
var p25 = function (cell) {
|
|
1139
|
+
return [
|
|
1140
|
+
[1, cell.rightbottom],
|
|
1141
|
+
[1, 0],
|
|
1142
|
+
[cell.bottomright, 0],
|
|
1143
|
+
[cell.topleft, 1],
|
|
1144
|
+
[cell.topright, 1],
|
|
1145
|
+
];
|
|
1146
|
+
};
|
|
1147
|
+
/* 0210 || 2012 */
|
|
1148
|
+
var p26 = function (cell) {
|
|
1149
|
+
return [
|
|
1150
|
+
[1, cell.righttop],
|
|
1151
|
+
[1, cell.rightbottom],
|
|
1152
|
+
[cell.bottomleft, 0],
|
|
1153
|
+
[0, 0],
|
|
1154
|
+
[0, cell.leftbottom],
|
|
1155
|
+
];
|
|
1156
|
+
};
|
|
1157
|
+
/* 0021 || 2201 */
|
|
1158
|
+
/*hexagon cases */
|
|
1159
|
+
var p27 = function (cell) {
|
|
1160
|
+
return [
|
|
1161
|
+
[1, cell.rightbottom],
|
|
1162
|
+
[1, 0],
|
|
1163
|
+
[0, 0],
|
|
1164
|
+
[0, cell.leftbottom],
|
|
1165
|
+
[cell.topleft, 1],
|
|
1166
|
+
[cell.topright, 1],
|
|
1167
|
+
];
|
|
1168
|
+
};
|
|
1169
|
+
/* 0211 || 2011 */
|
|
1170
|
+
var p28 = function (cell) {
|
|
1171
|
+
return [
|
|
1172
|
+
[1, 1],
|
|
1173
|
+
[1, 0],
|
|
1174
|
+
[cell.bottomright, 0],
|
|
1175
|
+
[0, cell.leftbottom],
|
|
1176
|
+
[0, cell.lefttop],
|
|
1177
|
+
[cell.topright, 1],
|
|
1178
|
+
];
|
|
1179
|
+
};
|
|
1180
|
+
/* 2110 || 0112 */
|
|
1181
|
+
var p29 = function (cell) {
|
|
1182
|
+
return [
|
|
1183
|
+
[1, 1],
|
|
1184
|
+
[1, cell.righttop],
|
|
1185
|
+
[cell.bottomright, 0],
|
|
1186
|
+
[cell.bottomleft, 0],
|
|
1187
|
+
[0, cell.lefttop],
|
|
1188
|
+
[0, 1],
|
|
1189
|
+
];
|
|
1190
|
+
};
|
|
1191
|
+
/* 1102 || 1120 */
|
|
1192
|
+
var p30 = function (cell) {
|
|
1193
|
+
return [
|
|
1194
|
+
[1, cell.righttop],
|
|
1195
|
+
[1, cell.rightbottom],
|
|
1196
|
+
[cell.bottomleft, 0],
|
|
1197
|
+
[0, 0],
|
|
1198
|
+
[0, 1],
|
|
1199
|
+
[cell.topleft, 1],
|
|
1200
|
+
];
|
|
1201
|
+
};
|
|
1202
|
+
/* 1021 || 1201 */
|
|
1203
|
+
var p31 = function (cell) {
|
|
1204
|
+
return [
|
|
1205
|
+
[1, 1],
|
|
1206
|
+
[1, cell.righttop],
|
|
1207
|
+
[cell.bottomleft, 0],
|
|
1208
|
+
[0, 0],
|
|
1209
|
+
[0, cell.leftbottom],
|
|
1210
|
+
[cell.topright, 1],
|
|
1211
|
+
];
|
|
1212
|
+
};
|
|
1213
|
+
/* 2101 || 0121 */
|
|
1214
|
+
var p32 = function (cell) {
|
|
1215
|
+
return [
|
|
1216
|
+
[1, cell.rightbottom],
|
|
1217
|
+
[1, 0],
|
|
1218
|
+
[cell.bottomright, 0],
|
|
1219
|
+
[0, cell.lefttop],
|
|
1220
|
+
[0, 1],
|
|
1221
|
+
[cell.topleft, 1],
|
|
1222
|
+
];
|
|
1223
|
+
};
|
|
1224
|
+
/* 1012 || 1210 */
|
|
1225
|
+
/* 8-sided cases */
|
|
1226
|
+
var p33 = function (cell) {
|
|
1227
|
+
return [
|
|
1228
|
+
[1, cell.righttop],
|
|
1229
|
+
[1, cell.rightbottom],
|
|
1230
|
+
[cell.bottomright, 0],
|
|
1231
|
+
[cell.bottomleft, 0],
|
|
1232
|
+
[0, cell.leftbottom],
|
|
1233
|
+
[0, cell.lefttop],
|
|
1234
|
+
[cell.topleft, 1],
|
|
1235
|
+
[cell.topright, 1],
|
|
1236
|
+
];
|
|
1237
|
+
};
|
|
1238
|
+
/* flipped == 1 state for 0202 and 2020 */
|
|
1239
|
+
/* 6-sided cases */
|
|
1240
|
+
var p34 = function (cell) {
|
|
1241
|
+
return [
|
|
1242
|
+
[1, 1],
|
|
1243
|
+
[1, cell.righttop],
|
|
1244
|
+
[cell.bottomleft, 0],
|
|
1245
|
+
[0, 0],
|
|
1246
|
+
[0, cell.leftbottom],
|
|
1247
|
+
[cell.topright, 1],
|
|
1248
|
+
];
|
|
1249
|
+
};
|
|
1250
|
+
/* 0101 with flipped == 1 || 2121 with flipped == 1 */
|
|
1251
|
+
var p35 = function (cell) {
|
|
1252
|
+
return [
|
|
1253
|
+
[1, cell.rightbottom],
|
|
1254
|
+
[1, 0],
|
|
1255
|
+
[cell.bottomright, 0],
|
|
1256
|
+
[0, cell.lefttop],
|
|
1257
|
+
[0, 1],
|
|
1258
|
+
[cell.topleft, 1],
|
|
1259
|
+
];
|
|
1260
|
+
};
|
|
1261
|
+
/* 1010 with flipped == 1 || 1212 with flipped == 1 */
|
|
1262
|
+
/* 7-sided cases */
|
|
1263
|
+
var p36 = function (cell) {
|
|
1264
|
+
return [
|
|
1265
|
+
[1, 1],
|
|
1266
|
+
[1, cell.righttop],
|
|
1267
|
+
[cell.bottomright, 0],
|
|
1268
|
+
[cell.bottomleft, 0],
|
|
1269
|
+
[0, cell.leftbottom],
|
|
1270
|
+
[0, cell.lefttop],
|
|
1271
|
+
[cell.topright, 1],
|
|
1272
|
+
];
|
|
1273
|
+
};
|
|
1274
|
+
/* 2120 with flipped == 1 || 0102 with flipped == 1 */
|
|
1275
|
+
var p37 = function (cell) {
|
|
1276
|
+
return [
|
|
1277
|
+
[1, cell.righttop],
|
|
1278
|
+
[1, cell.rightbottom],
|
|
1279
|
+
[cell.bottomleft, 0],
|
|
1280
|
+
[0, 0],
|
|
1281
|
+
[0, cell.leftbottom],
|
|
1282
|
+
[cell.topleft, 1],
|
|
1283
|
+
[cell.topright, 1],
|
|
1284
|
+
];
|
|
1285
|
+
};
|
|
1286
|
+
/* 2021 with flipped == 1 || 0201 with flipped == 1 */
|
|
1287
|
+
var p38 = function (cell) {
|
|
1288
|
+
return [
|
|
1289
|
+
[1, cell.righttop],
|
|
1290
|
+
[1, cell.rightbottom],
|
|
1291
|
+
[cell.bottomright, 0],
|
|
1292
|
+
[cell.bottomleft, 0],
|
|
1293
|
+
[0, cell.lefttop],
|
|
1294
|
+
[0, 1],
|
|
1295
|
+
[cell.topleft, 1],
|
|
1296
|
+
];
|
|
1297
|
+
};
|
|
1298
|
+
/* 1202 with flipped == 1 || 1020 with flipped == 1 */
|
|
1299
|
+
var p39 = function (cell) {
|
|
1300
|
+
return [
|
|
1301
|
+
[1, cell.rightbottom],
|
|
1302
|
+
[1, 0],
|
|
1303
|
+
[cell.bottomright, 0],
|
|
1304
|
+
[0, cell.leftbottom],
|
|
1305
|
+
[0, cell.lefttop],
|
|
1306
|
+
[cell.topleft, 1],
|
|
1307
|
+
[cell.topright, 1],
|
|
1308
|
+
];
|
|
1309
|
+
};
|
|
1310
|
+
/* 0212 with flipped == 1 || 2010 with flipped == 1 */
|
|
1311
|
+
|
|
1312
|
+
/*
|
|
1313
|
+
The lookup tables for edge number given the polygon
|
|
1314
|
+
is entered at a specific location
|
|
1315
|
+
*/
|
|
1316
|
+
|
|
1317
|
+
var isoBandEdgeRT = [];
|
|
1318
|
+
var isoBandEdgeRB = [];
|
|
1319
|
+
var isoBandEdgeBR = [];
|
|
1320
|
+
var isoBandEdgeBL = [];
|
|
1321
|
+
var isoBandEdgeLB = [];
|
|
1322
|
+
var isoBandEdgeLT = [];
|
|
1323
|
+
var isoBandEdgeTL = [];
|
|
1324
|
+
var isoBandEdgeTR = [];
|
|
1325
|
+
|
|
1326
|
+
/* triangle cases */
|
|
1327
|
+
isoBandEdgeBL[1] = isoBandEdgeLB[1] = 18;
|
|
1328
|
+
isoBandEdgeBL[169] = isoBandEdgeLB[169] = 18;
|
|
1329
|
+
isoBandEdgeBR[4] = isoBandEdgeRB[4] = 12;
|
|
1330
|
+
isoBandEdgeBR[166] = isoBandEdgeRB[166] = 12;
|
|
1331
|
+
isoBandEdgeRT[16] = isoBandEdgeTR[16] = 4;
|
|
1332
|
+
isoBandEdgeRT[154] = isoBandEdgeTR[154] = 4;
|
|
1333
|
+
isoBandEdgeLT[64] = isoBandEdgeTL[64] = 22;
|
|
1334
|
+
isoBandEdgeLT[106] = isoBandEdgeTL[106] = 22;
|
|
1335
|
+
|
|
1336
|
+
/* trapezoid cases */
|
|
1337
|
+
isoBandEdgeBR[2] = isoBandEdgeLT[2] = 17;
|
|
1338
|
+
isoBandEdgeBL[2] = isoBandEdgeLB[2] = 18;
|
|
1339
|
+
isoBandEdgeBR[168] = isoBandEdgeLT[168] = 17;
|
|
1340
|
+
isoBandEdgeBL[168] = isoBandEdgeLB[168] = 18;
|
|
1341
|
+
isoBandEdgeRT[8] = isoBandEdgeBL[8] = 9;
|
|
1342
|
+
isoBandEdgeRB[8] = isoBandEdgeBR[8] = 12;
|
|
1343
|
+
isoBandEdgeRT[162] = isoBandEdgeBL[162] = 9;
|
|
1344
|
+
isoBandEdgeRB[162] = isoBandEdgeBR[162] = 12;
|
|
1345
|
+
isoBandEdgeRT[32] = isoBandEdgeTR[32] = 4;
|
|
1346
|
+
isoBandEdgeRB[32] = isoBandEdgeTL[32] = 1;
|
|
1347
|
+
isoBandEdgeRT[138] = isoBandEdgeTR[138] = 4;
|
|
1348
|
+
isoBandEdgeRB[138] = isoBandEdgeTL[138] = 1;
|
|
1349
|
+
isoBandEdgeLB[128] = isoBandEdgeTR[128] = 21;
|
|
1350
|
+
isoBandEdgeLT[128] = isoBandEdgeTL[128] = 22;
|
|
1351
|
+
isoBandEdgeLB[42] = isoBandEdgeTR[42] = 21;
|
|
1352
|
+
isoBandEdgeLT[42] = isoBandEdgeTL[42] = 22;
|
|
1353
|
+
|
|
1354
|
+
/* rectangle cases */
|
|
1355
|
+
isoBandEdgeRB[5] = isoBandEdgeLB[5] = 14;
|
|
1356
|
+
isoBandEdgeRB[165] = isoBandEdgeLB[165] = 14;
|
|
1357
|
+
isoBandEdgeBR[20] = isoBandEdgeTR[20] = 6;
|
|
1358
|
+
isoBandEdgeBR[150] = isoBandEdgeTR[150] = 6;
|
|
1359
|
+
isoBandEdgeRT[80] = isoBandEdgeLT[80] = 11;
|
|
1360
|
+
isoBandEdgeRT[90] = isoBandEdgeLT[90] = 11;
|
|
1361
|
+
isoBandEdgeBL[65] = isoBandEdgeTL[65] = 3;
|
|
1362
|
+
isoBandEdgeBL[105] = isoBandEdgeTL[105] = 3;
|
|
1363
|
+
isoBandEdgeRT[160] = isoBandEdgeLT[160] = 11;
|
|
1364
|
+
isoBandEdgeRB[160] = isoBandEdgeLB[160] = 14;
|
|
1365
|
+
isoBandEdgeRT[10] = isoBandEdgeLT[10] = 11;
|
|
1366
|
+
isoBandEdgeRB[10] = isoBandEdgeLB[10] = 14;
|
|
1367
|
+
isoBandEdgeBR[130] = isoBandEdgeTR[130] = 6;
|
|
1368
|
+
isoBandEdgeBL[130] = isoBandEdgeTL[130] = 3;
|
|
1369
|
+
isoBandEdgeBR[40] = isoBandEdgeTR[40] = 6;
|
|
1370
|
+
isoBandEdgeBL[40] = isoBandEdgeTL[40] = 3;
|
|
1371
|
+
|
|
1372
|
+
/* pentagon cases */
|
|
1373
|
+
isoBandEdgeRB[101] = isoBandEdgeTL[101] = 1;
|
|
1374
|
+
isoBandEdgeRB[69] = isoBandEdgeTL[69] = 1;
|
|
1375
|
+
isoBandEdgeLB[149] = isoBandEdgeTR[149] = 21;
|
|
1376
|
+
isoBandEdgeLB[21] = isoBandEdgeTR[21] = 21;
|
|
1377
|
+
isoBandEdgeBR[86] = isoBandEdgeLT[86] = 17;
|
|
1378
|
+
isoBandEdgeBR[84] = isoBandEdgeLT[84] = 17;
|
|
1379
|
+
isoBandEdgeRT[89] = isoBandEdgeBL[89] = 9;
|
|
1380
|
+
isoBandEdgeRT[81] = isoBandEdgeBL[81] = 9;
|
|
1381
|
+
isoBandEdgeRT[96] = isoBandEdgeTL[96] = 0;
|
|
1382
|
+
isoBandEdgeRB[96] = isoBandEdgeLT[96] = 15;
|
|
1383
|
+
isoBandEdgeRT[74] = isoBandEdgeTL[74] = 0;
|
|
1384
|
+
isoBandEdgeRB[74] = isoBandEdgeLT[74] = 15;
|
|
1385
|
+
isoBandEdgeRT[24] = isoBandEdgeBR[24] = 8;
|
|
1386
|
+
isoBandEdgeBL[24] = isoBandEdgeTR[24] = 7;
|
|
1387
|
+
isoBandEdgeRT[146] = isoBandEdgeBR[146] = 8;
|
|
1388
|
+
isoBandEdgeBL[146] = isoBandEdgeTR[146] = 7;
|
|
1389
|
+
isoBandEdgeRB[6] = isoBandEdgeLT[6] = 15;
|
|
1390
|
+
isoBandEdgeBR[6] = isoBandEdgeLB[6] = 16;
|
|
1391
|
+
isoBandEdgeRB[164] = isoBandEdgeLT[164] = 15;
|
|
1392
|
+
isoBandEdgeBR[164] = isoBandEdgeLB[164] = 16;
|
|
1393
|
+
isoBandEdgeBL[129] = isoBandEdgeTR[129] = 7;
|
|
1394
|
+
isoBandEdgeLB[129] = isoBandEdgeTL[129] = 20;
|
|
1395
|
+
isoBandEdgeBL[41] = isoBandEdgeTR[41] = 7;
|
|
1396
|
+
isoBandEdgeLB[41] = isoBandEdgeTL[41] = 20;
|
|
1397
|
+
isoBandEdgeBR[66] = isoBandEdgeTL[66] = 2;
|
|
1398
|
+
isoBandEdgeBL[66] = isoBandEdgeLT[66] = 19;
|
|
1399
|
+
isoBandEdgeBR[104] = isoBandEdgeTL[104] = 2;
|
|
1400
|
+
isoBandEdgeBL[104] = isoBandEdgeLT[104] = 19;
|
|
1401
|
+
isoBandEdgeRT[144] = isoBandEdgeLB[144] = 10;
|
|
1402
|
+
isoBandEdgeLT[144] = isoBandEdgeTR[144] = 23;
|
|
1403
|
+
isoBandEdgeRT[26] = isoBandEdgeLB[26] = 10;
|
|
1404
|
+
isoBandEdgeLT[26] = isoBandEdgeTR[26] = 23;
|
|
1405
|
+
isoBandEdgeRB[36] = isoBandEdgeTR[36] = 5;
|
|
1406
|
+
isoBandEdgeBR[36] = isoBandEdgeTL[36] = 2;
|
|
1407
|
+
isoBandEdgeRB[134] = isoBandEdgeTR[134] = 5;
|
|
1408
|
+
isoBandEdgeBR[134] = isoBandEdgeTL[134] = 2;
|
|
1409
|
+
isoBandEdgeRT[9] = isoBandEdgeLB[9] = 10;
|
|
1410
|
+
isoBandEdgeRB[9] = isoBandEdgeBL[9] = 13;
|
|
1411
|
+
isoBandEdgeRT[161] = isoBandEdgeLB[161] = 10;
|
|
1412
|
+
isoBandEdgeRB[161] = isoBandEdgeBL[161] = 13;
|
|
1413
|
+
|
|
1414
|
+
/* hexagon cases */
|
|
1415
|
+
isoBandEdgeRB[37] = isoBandEdgeTR[37] = 5;
|
|
1416
|
+
isoBandEdgeLB[37] = isoBandEdgeTL[37] = 20;
|
|
1417
|
+
isoBandEdgeRB[133] = isoBandEdgeTR[133] = 5;
|
|
1418
|
+
isoBandEdgeLB[133] = isoBandEdgeTL[133] = 20;
|
|
1419
|
+
isoBandEdgeBR[148] = isoBandEdgeLB[148] = 16;
|
|
1420
|
+
isoBandEdgeLT[148] = isoBandEdgeTR[148] = 23;
|
|
1421
|
+
isoBandEdgeBR[22] = isoBandEdgeLB[22] = 16;
|
|
1422
|
+
isoBandEdgeLT[22] = isoBandEdgeTR[22] = 23;
|
|
1423
|
+
isoBandEdgeRT[82] = isoBandEdgeBR[82] = 8;
|
|
1424
|
+
isoBandEdgeBL[82] = isoBandEdgeLT[82] = 19;
|
|
1425
|
+
isoBandEdgeRT[88] = isoBandEdgeBR[88] = 8;
|
|
1426
|
+
isoBandEdgeBL[88] = isoBandEdgeLT[88] = 19;
|
|
1427
|
+
isoBandEdgeRT[73] = isoBandEdgeTL[73] = 0;
|
|
1428
|
+
isoBandEdgeRB[73] = isoBandEdgeBL[73] = 13;
|
|
1429
|
+
isoBandEdgeRT[97] = isoBandEdgeTL[97] = 0;
|
|
1430
|
+
isoBandEdgeRB[97] = isoBandEdgeBL[97] = 13;
|
|
1431
|
+
isoBandEdgeRT[145] = isoBandEdgeBL[145] = 9;
|
|
1432
|
+
isoBandEdgeLB[145] = isoBandEdgeTR[145] = 21;
|
|
1433
|
+
isoBandEdgeRT[25] = isoBandEdgeBL[25] = 9;
|
|
1434
|
+
isoBandEdgeLB[25] = isoBandEdgeTR[25] = 21;
|
|
1435
|
+
isoBandEdgeRB[70] = isoBandEdgeTL[70] = 1;
|
|
1436
|
+
isoBandEdgeBR[70] = isoBandEdgeLT[70] = 17;
|
|
1437
|
+
isoBandEdgeRB[100] = isoBandEdgeTL[100] = 1;
|
|
1438
|
+
isoBandEdgeBR[100] = isoBandEdgeLT[100] = 17;
|
|
1439
|
+
|
|
1440
|
+
/* 8-sided cases */
|
|
1441
|
+
isoBandEdgeRT[34] = isoBandEdgeBL[34] = 9;
|
|
1442
|
+
isoBandEdgeRB[34] = isoBandEdgeBR[34] = 12;
|
|
1443
|
+
isoBandEdgeLB[34] = isoBandEdgeTR[34] = 21;
|
|
1444
|
+
isoBandEdgeLT[34] = isoBandEdgeTL[34] = 22;
|
|
1445
|
+
isoBandEdgeRT[136] = isoBandEdgeTR[136] = 4;
|
|
1446
|
+
isoBandEdgeRB[136] = isoBandEdgeTL[136] = 1;
|
|
1447
|
+
isoBandEdgeBR[136] = isoBandEdgeLT[136] = 17;
|
|
1448
|
+
isoBandEdgeBL[136] = isoBandEdgeLB[136] = 18;
|
|
1449
|
+
isoBandEdgeRT[35] = isoBandEdgeTR[35] = 4;
|
|
1450
|
+
isoBandEdgeRB[35] = isoBandEdgeBR[35] = 12;
|
|
1451
|
+
isoBandEdgeBL[35] = isoBandEdgeLB[35] = 18;
|
|
1452
|
+
isoBandEdgeLT[35] = isoBandEdgeTL[35] = 22;
|
|
1453
|
+
|
|
1454
|
+
/* 6-sided cases */
|
|
1455
|
+
isoBandEdgeRT[153] = isoBandEdgeTR[153] = 4;
|
|
1456
|
+
isoBandEdgeBL[153] = isoBandEdgeLB[153] = 18;
|
|
1457
|
+
isoBandEdgeRB[102] = isoBandEdgeBR[102] = 12;
|
|
1458
|
+
isoBandEdgeLT[102] = isoBandEdgeTL[102] = 22;
|
|
1459
|
+
isoBandEdgeRT[155] = isoBandEdgeBL[155] = 9;
|
|
1460
|
+
isoBandEdgeLB[155] = isoBandEdgeTR[155] = 23;
|
|
1461
|
+
isoBandEdgeRB[103] = isoBandEdgeTL[103] = 1;
|
|
1462
|
+
isoBandEdgeBR[103] = isoBandEdgeLT[103] = 17;
|
|
1463
|
+
|
|
1464
|
+
/* 7-sided cases */
|
|
1465
|
+
isoBandEdgeRT[152] = isoBandEdgeTR[152] = 4;
|
|
1466
|
+
isoBandEdgeBR[152] = isoBandEdgeLT[152] = 17;
|
|
1467
|
+
isoBandEdgeBL[152] = isoBandEdgeLB[152] = 18;
|
|
1468
|
+
isoBandEdgeRT[156] = isoBandEdgeBR[156] = 8;
|
|
1469
|
+
isoBandEdgeBL[156] = isoBandEdgeLB[156] = 18;
|
|
1470
|
+
isoBandEdgeLT[156] = isoBandEdgeTR[156] = 23;
|
|
1471
|
+
isoBandEdgeRT[137] = isoBandEdgeTR[137] = 4;
|
|
1472
|
+
isoBandEdgeRB[137] = isoBandEdgeTL[137] = 1;
|
|
1473
|
+
isoBandEdgeBL[137] = isoBandEdgeLB[137] = 18;
|
|
1474
|
+
isoBandEdgeRT[139] = isoBandEdgeTR[139] = 4;
|
|
1475
|
+
isoBandEdgeRB[139] = isoBandEdgeBL[139] = 13;
|
|
1476
|
+
isoBandEdgeLB[139] = isoBandEdgeTL[139] = 20;
|
|
1477
|
+
isoBandEdgeRT[98] = isoBandEdgeBL[98] = 9;
|
|
1478
|
+
isoBandEdgeRB[98] = isoBandEdgeBR[98] = 12;
|
|
1479
|
+
isoBandEdgeLT[98] = isoBandEdgeTL[98] = 22;
|
|
1480
|
+
isoBandEdgeRT[99] = isoBandEdgeTL[99] = 0;
|
|
1481
|
+
isoBandEdgeRB[99] = isoBandEdgeBR[99] = 12;
|
|
1482
|
+
isoBandEdgeBL[99] = isoBandEdgeLT[99] = 19;
|
|
1483
|
+
isoBandEdgeRB[38] = isoBandEdgeBR[38] = 12;
|
|
1484
|
+
isoBandEdgeLB[38] = isoBandEdgeTR[38] = 21;
|
|
1485
|
+
isoBandEdgeLT[38] = isoBandEdgeTL[38] = 22;
|
|
1486
|
+
isoBandEdgeRB[39] = isoBandEdgeTR[39] = 5;
|
|
1487
|
+
isoBandEdgeBR[39] = isoBandEdgeLB[39] = 16;
|
|
1488
|
+
isoBandEdgeLT[39] = isoBandEdgeTL[39] = 22;
|
|
1489
|
+
|
|
1490
|
+
/*
|
|
1491
|
+
The lookup tables for all different polygons that
|
|
1492
|
+
may appear within a grid cell
|
|
1493
|
+
*/
|
|
1494
|
+
|
|
1495
|
+
var polygon_table = [];
|
|
1496
|
+
|
|
1497
|
+
/* triangle cases */
|
|
1498
|
+
polygon_table[1] = polygon_table[169] = p00; /* 2221 || 0001 */
|
|
1499
|
+
polygon_table[4] = polygon_table[166] = p01; /* 2212 || 0010 */
|
|
1500
|
+
polygon_table[16] = polygon_table[154] = p02; /* 2122 || 0100 */
|
|
1501
|
+
polygon_table[64] = polygon_table[106] = p03; /* 1222 || 1000 */
|
|
1502
|
+
|
|
1503
|
+
/* trapezoid cases */
|
|
1504
|
+
polygon_table[168] = polygon_table[2] = p04; /* 2220 || 0002 */
|
|
1505
|
+
polygon_table[162] = polygon_table[8] = p05; /* 2202 || 0020 */
|
|
1506
|
+
polygon_table[138] = polygon_table[32] = p06; /* 2022 || 0200 */
|
|
1507
|
+
polygon_table[42] = polygon_table[128] = p07; /* 0222 || 2000 */
|
|
1508
|
+
|
|
1509
|
+
/* rectangle cases */
|
|
1510
|
+
polygon_table[5] = polygon_table[165] = p08; /* 0011 || 2211 */
|
|
1511
|
+
polygon_table[20] = polygon_table[150] = p09; /* 0110 || 2112 */
|
|
1512
|
+
polygon_table[80] = polygon_table[90] = p10; /* 1100 || 1122 */
|
|
1513
|
+
polygon_table[65] = polygon_table[105] = p11; /* 1001 || 1221 */
|
|
1514
|
+
polygon_table[160] = polygon_table[10] = p12; /* 2200 || 0022 */
|
|
1515
|
+
polygon_table[130] = polygon_table[40] = p13; /* 2002 || 0220 */
|
|
1516
|
+
|
|
1517
|
+
/* square case */
|
|
1518
|
+
polygon_table[85] = p14; /* 1111 */
|
|
1519
|
+
|
|
1520
|
+
/* pentagon cases */
|
|
1521
|
+
polygon_table[101] = polygon_table[69] = p15; /* 1211 || 1011 */
|
|
1522
|
+
polygon_table[149] = polygon_table[21] = p16; /* 2111 || 0111 */
|
|
1523
|
+
polygon_table[86] = polygon_table[84] = p17; /* 1112 || 1110 */
|
|
1524
|
+
polygon_table[89] = polygon_table[81] = p18; /* 1121 || 1101 */
|
|
1525
|
+
polygon_table[96] = polygon_table[74] = p19; /* 1200 || 1022 */
|
|
1526
|
+
polygon_table[24] = polygon_table[146] = p20; /* 0120 || 2102 */
|
|
1527
|
+
polygon_table[6] = polygon_table[164] = p21; /* 0012 || 2210 */
|
|
1528
|
+
polygon_table[129] = polygon_table[41] = p22; /* 2001 || 0221 */
|
|
1529
|
+
polygon_table[66] = polygon_table[104] = p23; /* 1002 || 1220 */
|
|
1530
|
+
polygon_table[144] = polygon_table[26] = p24; /* 2100 || 0122 */
|
|
1531
|
+
polygon_table[36] = polygon_table[134] = p25; /* 0210 || 2012 */
|
|
1532
|
+
polygon_table[9] = polygon_table[161] = p26; /* 0021 || 2201 */
|
|
1533
|
+
|
|
1534
|
+
/* hexagon cases */
|
|
1535
|
+
polygon_table[37] = polygon_table[133] = p27; /* 0211 || 2011 */
|
|
1536
|
+
polygon_table[148] = polygon_table[22] = p28; /* 2110 || 0112 */
|
|
1537
|
+
polygon_table[82] = polygon_table[88] = p29; /* 1102 || 1120 */
|
|
1538
|
+
polygon_table[73] = polygon_table[97] = p30; /* 1021 || 1201 */
|
|
1539
|
+
polygon_table[145] = polygon_table[25] = p31; /* 2101 || 0121 */
|
|
1540
|
+
polygon_table[70] = polygon_table[100] = p32; /* 1012 || 1210 */
|
|
1541
|
+
|
|
1542
|
+
/* 8-sided cases */
|
|
1543
|
+
polygon_table[34] = function (c) {
|
|
1544
|
+
return [p07(c), p05(c)];
|
|
1545
|
+
}; /* 0202 || 2020 with flipped == 0 */
|
|
1546
|
+
polygon_table[35] = p33; /* flipped == 1 state for 0202 and 2020 */
|
|
1547
|
+
polygon_table[136] = function (c) {
|
|
1548
|
+
return [p06(c), p04(c)];
|
|
1549
|
+
}; /* 2020 || 0202 with flipped == 0 */
|
|
1550
|
+
|
|
1551
|
+
/* 6-sided cases */
|
|
1552
|
+
polygon_table[153] = function (c) {
|
|
1553
|
+
return [p02(c), p00(c)];
|
|
1554
|
+
}; /* 0101 with flipped == 0 || 2121 with flipped == 2 */
|
|
1555
|
+
polygon_table[102] = function (c) {
|
|
1556
|
+
return [p01(c), p03(c)];
|
|
1557
|
+
}; /* 1010 with flipped == 0 || 1212 with flipped == 2 */
|
|
1558
|
+
polygon_table[155] = p34; /* 0101 with flipped == 1 || 2121 with flipped == 1 */
|
|
1559
|
+
polygon_table[103] = p35; /* 1010 with flipped == 1 || 1212 with flipped == 1 */
|
|
1560
|
+
|
|
1561
|
+
/* 7-sided cases */
|
|
1562
|
+
polygon_table[152] = function (c) {
|
|
1563
|
+
return [p02(c), p04(c)];
|
|
1564
|
+
}; /* 2120 with flipped == 2 || 0102 with flipped == 0 */
|
|
1565
|
+
polygon_table[156] = p36; /* 2120 with flipped == 1 || 0102 with flipped == 1 */
|
|
1566
|
+
polygon_table[137] = function (c) {
|
|
1567
|
+
return [p06(c), p00(c)];
|
|
1568
|
+
}; /* 2021 with flipped == 2 || 0201 with flipped == 0 */
|
|
1569
|
+
polygon_table[139] = p37; /* 2021 with flipped == 1 || 0201 with flipped == 1 */
|
|
1570
|
+
polygon_table[98] = function (c) {
|
|
1571
|
+
return [p05(c), p03(c)];
|
|
1572
|
+
}; /* 1202 with flipped == 2 || 1020 with flipped == 0 */
|
|
1573
|
+
polygon_table[99] = p38; /* 1202 with flipped == 1 || 1020 with flipped == 1 */
|
|
1574
|
+
polygon_table[38] = function (c) {
|
|
1575
|
+
return [p01(c), p07(c)];
|
|
1576
|
+
}; /* 0212 with flipped == 2 || 2010 with flipped == 0 */
|
|
1577
|
+
polygon_table[39] = p39; /* 0212 with flipped == 1 || 2010 with flipped == 1 */
|
|
1578
|
+
|
|
1579
|
+
/*
|
|
1580
|
+
####################################
|
|
1581
|
+
Some small helper functions
|
|
1582
|
+
####################################
|
|
1583
|
+
*/
|
|
1584
|
+
|
|
1585
|
+
/* assume that x1 == 1 && x0 == 0 */
|
|
1586
|
+
function interpolateX(y, y0, y1) {
|
|
1587
|
+
return (y - y0) / (y1 - y0);
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
function isArray(myArray) {
|
|
1591
|
+
return myArray.constructor.toString().indexOf("Array") > -1;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
/*
|
|
1595
|
+
####################################
|
|
1596
|
+
Below is the actual Marching Squares implementation
|
|
1597
|
+
####################################
|
|
1598
|
+
*/
|
|
1599
|
+
|
|
1600
|
+
function computeBandGrid(data, minV, bandwidth) {
|
|
1601
|
+
var rows = data.length - 1;
|
|
1602
|
+
var cols = data[0].length - 1;
|
|
1603
|
+
var BandGrid = { rows: rows, cols: cols, cells: [] };
|
|
1604
|
+
|
|
1605
|
+
var maxV = minV + Math.abs(bandwidth);
|
|
1606
|
+
|
|
1607
|
+
for (var j = 0; j < rows; ++j) {
|
|
1608
|
+
BandGrid.cells[j] = [];
|
|
1609
|
+
for (var i = 0; i < cols; ++i) {
|
|
1610
|
+
/* compose the 4-trit corner representation */
|
|
1611
|
+
var cval = 0;
|
|
1612
|
+
|
|
1613
|
+
var tl = data[j + 1][i];
|
|
1614
|
+
var tr = data[j + 1][i + 1];
|
|
1615
|
+
var br = data[j][i + 1];
|
|
1616
|
+
var bl = data[j][i];
|
|
1617
|
+
|
|
1618
|
+
if (isNaN(tl) || isNaN(tr) || isNaN(br) || isNaN(bl)) {
|
|
1619
|
+
continue;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
cval |= tl < minV ? 0 : tl > maxV ? 128 : 64;
|
|
1623
|
+
cval |= tr < minV ? 0 : tr > maxV ? 32 : 16;
|
|
1624
|
+
cval |= br < minV ? 0 : br > maxV ? 8 : 4;
|
|
1625
|
+
cval |= bl < minV ? 0 : bl > maxV ? 2 : 1;
|
|
1626
|
+
|
|
1627
|
+
var cval_real = +cval;
|
|
1628
|
+
|
|
1629
|
+
/* resolve ambiguity via averaging */
|
|
1630
|
+
var flipped = 0;
|
|
1631
|
+
if (
|
|
1632
|
+
cval === 17 /* 0101 */ ||
|
|
1633
|
+
cval === 18 /* 0102 */ ||
|
|
1634
|
+
cval === 33 /* 0201 */ ||
|
|
1635
|
+
cval === 34 /* 0202 */ ||
|
|
1636
|
+
cval === 38 /* 0212 */ ||
|
|
1637
|
+
cval === 68 /* 1010 */ ||
|
|
1638
|
+
cval === 72 /* 1020 */ ||
|
|
1639
|
+
cval === 98 /* 1202 */ ||
|
|
1640
|
+
cval === 102 /* 1212 */ ||
|
|
1641
|
+
cval === 132 /* 2010 */ ||
|
|
1642
|
+
cval === 136 /* 2020 */ ||
|
|
1643
|
+
cval === 137 /* 2021 */ ||
|
|
1644
|
+
cval === 152 /* 2120 */ ||
|
|
1645
|
+
cval === 153 /* 2121 */
|
|
1646
|
+
) {
|
|
1647
|
+
var average = (tl + tr + br + bl) / 4;
|
|
1648
|
+
/* set flipped state */
|
|
1649
|
+
flipped = average > maxV ? 2 : average < minV ? 0 : 1;
|
|
1650
|
+
|
|
1651
|
+
/* adjust cval for flipped cases */
|
|
1652
|
+
|
|
1653
|
+
/* 8-sided cases */
|
|
1654
|
+
if (cval === 34) {
|
|
1655
|
+
if (flipped === 1) {
|
|
1656
|
+
cval = 35;
|
|
1657
|
+
} else if (flipped === 0) {
|
|
1658
|
+
cval = 136;
|
|
1659
|
+
}
|
|
1660
|
+
} else if (cval === 136) {
|
|
1661
|
+
if (flipped === 1) {
|
|
1662
|
+
cval = 35;
|
|
1663
|
+
flipped = 4;
|
|
1664
|
+
} else if (flipped === 0) {
|
|
1665
|
+
cval = 34;
|
|
1666
|
+
}
|
|
1667
|
+
} else if (cval === 17) {
|
|
1668
|
+
/* 6-sided polygon cases */
|
|
1669
|
+
if (flipped === 1) {
|
|
1670
|
+
cval = 155;
|
|
1671
|
+
flipped = 4;
|
|
1672
|
+
} else if (flipped === 0) {
|
|
1673
|
+
cval = 153;
|
|
1674
|
+
}
|
|
1675
|
+
} else if (cval === 68) {
|
|
1676
|
+
if (flipped === 1) {
|
|
1677
|
+
cval = 103;
|
|
1678
|
+
flipped = 4;
|
|
1679
|
+
} else if (flipped === 0) {
|
|
1680
|
+
cval = 102;
|
|
1681
|
+
}
|
|
1682
|
+
} else if (cval === 153) {
|
|
1683
|
+
if (flipped === 1) cval = 155;
|
|
1684
|
+
} else if (cval === 102) {
|
|
1685
|
+
if (flipped === 1) cval = 103;
|
|
1686
|
+
} else if (cval === 152) {
|
|
1687
|
+
/* 7-sided polygon cases */
|
|
1688
|
+
if (flipped < 2) {
|
|
1689
|
+
cval = 156;
|
|
1690
|
+
flipped = 1;
|
|
1691
|
+
}
|
|
1692
|
+
} else if (cval === 137) {
|
|
1693
|
+
if (flipped < 2) {
|
|
1694
|
+
cval = 139;
|
|
1695
|
+
flipped = 1;
|
|
1696
|
+
}
|
|
1697
|
+
} else if (cval === 98) {
|
|
1698
|
+
if (flipped < 2) {
|
|
1699
|
+
cval = 99;
|
|
1700
|
+
flipped = 1;
|
|
1701
|
+
}
|
|
1702
|
+
} else if (cval === 38) {
|
|
1703
|
+
if (flipped < 2) {
|
|
1704
|
+
cval = 39;
|
|
1705
|
+
flipped = 1;
|
|
1706
|
+
}
|
|
1707
|
+
} else if (cval === 18) {
|
|
1708
|
+
if (flipped > 0) {
|
|
1709
|
+
cval = 156;
|
|
1710
|
+
flipped = 4;
|
|
1711
|
+
} else {
|
|
1712
|
+
cval = 152;
|
|
1713
|
+
}
|
|
1714
|
+
} else if (cval === 33) {
|
|
1715
|
+
if (flipped > 0) {
|
|
1716
|
+
cval = 139;
|
|
1717
|
+
flipped = 4;
|
|
1718
|
+
} else {
|
|
1719
|
+
cval = 137;
|
|
1720
|
+
}
|
|
1721
|
+
} else if (cval === 72) {
|
|
1722
|
+
if (flipped > 0) {
|
|
1723
|
+
cval = 99;
|
|
1724
|
+
flipped = 4;
|
|
1725
|
+
} else {
|
|
1726
|
+
cval = 98;
|
|
1727
|
+
}
|
|
1728
|
+
} else if (cval === 132) {
|
|
1729
|
+
if (flipped > 0) {
|
|
1730
|
+
cval = 39;
|
|
1731
|
+
flipped = 4;
|
|
1732
|
+
} else {
|
|
1733
|
+
cval = 38;
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
/* add cell to BandGrid if it contains at least one polygon-side */
|
|
1739
|
+
if (cval != 0 && cval != 170) {
|
|
1740
|
+
var topleft,
|
|
1741
|
+
topright,
|
|
1742
|
+
bottomleft,
|
|
1743
|
+
bottomright,
|
|
1744
|
+
righttop,
|
|
1745
|
+
rightbottom,
|
|
1746
|
+
lefttop,
|
|
1747
|
+
leftbottom;
|
|
1748
|
+
|
|
1749
|
+
topleft = topright = bottomleft = bottomright = righttop = rightbottom = lefttop = leftbottom = 0.5;
|
|
1750
|
+
|
|
1751
|
+
var edges = [];
|
|
1752
|
+
|
|
1753
|
+
/* do interpolation here */
|
|
1754
|
+
/* 1st Triangles */
|
|
1755
|
+
if (cval === 1) {
|
|
1756
|
+
/* 0001 */
|
|
1757
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1758
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1759
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1760
|
+
} else if (cval === 169) {
|
|
1761
|
+
/* 2221 */
|
|
1762
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
1763
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
1764
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1765
|
+
} else if (cval === 4) {
|
|
1766
|
+
/* 0010 */
|
|
1767
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1768
|
+
bottomright = interpolateX(minV, bl, br);
|
|
1769
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1770
|
+
} else if (cval === 166) {
|
|
1771
|
+
/* 2212 */
|
|
1772
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
1773
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1774
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1775
|
+
} else if (cval === 16) {
|
|
1776
|
+
/* 0100 */
|
|
1777
|
+
righttop = interpolateX(minV, br, tr);
|
|
1778
|
+
topright = interpolateX(minV, tl, tr);
|
|
1779
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1780
|
+
} else if (cval === 154) {
|
|
1781
|
+
/* 2122 */
|
|
1782
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1783
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1784
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1785
|
+
} else if (cval === 64) {
|
|
1786
|
+
/* 1000 */
|
|
1787
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
1788
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1789
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
1790
|
+
} else if (cval === 106) {
|
|
1791
|
+
/* 1222 */
|
|
1792
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1793
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
1794
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
1795
|
+
} else if (cval === 168) {
|
|
1796
|
+
/* 2nd Trapezoids */
|
|
1797
|
+
/* 2220 */
|
|
1798
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
1799
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
1800
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
1801
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
1802
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
1803
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1804
|
+
} else if (cval === 2) {
|
|
1805
|
+
/* 0002 */
|
|
1806
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1807
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1808
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1809
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1810
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
1811
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1812
|
+
} else if (cval === 162) {
|
|
1813
|
+
/* 2202 */
|
|
1814
|
+
righttop = interpolateX(maxV, br, tr);
|
|
1815
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
1816
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1817
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1818
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
1819
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1820
|
+
} else if (cval === 8) {
|
|
1821
|
+
/* 0020 */
|
|
1822
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
1823
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1824
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
1825
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
1826
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1827
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1828
|
+
} else if (cval === 138) {
|
|
1829
|
+
/* 2022 */
|
|
1830
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
1831
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1832
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1833
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
1834
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1835
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1836
|
+
} else if (cval === 32) {
|
|
1837
|
+
/* 0200 */
|
|
1838
|
+
righttop = interpolateX(maxV, br, tr);
|
|
1839
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
1840
|
+
topleft = interpolateX(minV, tl, tr);
|
|
1841
|
+
topright = interpolateX(maxV, tl, tr);
|
|
1842
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1843
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1844
|
+
} else if (cval === 42) {
|
|
1845
|
+
/* 0222 */
|
|
1846
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1847
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1848
|
+
topleft = interpolateX(minV, tl, tr);
|
|
1849
|
+
topright = interpolateX(maxV, tl, tr);
|
|
1850
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
1851
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
1852
|
+
} else if (cval === 128) {
|
|
1853
|
+
/* 2000 */
|
|
1854
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
1855
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
1856
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1857
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
1858
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
1859
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
/* 3rd rectangle cases */
|
|
1863
|
+
if (cval === 5) {
|
|
1864
|
+
/* 0011 */
|
|
1865
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1866
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1867
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1868
|
+
} else if (cval === 165) {
|
|
1869
|
+
/* 2211 */
|
|
1870
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
1871
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
1872
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1873
|
+
} else if (cval === 20) {
|
|
1874
|
+
/* 0110 */
|
|
1875
|
+
bottomright = interpolateX(minV, bl, br);
|
|
1876
|
+
topright = interpolateX(minV, tl, tr);
|
|
1877
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
1878
|
+
} else if (cval === 150) {
|
|
1879
|
+
/* 2112 */
|
|
1880
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1881
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1882
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
1883
|
+
} else if (cval === 80) {
|
|
1884
|
+
/* 1100 */
|
|
1885
|
+
righttop = interpolateX(minV, br, tr);
|
|
1886
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
1887
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1888
|
+
} else if (cval === 90) {
|
|
1889
|
+
/* 1122 */
|
|
1890
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1891
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1892
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1893
|
+
} else if (cval === 65) {
|
|
1894
|
+
/* 1001 */
|
|
1895
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1896
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1897
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1898
|
+
} else if (cval === 105) {
|
|
1899
|
+
/* 1221 */
|
|
1900
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
1901
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
1902
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1903
|
+
} else if (cval === 160) {
|
|
1904
|
+
/* 2200 */
|
|
1905
|
+
righttop = interpolateX(maxV, br, tr);
|
|
1906
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
1907
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
1908
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
1909
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1910
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1911
|
+
} else if (cval === 10) {
|
|
1912
|
+
/* 0022 */
|
|
1913
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
1914
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1915
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1916
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1917
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1918
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1919
|
+
} else if (cval === 130) {
|
|
1920
|
+
/* 2002 */
|
|
1921
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1922
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1923
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1924
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
1925
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
1926
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1927
|
+
} else if (cval === 40) {
|
|
1928
|
+
/* 0220 */
|
|
1929
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
1930
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
1931
|
+
topleft = interpolateX(minV, tl, tr);
|
|
1932
|
+
topright = interpolateX(maxV, tl, tr);
|
|
1933
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
1934
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1935
|
+
} else if (cval === 101) {
|
|
1936
|
+
/* 4th single pentagon cases */
|
|
1937
|
+
/* 1211 */
|
|
1938
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
1939
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
1940
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1941
|
+
} else if (cval === 69) {
|
|
1942
|
+
/* 1011 */
|
|
1943
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1944
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1945
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1946
|
+
} else if (cval === 149) {
|
|
1947
|
+
/* 2111 */
|
|
1948
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
1949
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1950
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
1951
|
+
} else if (cval === 21) {
|
|
1952
|
+
/* 0111 */
|
|
1953
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1954
|
+
topright = interpolateX(minV, tl, tr);
|
|
1955
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
1956
|
+
} else if (cval === 86) {
|
|
1957
|
+
/* 1112 */
|
|
1958
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1959
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1960
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
1961
|
+
} else if (cval === 84) {
|
|
1962
|
+
/* 1110 */
|
|
1963
|
+
bottomright = interpolateX(minV, bl, br);
|
|
1964
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
1965
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
1966
|
+
} else if (cval === 89) {
|
|
1967
|
+
/* 1121 */
|
|
1968
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1969
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
1970
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1971
|
+
} else if (cval === 81) {
|
|
1972
|
+
/* 1101 */
|
|
1973
|
+
righttop = interpolateX(minV, br, tr);
|
|
1974
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1975
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
1976
|
+
} else if (cval === 96) {
|
|
1977
|
+
/* 1200 */
|
|
1978
|
+
righttop = interpolateX(maxV, br, tr);
|
|
1979
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
1980
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
1981
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
1982
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1983
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1984
|
+
} else if (cval === 74) {
|
|
1985
|
+
/* 1022 */
|
|
1986
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
1987
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1988
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1989
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1990
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1991
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
1992
|
+
} else if (cval === 24) {
|
|
1993
|
+
/* 0120 */
|
|
1994
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1995
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
1996
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
1997
|
+
topright = interpolateX(minV, tl, tr);
|
|
1998
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
1999
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2000
|
+
} else if (cval === 146) {
|
|
2001
|
+
/* 2102 */
|
|
2002
|
+
righttop = interpolateX(minV, br, tr);
|
|
2003
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2004
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2005
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
2006
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2007
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2008
|
+
} else if (cval === 6) {
|
|
2009
|
+
/* 0012 */
|
|
2010
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2011
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2012
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2013
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2014
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2015
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2016
|
+
} else if (cval === 164) {
|
|
2017
|
+
/* 2210 */
|
|
2018
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
2019
|
+
bottomright = interpolateX(minV, bl, br);
|
|
2020
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2021
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2022
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2023
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2024
|
+
} else if (cval === 129) {
|
|
2025
|
+
/* 2001 */
|
|
2026
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
2027
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
2028
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2029
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2030
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2031
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2032
|
+
} else if (cval === 41) {
|
|
2033
|
+
/* 0221 */
|
|
2034
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
2035
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
2036
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2037
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2038
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2039
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2040
|
+
} else if (cval === 66) {
|
|
2041
|
+
/* 1002 */
|
|
2042
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2043
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2044
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
2045
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
2046
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2047
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2048
|
+
} else if (cval === 104) {
|
|
2049
|
+
/* 1220 */
|
|
2050
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
2051
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
2052
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
2053
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
2054
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2055
|
+
edges.push(isoBandEdgeTL[cval]);
|
|
2056
|
+
} else if (cval === 144) {
|
|
2057
|
+
/* 2100 */
|
|
2058
|
+
righttop = interpolateX(minV, br, tr);
|
|
2059
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2060
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2061
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
2062
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2063
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2064
|
+
} else if (cval === 26) {
|
|
2065
|
+
/* 0122 */
|
|
2066
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
2067
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2068
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2069
|
+
topright = interpolateX(minV, tl, tr);
|
|
2070
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2071
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2072
|
+
} else if (cval === 36) {
|
|
2073
|
+
/* 0210 */
|
|
2074
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
2075
|
+
bottomright = interpolateX(minV, bl, br);
|
|
2076
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2077
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2078
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2079
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2080
|
+
} else if (cval === 134) {
|
|
2081
|
+
/* 2012 */
|
|
2082
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2083
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2084
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2085
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2086
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2087
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2088
|
+
} else if (cval === 9) {
|
|
2089
|
+
/* 0021 */
|
|
2090
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
2091
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2092
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
2093
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
2094
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2095
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2096
|
+
} else if (cval === 161) {
|
|
2097
|
+
/* 2201 */
|
|
2098
|
+
righttop = interpolateX(maxV, br, tr);
|
|
2099
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
2100
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
2101
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
2102
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2103
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2104
|
+
} else if (cval === 37) {
|
|
2105
|
+
/* 5th single hexagon cases */
|
|
2106
|
+
/* 0211 */
|
|
2107
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
2108
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
2109
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2110
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2111
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2112
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2113
|
+
} else if (cval === 133) {
|
|
2114
|
+
/* 2011 */
|
|
2115
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2116
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
2117
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2118
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2119
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2120
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2121
|
+
} else if (cval === 148) {
|
|
2122
|
+
/* 2110 */
|
|
2123
|
+
bottomright = interpolateX(minV, bl, br);
|
|
2124
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2125
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2126
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
2127
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2128
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2129
|
+
} else if (cval === 22) {
|
|
2130
|
+
/* 0112 */
|
|
2131
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2132
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2133
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2134
|
+
topright = interpolateX(minV, tl, tr);
|
|
2135
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2136
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2137
|
+
} else if (cval === 82) {
|
|
2138
|
+
/* 1102 */
|
|
2139
|
+
righttop = interpolateX(minV, br, tr);
|
|
2140
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2141
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2142
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
2143
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2144
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2145
|
+
} else if (cval === 88) {
|
|
2146
|
+
/* 1120 */
|
|
2147
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
2148
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
2149
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
2150
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
2151
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2152
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2153
|
+
} else if (cval === 73) {
|
|
2154
|
+
/* 1021 */
|
|
2155
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
2156
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2157
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
2158
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
2159
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2160
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2161
|
+
} else if (cval === 97) {
|
|
2162
|
+
/* 1201 */
|
|
2163
|
+
righttop = interpolateX(maxV, br, tr);
|
|
2164
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
2165
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
2166
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
2167
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2168
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2169
|
+
} else if (cval === 145) {
|
|
2170
|
+
/* 2101 */
|
|
2171
|
+
righttop = interpolateX(minV, br, tr);
|
|
2172
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
2173
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
2174
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
2175
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2176
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2177
|
+
} else if (cval === 25) {
|
|
2178
|
+
/* 0121 */
|
|
2179
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
2180
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
2181
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
2182
|
+
topright = interpolateX(minV, tl, tr);
|
|
2183
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2184
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2185
|
+
} else if (cval === 70) {
|
|
2186
|
+
/* 1012 */
|
|
2187
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2188
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2189
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
2190
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
2191
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2192
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2193
|
+
} else if (cval === 100) {
|
|
2194
|
+
/* 1210 */
|
|
2195
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
2196
|
+
bottomright = interpolateX(minV, bl, br);
|
|
2197
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
2198
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
2199
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2200
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2201
|
+
} else if (cval === 34) {
|
|
2202
|
+
/* 8-sided cases */
|
|
2203
|
+
/* 0202 || 2020 with flipped == 0 */
|
|
2204
|
+
if (flipped === 0) {
|
|
2205
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
2206
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2207
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
2208
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
2209
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2210
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2211
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2212
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2213
|
+
} else {
|
|
2214
|
+
righttop = interpolateX(maxV, br, tr);
|
|
2215
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
2216
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2217
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2218
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2219
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2220
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2221
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2222
|
+
}
|
|
2223
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2224
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2225
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2226
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2227
|
+
} else if (cval === 35) {
|
|
2228
|
+
/* flipped == 1 state for 0202, and 2020 with flipped == 4*/
|
|
2229
|
+
if (flipped === 4) {
|
|
2230
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
2231
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2232
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
2233
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
2234
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2235
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2236
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2237
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2238
|
+
} else {
|
|
2239
|
+
righttop = interpolateX(maxV, br, tr);
|
|
2240
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
2241
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2242
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2243
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2244
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2245
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2246
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2247
|
+
}
|
|
2248
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2249
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2250
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2251
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2252
|
+
} else if (cval === 136) {
|
|
2253
|
+
/* 2020 || 0202 with flipped == 0 */
|
|
2254
|
+
if (flipped === 0) {
|
|
2255
|
+
righttop = interpolateX(maxV, br, tr);
|
|
2256
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
2257
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2258
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2259
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2260
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2261
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2262
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2263
|
+
} else {
|
|
2264
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
2265
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2266
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
2267
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
2268
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2269
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2270
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2271
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2272
|
+
}
|
|
2273
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2274
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2275
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2276
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2277
|
+
} else if (cval === 153) {
|
|
2278
|
+
/* 6-sided polygon cases */
|
|
2279
|
+
/* 0101 with flipped == 0 || 2121 with flipped == 2 */
|
|
2280
|
+
if (flipped === 0) {
|
|
2281
|
+
righttop = interpolateX(minV, br, tr);
|
|
2282
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
2283
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
2284
|
+
topright = interpolateX(minV, tl, tr);
|
|
2285
|
+
} else {
|
|
2286
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
2287
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
2288
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
2289
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
2290
|
+
}
|
|
2291
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2292
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2293
|
+
} else if (cval === 102) {
|
|
2294
|
+
/* 1010 with flipped == 0 || 1212 with flipped == 2 */
|
|
2295
|
+
if (flipped === 0) {
|
|
2296
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2297
|
+
bottomright = interpolateX(minV, bl, br);
|
|
2298
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
2299
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
2300
|
+
} else {
|
|
2301
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
2302
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2303
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
2304
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
2305
|
+
}
|
|
2306
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2307
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2308
|
+
} else if (cval === 155) {
|
|
2309
|
+
/* 0101 with flipped == 4 || 2121 with flipped == 1 */
|
|
2310
|
+
if (flipped === 4) {
|
|
2311
|
+
righttop = interpolateX(minV, br, tr);
|
|
2312
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
2313
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
2314
|
+
topright = interpolateX(minV, tl, tr);
|
|
2315
|
+
} else {
|
|
2316
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
2317
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
2318
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
2319
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
2320
|
+
}
|
|
2321
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2322
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2323
|
+
} else if (cval === 103) {
|
|
2324
|
+
/* 1010 with flipped == 4 || 1212 with flipped == 1 */
|
|
2325
|
+
if (flipped === 4) {
|
|
2326
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2327
|
+
bottomright = interpolateX(minV, bl, br);
|
|
2328
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
2329
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
2330
|
+
} else {
|
|
2331
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
2332
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2333
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
2334
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
2335
|
+
}
|
|
2336
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2337
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2338
|
+
} else if (cval === 152) {
|
|
2339
|
+
/* 7-sided polygon cases */
|
|
2340
|
+
/* 2120 with flipped == 2 || 0102 with flipped == 0 */
|
|
2341
|
+
if (flipped === 0) {
|
|
2342
|
+
righttop = interpolateX(minV, br, tr);
|
|
2343
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2344
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2345
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2346
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2347
|
+
topright = interpolateX(minV, tl, tr);
|
|
2348
|
+
} else {
|
|
2349
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
2350
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
2351
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
2352
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2353
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2354
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
2355
|
+
}
|
|
2356
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2357
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2358
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2359
|
+
} else if (cval === 156) {
|
|
2360
|
+
/* 2120 with flipped == 1 || 0102 with flipped == 4 */
|
|
2361
|
+
if (flipped === 4) {
|
|
2362
|
+
righttop = interpolateX(minV, br, tr);
|
|
2363
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2364
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2365
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2366
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2367
|
+
topright = interpolateX(minV, tl, tr);
|
|
2368
|
+
} else {
|
|
2369
|
+
righttop = 1 - interpolateX(maxV, tr, br);
|
|
2370
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
2371
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
2372
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2373
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2374
|
+
topright = 1 - interpolateX(maxV, tr, tl);
|
|
2375
|
+
}
|
|
2376
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2377
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2378
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2379
|
+
} else if (cval === 137) {
|
|
2380
|
+
/* 2021 with flipped == 2 || 0201 with flipped == 0 */
|
|
2381
|
+
if (flipped === 0) {
|
|
2382
|
+
righttop = interpolateX(maxV, br, tr);
|
|
2383
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
2384
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
2385
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
2386
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2387
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2388
|
+
} else {
|
|
2389
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
2390
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2391
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
2392
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
2393
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2394
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2395
|
+
}
|
|
2396
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2397
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2398
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2399
|
+
} else if (cval === 139) {
|
|
2400
|
+
/* 2021 with flipped == 1 || 0201 with flipped == 4 */
|
|
2401
|
+
if (flipped === 4) {
|
|
2402
|
+
righttop = interpolateX(maxV, br, tr);
|
|
2403
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
2404
|
+
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
2405
|
+
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
2406
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2407
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2408
|
+
} else {
|
|
2409
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
2410
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2411
|
+
bottomleft = interpolateX(maxV, bl, br);
|
|
2412
|
+
leftbottom = interpolateX(maxV, bl, tl);
|
|
2413
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2414
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2415
|
+
}
|
|
2416
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2417
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2418
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2419
|
+
} else if (cval === 98) {
|
|
2420
|
+
/* 1202 with flipped == 2 || 1020 with flipped == 0 */
|
|
2421
|
+
if (flipped === 0) {
|
|
2422
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
2423
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2424
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
2425
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
2426
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
2427
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
2428
|
+
} else {
|
|
2429
|
+
righttop = interpolateX(maxV, br, tr);
|
|
2430
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
2431
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2432
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2433
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
2434
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
2435
|
+
}
|
|
2436
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2437
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2438
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2439
|
+
} else if (cval === 99) {
|
|
2440
|
+
/* 1202 with flipped == 1 || 1020 with flipped == 4 */
|
|
2441
|
+
if (flipped === 4) {
|
|
2442
|
+
righttop = 1 - interpolateX(minV, tr, br);
|
|
2443
|
+
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2444
|
+
bottomright = interpolateX(maxV, bl, br);
|
|
2445
|
+
bottomleft = interpolateX(minV, bl, br);
|
|
2446
|
+
lefttop = interpolateX(minV, bl, tl);
|
|
2447
|
+
topleft = 1 - interpolateX(minV, tr, tl);
|
|
2448
|
+
} else {
|
|
2449
|
+
righttop = interpolateX(maxV, br, tr);
|
|
2450
|
+
rightbottom = interpolateX(minV, br, tr);
|
|
2451
|
+
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2452
|
+
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2453
|
+
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
2454
|
+
topleft = interpolateX(maxV, tl, tr);
|
|
2455
|
+
}
|
|
2456
|
+
edges.push(isoBandEdgeRT[cval]);
|
|
2457
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2458
|
+
edges.push(isoBandEdgeBL[cval]);
|
|
2459
|
+
} else if (cval === 38) {
|
|
2460
|
+
/* 0212 with flipped == 2 || 2010 with flipped == 0 */
|
|
2461
|
+
if (flipped === 0) {
|
|
2462
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2463
|
+
bottomright = interpolateX(minV, bl, br);
|
|
2464
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2465
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2466
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2467
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2468
|
+
} else {
|
|
2469
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
2470
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2471
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2472
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2473
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2474
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2475
|
+
}
|
|
2476
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2477
|
+
edges.push(isoBandEdgeLB[cval]);
|
|
2478
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2479
|
+
} else if (cval === 39) {
|
|
2480
|
+
/* 0212 with flipped == 1 || 2010 with flipped == 4 */
|
|
2481
|
+
if (flipped === 4) {
|
|
2482
|
+
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2483
|
+
bottomright = interpolateX(minV, bl, br);
|
|
2484
|
+
leftbottom = interpolateX(minV, bl, tl);
|
|
2485
|
+
lefttop = interpolateX(maxV, bl, tl);
|
|
2486
|
+
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2487
|
+
topright = 1 - interpolateX(minV, tr, tl);
|
|
2488
|
+
} else {
|
|
2489
|
+
rightbottom = interpolateX(maxV, br, tr);
|
|
2490
|
+
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2491
|
+
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2492
|
+
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2493
|
+
topleft = interpolateX(minV, tl, tr);
|
|
2494
|
+
topright = interpolateX(maxV, tl, tr);
|
|
2495
|
+
}
|
|
2496
|
+
edges.push(isoBandEdgeRB[cval]);
|
|
2497
|
+
edges.push(isoBandEdgeBR[cval]);
|
|
2498
|
+
edges.push(isoBandEdgeLT[cval]);
|
|
2499
|
+
} else if (cval === 85) {
|
|
2500
|
+
righttop = 1;
|
|
2501
|
+
rightbottom = 0;
|
|
2502
|
+
bottomright = 1;
|
|
2503
|
+
bottomleft = 0;
|
|
2504
|
+
leftbottom = 0;
|
|
2505
|
+
lefttop = 1;
|
|
2506
|
+
topleft = 0;
|
|
2507
|
+
topright = 1;
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
if (
|
|
2511
|
+
topleft < 0 ||
|
|
2512
|
+
topleft > 1 ||
|
|
2513
|
+
topright < 0 ||
|
|
2514
|
+
topright > 1 ||
|
|
2515
|
+
righttop < 0 ||
|
|
2516
|
+
righttop > 1 ||
|
|
2517
|
+
bottomright < 0 ||
|
|
2518
|
+
bottomright > 1 ||
|
|
2519
|
+
leftbottom < 0 ||
|
|
2520
|
+
leftbottom > 1 ||
|
|
2521
|
+
lefttop < 0 ||
|
|
2522
|
+
lefttop > 1
|
|
2523
|
+
) {
|
|
2524
|
+
console.log(
|
|
2525
|
+
"MarchingSquaresJS-isoBands: " +
|
|
2526
|
+
cval +
|
|
2527
|
+
" " +
|
|
2528
|
+
cval_real +
|
|
2529
|
+
" " +
|
|
2530
|
+
tl +
|
|
2531
|
+
"," +
|
|
2532
|
+
tr +
|
|
2533
|
+
"," +
|
|
2534
|
+
br +
|
|
2535
|
+
"," +
|
|
2536
|
+
bl +
|
|
2537
|
+
" " +
|
|
2538
|
+
flipped +
|
|
2539
|
+
" " +
|
|
2540
|
+
topleft +
|
|
2541
|
+
" " +
|
|
2542
|
+
topright +
|
|
2543
|
+
" " +
|
|
2544
|
+
righttop +
|
|
2545
|
+
" " +
|
|
2546
|
+
rightbottom +
|
|
2547
|
+
" " +
|
|
2548
|
+
bottomright +
|
|
2549
|
+
" " +
|
|
2550
|
+
bottomleft +
|
|
2551
|
+
" " +
|
|
2552
|
+
leftbottom +
|
|
2553
|
+
" " +
|
|
2554
|
+
lefttop
|
|
2555
|
+
);
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
BandGrid.cells[j][i] = {
|
|
2559
|
+
cval: cval,
|
|
2560
|
+
cval_real: cval_real,
|
|
2561
|
+
flipped: flipped,
|
|
2562
|
+
topleft: topleft,
|
|
2563
|
+
topright: topright,
|
|
2564
|
+
righttop: righttop,
|
|
2565
|
+
rightbottom: rightbottom,
|
|
2566
|
+
bottomright: bottomright,
|
|
2567
|
+
bottomleft: bottomleft,
|
|
2568
|
+
leftbottom: leftbottom,
|
|
2569
|
+
lefttop: lefttop,
|
|
2570
|
+
edges: edges,
|
|
2571
|
+
};
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
return BandGrid;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
function BandGrid2AreaPaths(grid) {
|
|
2580
|
+
var areas = [];
|
|
2581
|
+
var rows = grid.rows;
|
|
2582
|
+
var cols = grid.cols;
|
|
2583
|
+
var currentPolygon = [];
|
|
2584
|
+
|
|
2585
|
+
for (var j = 0; j < rows; j++) {
|
|
2586
|
+
for (var i = 0; i < cols; i++) {
|
|
2587
|
+
if (
|
|
2588
|
+
typeof grid.cells[j][i] !== "undefined" &&
|
|
2589
|
+
grid.cells[j][i].edges.length > 0
|
|
2590
|
+
) {
|
|
2591
|
+
/* trace back polygon path starting from this cell */
|
|
2592
|
+
|
|
2593
|
+
var cell = grid.cells[j][i];
|
|
2594
|
+
|
|
2595
|
+
/* get start coordinates */
|
|
2596
|
+
|
|
2597
|
+
var prev = getStartXY(cell),
|
|
2598
|
+
next = null,
|
|
2599
|
+
p = i,
|
|
2600
|
+
q = j;
|
|
2601
|
+
|
|
2602
|
+
if (prev !== null) {
|
|
2603
|
+
currentPolygon.push([prev.p[0] + p, prev.p[1] + q]);
|
|
2604
|
+
//console.log(cell);
|
|
2605
|
+
//console.log("coords: " + (prev.p[0] + p) + " " + (prev.p[1] + q));
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
do {
|
|
2609
|
+
//console.log(p + "," + q);
|
|
2610
|
+
//console.log(grid.cells[q][p]);
|
|
2611
|
+
//console.log(grid.cells[q][p].edges);
|
|
2612
|
+
//console.log("from : " + prev.x + " " + prev.y + " " + prev.o);
|
|
2613
|
+
|
|
2614
|
+
next = getExitXY(grid.cells[q][p], prev.x, prev.y, prev.o);
|
|
2615
|
+
if (next !== null) {
|
|
2616
|
+
//console.log("coords: " + (next.p[0] + p) + " " + (next.p[1] + q));
|
|
2617
|
+
currentPolygon.push([next.p[0] + p, next.p[1] + q]);
|
|
2618
|
+
p += next.x;
|
|
2619
|
+
q += next.y;
|
|
2620
|
+
prev = next;
|
|
2621
|
+
} else {
|
|
2622
|
+
//console.log("getExitXY() returned null!");
|
|
2623
|
+
break;
|
|
2624
|
+
}
|
|
2625
|
+
//console.log("to : " + next.x + " " + next.y + " " + next.o);
|
|
2626
|
+
/* special case, where we've reached the grid boundaries */
|
|
2627
|
+
if (
|
|
2628
|
+
q < 0 ||
|
|
2629
|
+
q >= rows ||
|
|
2630
|
+
p < 0 ||
|
|
2631
|
+
p >= cols ||
|
|
2632
|
+
typeof grid.cells[q][p] === "undefined"
|
|
2633
|
+
) {
|
|
2634
|
+
/* to create a closed path, we need to trace our way
|
|
2635
|
+
arround the missing data, until we find an entry
|
|
2636
|
+
point again
|
|
2637
|
+
*/
|
|
2638
|
+
|
|
2639
|
+
/* set back coordinates of current cell */
|
|
2640
|
+
p -= next.x;
|
|
2641
|
+
q -= next.y;
|
|
2642
|
+
|
|
2643
|
+
//console.log("reached boundary at " + p + " " + q);
|
|
2644
|
+
|
|
2645
|
+
var missing = traceOutOfGridPath(
|
|
2646
|
+
grid,
|
|
2647
|
+
p,
|
|
2648
|
+
q,
|
|
2649
|
+
next.x,
|
|
2650
|
+
next.y,
|
|
2651
|
+
next.o
|
|
2652
|
+
);
|
|
2653
|
+
if (missing !== null) {
|
|
2654
|
+
missing.path.forEach(function (pp) {
|
|
2655
|
+
//console.log("coords: " + (pp[0]) + " " + (pp[1]));
|
|
2656
|
+
currentPolygon.push(pp);
|
|
2657
|
+
});
|
|
2658
|
+
p = missing.i;
|
|
2659
|
+
q = missing.j;
|
|
2660
|
+
prev = missing;
|
|
2661
|
+
} else {
|
|
2662
|
+
break;
|
|
2663
|
+
}
|
|
2664
|
+
//console.log(grid.cells[q][p]);
|
|
2665
|
+
}
|
|
2666
|
+
} while (
|
|
2667
|
+
typeof grid.cells[q][p] !== "undefined" &&
|
|
2668
|
+
grid.cells[q][p].edges.length > 0
|
|
2669
|
+
);
|
|
2670
|
+
|
|
2671
|
+
areas.push(currentPolygon);
|
|
2672
|
+
//console.log("next polygon");
|
|
2673
|
+
//console.log(currentPolygon);
|
|
2674
|
+
currentPolygon = [];
|
|
2675
|
+
if (grid.cells[j][i].edges.length > 0) i--;
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
return areas;
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
function traceOutOfGridPath(grid, i, j, d_x, d_y, d_o) {
|
|
2683
|
+
var cell = grid.cells[j][i];
|
|
2684
|
+
var cval = cell.cval_real;
|
|
2685
|
+
var p = i + d_x,
|
|
2686
|
+
q = j + d_y;
|
|
2687
|
+
var path = [];
|
|
2688
|
+
var closed = false;
|
|
2689
|
+
|
|
2690
|
+
while (!closed) {
|
|
2691
|
+
//console.log("processing cell " + p + "," + q + " " + d_x + " " + d_y + " " + d_o);
|
|
2692
|
+
if (
|
|
2693
|
+
typeof grid.cells[q] === "undefined" ||
|
|
2694
|
+
typeof grid.cells[q][p] === "undefined"
|
|
2695
|
+
) {
|
|
2696
|
+
//console.log("which is undefined");
|
|
2697
|
+
/* we can't move on, so we have to change direction to proceed further */
|
|
2698
|
+
|
|
2699
|
+
/* go back to previous cell */
|
|
2700
|
+
q -= d_y;
|
|
2701
|
+
p -= d_x;
|
|
2702
|
+
cell = grid.cells[q][p];
|
|
2703
|
+
cval = cell.cval_real;
|
|
2704
|
+
|
|
2705
|
+
/* check where we've left defined cells of the grid... */
|
|
2706
|
+
if (d_y === -1) {
|
|
2707
|
+
/* we came from top */
|
|
2708
|
+
if (d_o === 0) {
|
|
2709
|
+
/* exit left */
|
|
2710
|
+
if (cval & Node3) {
|
|
2711
|
+
/* lower left node is within range, so we move left */
|
|
2712
|
+
path.push([p, q]);
|
|
2713
|
+
d_x = -1;
|
|
2714
|
+
d_y = 0;
|
|
2715
|
+
d_o = 0;
|
|
2716
|
+
} else if (cval & Node2) {
|
|
2717
|
+
/* lower right node is within range, so we move right */
|
|
2718
|
+
path.push([p + 1, q]);
|
|
2719
|
+
d_x = 1;
|
|
2720
|
+
d_y = 0;
|
|
2721
|
+
d_o = 0;
|
|
2722
|
+
} else {
|
|
2723
|
+
/* close the path */
|
|
2724
|
+
path.push([p + cell.bottomright, q]);
|
|
2725
|
+
d_x = 0;
|
|
2726
|
+
d_y = 1;
|
|
2727
|
+
d_o = 1;
|
|
2728
|
+
closed = true;
|
|
2729
|
+
break;
|
|
2730
|
+
}
|
|
2731
|
+
} else if (cval & Node3) {
|
|
2732
|
+
path.push([p, q]);
|
|
2733
|
+
d_x = -1;
|
|
2734
|
+
d_y = 0;
|
|
2735
|
+
d_o = 0;
|
|
2736
|
+
} else if (cval & Node2) {
|
|
2737
|
+
path.push([p + cell.bottomright, q]);
|
|
2738
|
+
d_x = 0;
|
|
2739
|
+
d_y = 1;
|
|
2740
|
+
d_o = 1;
|
|
2741
|
+
closed = true;
|
|
2742
|
+
break;
|
|
2743
|
+
} else {
|
|
2744
|
+
path.push([p + cell.bottomleft, q]);
|
|
2745
|
+
d_x = 0;
|
|
2746
|
+
d_y = 1;
|
|
2747
|
+
d_o = 0;
|
|
2748
|
+
closed = true;
|
|
2749
|
+
break;
|
|
2750
|
+
}
|
|
2751
|
+
} else if (d_y === 1) {
|
|
2752
|
+
/* we came from bottom */
|
|
2753
|
+
//console.log("we came from bottom and hit a non-existing cell " + (p + d_x) + "," + (q + d_y) + "!");
|
|
2754
|
+
if (d_o === 0) {
|
|
2755
|
+
/* exit left */
|
|
2756
|
+
if (cval & Node1) {
|
|
2757
|
+
/* top right node is within range, so we move right */
|
|
2758
|
+
path.push([p + 1, q + 1]);
|
|
2759
|
+
d_x = 1;
|
|
2760
|
+
d_y = 0;
|
|
2761
|
+
d_o = 1;
|
|
2762
|
+
} else if (!(cval & Node0)) {
|
|
2763
|
+
/* found entry within same cell */
|
|
2764
|
+
path.push([p + cell.topright, q + 1]);
|
|
2765
|
+
d_x = 0;
|
|
2766
|
+
d_y = -1;
|
|
2767
|
+
d_o = 1;
|
|
2768
|
+
closed = true;
|
|
2769
|
+
//console.log("found entry from bottom at " + p + "," + q);
|
|
2770
|
+
break;
|
|
2771
|
+
} else {
|
|
2772
|
+
path.push([p + cell.topleft, q + 1]);
|
|
2773
|
+
d_x = 0;
|
|
2774
|
+
d_y = -1;
|
|
2775
|
+
d_o = 0;
|
|
2776
|
+
closed = true;
|
|
2777
|
+
break;
|
|
2778
|
+
}
|
|
2779
|
+
} else if (cval & Node1) {
|
|
2780
|
+
path.push([p + 1, q + 1]);
|
|
2781
|
+
d_x = 1;
|
|
2782
|
+
d_y = 0;
|
|
2783
|
+
d_o = 1;
|
|
2784
|
+
} else {
|
|
2785
|
+
/* move right */
|
|
2786
|
+
path.push([p + 1, q + 1]);
|
|
2787
|
+
d_x = 1;
|
|
2788
|
+
d_y = 0;
|
|
2789
|
+
d_o = 1;
|
|
2790
|
+
//console.log("wtf");
|
|
2791
|
+
//break;
|
|
2792
|
+
}
|
|
2793
|
+
} else if (d_x === -1) {
|
|
2794
|
+
/* we came from right */
|
|
2795
|
+
//console.log("we came from right and hit a non-existing cell at " + (p + d_x) + "," + (q + d_y) + "!");
|
|
2796
|
+
if (d_o === 0) {
|
|
2797
|
+
//console.log("continue at bottom");
|
|
2798
|
+
if (cval & Node0) {
|
|
2799
|
+
path.push([p, q + 1]);
|
|
2800
|
+
d_x = 0;
|
|
2801
|
+
d_y = 1;
|
|
2802
|
+
d_o = 0;
|
|
2803
|
+
//console.log("moving upwards to " + (p + d_x) + "," + (q + d_y) + "!");
|
|
2804
|
+
} else if (!(cval & Node3)) {
|
|
2805
|
+
/* there has to be an entry into the regular grid again! */
|
|
2806
|
+
//console.log("exiting top");
|
|
2807
|
+
path.push([p, q + cell.lefttop]);
|
|
2808
|
+
d_x = 1;
|
|
2809
|
+
d_y = 0;
|
|
2810
|
+
d_o = 1;
|
|
2811
|
+
closed = true;
|
|
2812
|
+
break;
|
|
2813
|
+
} else {
|
|
2814
|
+
//console.log("exiting bottom");
|
|
2815
|
+
path.push([p, q + cell.leftbottom]);
|
|
2816
|
+
d_x = 1;
|
|
2817
|
+
d_y = 0;
|
|
2818
|
+
d_o = 0;
|
|
2819
|
+
closed = true;
|
|
2820
|
+
break;
|
|
2821
|
+
}
|
|
2822
|
+
} else {
|
|
2823
|
+
//console.log("continue at top");
|
|
2824
|
+
if (cval & Node0) {
|
|
2825
|
+
path.push([p, q + 1]);
|
|
2826
|
+
d_x = 0;
|
|
2827
|
+
d_y = 1;
|
|
2828
|
+
d_o = 0;
|
|
2829
|
+
//console.log("moving upwards to " + (p + d_x) + "," + (q + d_y) + "!");
|
|
2830
|
+
} else {
|
|
2831
|
+
/* */
|
|
2832
|
+
console.log("MarchingSquaresJS-isoBands: wtf");
|
|
2833
|
+
break;
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2836
|
+
} else if (d_x === 1) {
|
|
2837
|
+
/* we came from left */
|
|
2838
|
+
//console.log("we came from left and hit a non-existing cell " + (p + d_x) + "," + (q + d_y) + "!");
|
|
2839
|
+
if (d_o === 0) {
|
|
2840
|
+
/* exit bottom */
|
|
2841
|
+
if (cval & Node2) {
|
|
2842
|
+
path.push([p + 1, q]);
|
|
2843
|
+
d_x = 0;
|
|
2844
|
+
d_y = -1;
|
|
2845
|
+
d_o = 1;
|
|
2846
|
+
} else {
|
|
2847
|
+
path.push([p + 1, q + cell.rightbottom]);
|
|
2848
|
+
d_x = -1;
|
|
2849
|
+
d_y = 0;
|
|
2850
|
+
d_o = 0;
|
|
2851
|
+
closed = true;
|
|
2852
|
+
break;
|
|
2853
|
+
}
|
|
2854
|
+
} else {
|
|
2855
|
+
/* exit top */
|
|
2856
|
+
if (cval & Node2) {
|
|
2857
|
+
path.push([p + 1, q]);
|
|
2858
|
+
d_x = 0;
|
|
2859
|
+
d_y = -1;
|
|
2860
|
+
d_o = 1;
|
|
2861
|
+
} else if (!(cval & Node1)) {
|
|
2862
|
+
path.push([p + 1, q + cell.rightbottom]);
|
|
2863
|
+
d_x = -1;
|
|
2864
|
+
d_y = 0;
|
|
2865
|
+
d_o = 0;
|
|
2866
|
+
closed = true;
|
|
2867
|
+
break;
|
|
2868
|
+
} else {
|
|
2869
|
+
path.push([p + 1, q + cell.righttop]);
|
|
2870
|
+
d_x = -1;
|
|
2871
|
+
d_y = 0;
|
|
2872
|
+
d_o = 1;
|
|
2873
|
+
break;
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
} else {
|
|
2877
|
+
/* we came from the same cell */
|
|
2878
|
+
console.log("MarchingSquaresJS-isoBands: we came from nowhere!");
|
|
2879
|
+
break;
|
|
2880
|
+
}
|
|
2881
|
+
} else {
|
|
2882
|
+
/* try to find an entry into the regular grid again! */
|
|
2883
|
+
cell = grid.cells[q][p];
|
|
2884
|
+
cval = cell.cval_real;
|
|
2885
|
+
//console.log("which is defined");
|
|
2886
|
+
|
|
2887
|
+
if (d_x === -1) {
|
|
2888
|
+
if (d_o === 0) {
|
|
2889
|
+
/* try to go downwards */
|
|
2890
|
+
if (
|
|
2891
|
+
typeof grid.cells[q - 1] !== "undefined" &&
|
|
2892
|
+
typeof grid.cells[q - 1][p] !== "undefined"
|
|
2893
|
+
) {
|
|
2894
|
+
d_x = 0;
|
|
2895
|
+
d_y = -1;
|
|
2896
|
+
d_o = 1;
|
|
2897
|
+
} else if (cval & Node3) {
|
|
2898
|
+
/* proceed searching in x-direction */
|
|
2899
|
+
//console.log("proceeding in x-direction!");
|
|
2900
|
+
path.push([p, q]);
|
|
2901
|
+
} else {
|
|
2902
|
+
/* we must have found an entry into the regular grid */
|
|
2903
|
+
path.push([p + cell.bottomright, q]);
|
|
2904
|
+
d_x = 0;
|
|
2905
|
+
d_y = 1;
|
|
2906
|
+
d_o = 1;
|
|
2907
|
+
closed = true;
|
|
2908
|
+
//console.log("found entry from bottom at " + p + "," + q);
|
|
2909
|
+
break;
|
|
2910
|
+
}
|
|
2911
|
+
} else if (cval & Node0) {
|
|
2912
|
+
/* proceed searchin in x-direction */
|
|
2913
|
+
console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!");
|
|
2914
|
+
} else {
|
|
2915
|
+
/* we must have found an entry into the regular grid */
|
|
2916
|
+
console.log(
|
|
2917
|
+
"MarchingSquaresJS-isoBands: found entry from top at " + p + "," + q
|
|
2918
|
+
);
|
|
2919
|
+
break;
|
|
2920
|
+
}
|
|
2921
|
+
} else if (d_x === 1) {
|
|
2922
|
+
if (d_o === 0) {
|
|
2923
|
+
console.log("MarchingSquaresJS-isoBands: wtf");
|
|
2924
|
+
break;
|
|
2925
|
+
} else {
|
|
2926
|
+
/* try to go upwards */
|
|
2927
|
+
if (
|
|
2928
|
+
typeof grid.cells[q + 1] !== "undefined" &&
|
|
2929
|
+
typeof grid.cells[q + 1][p] !== "undefined"
|
|
2930
|
+
) {
|
|
2931
|
+
d_x = 0;
|
|
2932
|
+
d_y = 1;
|
|
2933
|
+
d_o = 0;
|
|
2934
|
+
} else if (cval & Node1) {
|
|
2935
|
+
path.push([p + 1, q + 1]);
|
|
2936
|
+
d_x = 1;
|
|
2937
|
+
d_y = 0;
|
|
2938
|
+
d_o = 1;
|
|
2939
|
+
} else {
|
|
2940
|
+
/* found an entry point into regular grid! */
|
|
2941
|
+
path.push([p + cell.topleft, q + 1]);
|
|
2942
|
+
d_x = 0;
|
|
2943
|
+
d_y = -1;
|
|
2944
|
+
d_o = 0;
|
|
2945
|
+
closed = true;
|
|
2946
|
+
//console.log("found entry from bottom at " + p + "," + q);
|
|
2947
|
+
break;
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2950
|
+
} else if (d_y === -1) {
|
|
2951
|
+
if (d_o === 1) {
|
|
2952
|
+
/* try to go right */
|
|
2953
|
+
if (typeof grid.cells[q][p + 1] !== "undefined") {
|
|
2954
|
+
d_x = 1;
|
|
2955
|
+
d_y = 0;
|
|
2956
|
+
d_o = 1;
|
|
2957
|
+
} else if (cval & Node2) {
|
|
2958
|
+
path.push([p + 1, q]);
|
|
2959
|
+
d_x = 0;
|
|
2960
|
+
d_y = -1;
|
|
2961
|
+
d_o = 1;
|
|
2962
|
+
} else {
|
|
2963
|
+
/* found entry into regular grid! */
|
|
2964
|
+
path.push([p + 1, q + cell.righttop]);
|
|
2965
|
+
d_x = -1;
|
|
2966
|
+
d_y = 0;
|
|
2967
|
+
d_o = 1;
|
|
2968
|
+
closed = true;
|
|
2969
|
+
//console.log("found entry from top at " + p + "," + q);
|
|
2970
|
+
break;
|
|
2971
|
+
}
|
|
2972
|
+
} else {
|
|
2973
|
+
console.log("MarchingSquaresJS-isoBands: wtf");
|
|
2974
|
+
break;
|
|
2975
|
+
}
|
|
2976
|
+
} else if (d_y === 1) {
|
|
2977
|
+
if (d_o === 0) {
|
|
2978
|
+
//console.log("we came from bottom left and proceed to the left");
|
|
2979
|
+
/* try to go left */
|
|
2980
|
+
if (typeof grid.cells[q][p - 1] !== "undefined") {
|
|
2981
|
+
d_x = -1;
|
|
2982
|
+
d_y = 0;
|
|
2983
|
+
d_o = 0;
|
|
2984
|
+
} else if (cval & Node0) {
|
|
2985
|
+
path.push([p, q + 1]);
|
|
2986
|
+
d_x = 0;
|
|
2987
|
+
d_y = 1;
|
|
2988
|
+
d_o = 0;
|
|
2989
|
+
} else {
|
|
2990
|
+
/* found an entry point into regular grid! */
|
|
2991
|
+
path.push([p, q + cell.leftbottom]);
|
|
2992
|
+
d_x = 1;
|
|
2993
|
+
d_y = 0;
|
|
2994
|
+
d_o = 0;
|
|
2995
|
+
closed = true;
|
|
2996
|
+
//console.log("found entry from bottom at " + p + "," + q);
|
|
2997
|
+
break;
|
|
2998
|
+
}
|
|
2999
|
+
} else {
|
|
3000
|
+
//console.log("we came from bottom right and proceed to the right");
|
|
3001
|
+
console.log("MarchingSquaresJS-isoBands: wtf");
|
|
3002
|
+
break;
|
|
3003
|
+
}
|
|
3004
|
+
} else {
|
|
3005
|
+
console.log("MarchingSquaresJS-isoBands: where did we came from???");
|
|
3006
|
+
break;
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
p += d_x;
|
|
3011
|
+
q += d_y;
|
|
3012
|
+
//console.log("going on to " + p + "," + q + " via " + d_x + " " + d_y + " " + d_o);
|
|
3013
|
+
|
|
3014
|
+
if (p === i && q === j) {
|
|
3015
|
+
/* bail out, once we've closed a circle path */
|
|
3016
|
+
break;
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
//console.log("exit with " + p + "," + q + " " + d_x + " " + d_y + " " + d_o);
|
|
3021
|
+
return { path: path, i: p, j: q, x: d_x, y: d_y, o: d_o };
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
function deleteEdge(cell, edgeIdx) {
|
|
3025
|
+
delete cell.edges[edgeIdx];
|
|
3026
|
+
for (var k = edgeIdx + 1; k < cell.edges.length; k++) {
|
|
3027
|
+
cell.edges[k - 1] = cell.edges[k];
|
|
3028
|
+
}
|
|
3029
|
+
cell.edges.pop();
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
function getStartXY(cell) {
|
|
3033
|
+
if (cell.edges.length > 0) {
|
|
3034
|
+
var e = cell.edges[cell.edges.length - 1];
|
|
3035
|
+
//console.log("starting with edge " + e);
|
|
3036
|
+
var cval = cell.cval_real;
|
|
3037
|
+
switch (e) {
|
|
3038
|
+
case 0:
|
|
3039
|
+
if (cval & Node1) {
|
|
3040
|
+
/* node 1 within range */
|
|
3041
|
+
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
3042
|
+
} else {
|
|
3043
|
+
/* node 1 below or above threshold */
|
|
3044
|
+
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
3045
|
+
}
|
|
3046
|
+
case 1:
|
|
3047
|
+
if (cval & Node2) {
|
|
3048
|
+
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
3049
|
+
} else {
|
|
3050
|
+
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
3051
|
+
}
|
|
3052
|
+
case 2:
|
|
3053
|
+
if (cval & Node2) {
|
|
3054
|
+
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
3055
|
+
} else {
|
|
3056
|
+
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
3057
|
+
}
|
|
3058
|
+
case 3:
|
|
3059
|
+
if (cval & Node3) {
|
|
3060
|
+
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
3061
|
+
} else {
|
|
3062
|
+
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
3063
|
+
}
|
|
3064
|
+
case 4:
|
|
3065
|
+
if (cval & Node1) {
|
|
3066
|
+
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
3067
|
+
} else {
|
|
3068
|
+
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
3069
|
+
}
|
|
3070
|
+
case 5:
|
|
3071
|
+
if (cval & Node2) {
|
|
3072
|
+
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
3073
|
+
} else {
|
|
3074
|
+
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
3075
|
+
}
|
|
3076
|
+
case 6:
|
|
3077
|
+
if (cval & Node2) {
|
|
3078
|
+
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
3079
|
+
} else {
|
|
3080
|
+
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
3081
|
+
}
|
|
3082
|
+
case 7:
|
|
3083
|
+
if (cval & Node3) {
|
|
3084
|
+
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
3085
|
+
} else {
|
|
3086
|
+
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
3087
|
+
}
|
|
3088
|
+
case 8:
|
|
3089
|
+
if (cval & Node2) {
|
|
3090
|
+
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
3091
|
+
} else {
|
|
3092
|
+
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
3093
|
+
}
|
|
3094
|
+
case 9:
|
|
3095
|
+
if (cval & Node3) {
|
|
3096
|
+
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
3097
|
+
} else {
|
|
3098
|
+
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
3099
|
+
}
|
|
3100
|
+
case 10:
|
|
3101
|
+
if (cval & Node3) {
|
|
3102
|
+
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
3103
|
+
} else {
|
|
3104
|
+
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
3105
|
+
}
|
|
3106
|
+
case 11:
|
|
3107
|
+
if (cval & Node0) {
|
|
3108
|
+
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
3109
|
+
} else {
|
|
3110
|
+
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
3111
|
+
}
|
|
3112
|
+
case 12:
|
|
3113
|
+
if (cval & Node2) {
|
|
3114
|
+
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
3115
|
+
} else {
|
|
3116
|
+
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
3117
|
+
}
|
|
3118
|
+
case 13:
|
|
3119
|
+
if (cval & Node3) {
|
|
3120
|
+
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
3121
|
+
} else {
|
|
3122
|
+
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
3123
|
+
}
|
|
3124
|
+
case 14:
|
|
3125
|
+
if (cval & Node3) {
|
|
3126
|
+
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
3127
|
+
} else {
|
|
3128
|
+
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
3129
|
+
}
|
|
3130
|
+
case 15:
|
|
3131
|
+
if (cval & Node0) {
|
|
3132
|
+
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
3133
|
+
} else {
|
|
3134
|
+
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
3135
|
+
}
|
|
3136
|
+
case 16:
|
|
3137
|
+
if (cval & Node2) {
|
|
3138
|
+
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
3139
|
+
} else {
|
|
3140
|
+
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
3141
|
+
}
|
|
3142
|
+
case 17:
|
|
3143
|
+
if (cval & Node0) {
|
|
3144
|
+
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
3145
|
+
} else {
|
|
3146
|
+
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
3147
|
+
}
|
|
3148
|
+
case 18:
|
|
3149
|
+
if (cval & Node3) {
|
|
3150
|
+
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
3151
|
+
} else {
|
|
3152
|
+
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
3153
|
+
}
|
|
3154
|
+
case 19:
|
|
3155
|
+
if (cval & Node0) {
|
|
3156
|
+
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
3157
|
+
} else {
|
|
3158
|
+
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
3159
|
+
}
|
|
3160
|
+
case 20:
|
|
3161
|
+
if (cval & Node0) {
|
|
3162
|
+
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
3163
|
+
} else {
|
|
3164
|
+
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
3165
|
+
}
|
|
3166
|
+
case 21:
|
|
3167
|
+
if (cval & Node1) {
|
|
3168
|
+
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
3169
|
+
} else {
|
|
3170
|
+
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
3171
|
+
}
|
|
3172
|
+
case 22:
|
|
3173
|
+
if (cval & Node0) {
|
|
3174
|
+
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
3175
|
+
} else {
|
|
3176
|
+
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
3177
|
+
}
|
|
3178
|
+
case 23:
|
|
3179
|
+
if (cval & Node1) {
|
|
3180
|
+
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
3181
|
+
} else {
|
|
3182
|
+
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
3183
|
+
}
|
|
3184
|
+
default:
|
|
3185
|
+
console.log("MarchingSquaresJS-isoBands: edge index out of range!");
|
|
3186
|
+
console.log(cell);
|
|
3187
|
+
break;
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
return null;
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3194
|
+
function getExitXY(cell, x, y, o) {
|
|
3195
|
+
var e,
|
|
3196
|
+
id_x,
|
|
3197
|
+
d_x,
|
|
3198
|
+
d_y,
|
|
3199
|
+
cval = cell.cval;
|
|
3200
|
+
var d_o;
|
|
3201
|
+
|
|
3202
|
+
switch (x) {
|
|
3203
|
+
case -1:
|
|
3204
|
+
switch (o) {
|
|
3205
|
+
case 0:
|
|
3206
|
+
e = isoBandEdgeRB[cval];
|
|
3207
|
+
d_x = isoBandNextXRB[cval];
|
|
3208
|
+
d_y = isoBandNextYRB[cval];
|
|
3209
|
+
d_o = isoBandNextORB[cval];
|
|
3210
|
+
break;
|
|
3211
|
+
default:
|
|
3212
|
+
e = isoBandEdgeRT[cval];
|
|
3213
|
+
d_x = isoBandNextXRT[cval];
|
|
3214
|
+
d_y = isoBandNextYRT[cval];
|
|
3215
|
+
d_o = isoBandNextORT[cval];
|
|
3216
|
+
break;
|
|
3217
|
+
}
|
|
3218
|
+
break;
|
|
3219
|
+
case 1:
|
|
3220
|
+
switch (o) {
|
|
3221
|
+
case 0:
|
|
3222
|
+
e = isoBandEdgeLB[cval];
|
|
3223
|
+
d_x = isoBandNextXLB[cval];
|
|
3224
|
+
d_y = isoBandNextYLB[cval];
|
|
3225
|
+
d_o = isoBandNextOLB[cval];
|
|
3226
|
+
break;
|
|
3227
|
+
default:
|
|
3228
|
+
e = isoBandEdgeLT[cval];
|
|
3229
|
+
d_x = isoBandNextXLT[cval];
|
|
3230
|
+
d_y = isoBandNextYLT[cval];
|
|
3231
|
+
d_o = isoBandNextOLT[cval];
|
|
3232
|
+
break;
|
|
3233
|
+
}
|
|
3234
|
+
break;
|
|
3235
|
+
default:
|
|
3236
|
+
switch (y) {
|
|
3237
|
+
case -1:
|
|
3238
|
+
switch (o) {
|
|
3239
|
+
case 0:
|
|
3240
|
+
e = isoBandEdgeTL[cval];
|
|
3241
|
+
d_x = isoBandNextXTL[cval];
|
|
3242
|
+
d_y = isoBandNextYTL[cval];
|
|
3243
|
+
d_o = isoBandNextOTL[cval];
|
|
3244
|
+
break;
|
|
3245
|
+
default:
|
|
3246
|
+
e = isoBandEdgeTR[cval];
|
|
3247
|
+
d_x = isoBandNextXTR[cval];
|
|
3248
|
+
d_y = isoBandNextYTR[cval];
|
|
3249
|
+
d_o = isoBandNextOTR[cval];
|
|
3250
|
+
break;
|
|
3251
|
+
}
|
|
3252
|
+
break;
|
|
3253
|
+
case 1:
|
|
3254
|
+
switch (o) {
|
|
3255
|
+
case 0:
|
|
3256
|
+
e = isoBandEdgeBL[cval];
|
|
3257
|
+
d_x = isoBandNextXBL[cval];
|
|
3258
|
+
d_y = isoBandNextYBL[cval];
|
|
3259
|
+
d_o = isoBandNextOBL[cval];
|
|
3260
|
+
break;
|
|
3261
|
+
default:
|
|
3262
|
+
e = isoBandEdgeBR[cval];
|
|
3263
|
+
d_x = isoBandNextXBR[cval];
|
|
3264
|
+
d_y = isoBandNextYBR[cval];
|
|
3265
|
+
d_o = isoBandNextOBR[cval];
|
|
3266
|
+
break;
|
|
3267
|
+
}
|
|
3268
|
+
break;
|
|
3269
|
+
}
|
|
3270
|
+
break;
|
|
3271
|
+
}
|
|
3272
|
+
|
|
3273
|
+
id_x = cell.edges.indexOf(e);
|
|
3274
|
+
if (typeof cell.edges[id_x] !== "undefined") {
|
|
3275
|
+
deleteEdge(cell, id_x);
|
|
3276
|
+
} else {
|
|
3277
|
+
//console.log("wrong edges...");
|
|
3278
|
+
//console.log(x + " " + y + " " + o);
|
|
3279
|
+
//console.log(cell);
|
|
3280
|
+
return null;
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
cval = cell.cval_real;
|
|
3284
|
+
|
|
3285
|
+
switch (e) {
|
|
3286
|
+
case 0:
|
|
3287
|
+
if (cval & Node1) {
|
|
3288
|
+
/* node 1 within range */
|
|
3289
|
+
x = cell.topleft;
|
|
3290
|
+
y = 1;
|
|
3291
|
+
} else {
|
|
3292
|
+
/* node 1 below or above threshold */
|
|
3293
|
+
x = 1;
|
|
3294
|
+
y = cell.righttop;
|
|
3295
|
+
}
|
|
3296
|
+
break;
|
|
3297
|
+
case 1:
|
|
3298
|
+
if (cval & Node2) {
|
|
3299
|
+
x = 1;
|
|
3300
|
+
y = cell.rightbottom;
|
|
3301
|
+
} else {
|
|
3302
|
+
x = cell.topleft;
|
|
3303
|
+
y = 1;
|
|
3304
|
+
}
|
|
3305
|
+
break;
|
|
3306
|
+
case 2:
|
|
3307
|
+
if (cval & Node2) {
|
|
3308
|
+
x = cell.topleft;
|
|
3309
|
+
y = 1;
|
|
3310
|
+
} else {
|
|
3311
|
+
x = cell.bottomright;
|
|
3312
|
+
y = 0;
|
|
3313
|
+
}
|
|
3314
|
+
break;
|
|
3315
|
+
case 3:
|
|
3316
|
+
if (cval & Node3) {
|
|
3317
|
+
x = cell.bottomleft;
|
|
3318
|
+
y = 0;
|
|
3319
|
+
} else {
|
|
3320
|
+
x = cell.topleft;
|
|
3321
|
+
y = 1;
|
|
3322
|
+
}
|
|
3323
|
+
break;
|
|
3324
|
+
case 4:
|
|
3325
|
+
if (cval & Node1) {
|
|
3326
|
+
x = cell.topright;
|
|
3327
|
+
y = 1;
|
|
3328
|
+
} else {
|
|
3329
|
+
x = 1;
|
|
3330
|
+
y = cell.righttop;
|
|
3331
|
+
}
|
|
3332
|
+
break;
|
|
3333
|
+
case 5:
|
|
3334
|
+
if (cval & Node2) {
|
|
3335
|
+
x = 1;
|
|
3336
|
+
y = cell.rightbottom;
|
|
3337
|
+
} else {
|
|
3338
|
+
x = cell.topright;
|
|
3339
|
+
y = 1;
|
|
3340
|
+
}
|
|
3341
|
+
break;
|
|
3342
|
+
case 6:
|
|
3343
|
+
if (cval & Node2) {
|
|
3344
|
+
x = cell.topright;
|
|
3345
|
+
y = 1;
|
|
3346
|
+
} else {
|
|
3347
|
+
x = cell.bottomright;
|
|
3348
|
+
y = 0;
|
|
3349
|
+
}
|
|
3350
|
+
break;
|
|
3351
|
+
case 7:
|
|
3352
|
+
if (cval & Node3) {
|
|
3353
|
+
x = cell.bottomleft;
|
|
3354
|
+
y = 0;
|
|
3355
|
+
} else {
|
|
3356
|
+
x = cell.topright;
|
|
3357
|
+
y = 1;
|
|
3358
|
+
}
|
|
3359
|
+
break;
|
|
3360
|
+
case 8:
|
|
3361
|
+
if (cval & Node2) {
|
|
3362
|
+
x = 1;
|
|
3363
|
+
y = cell.righttop;
|
|
3364
|
+
} else {
|
|
3365
|
+
x = cell.bottomright;
|
|
3366
|
+
y = 0;
|
|
3367
|
+
}
|
|
3368
|
+
break;
|
|
3369
|
+
case 9:
|
|
3370
|
+
if (cval & Node3) {
|
|
3371
|
+
x = cell.bottomleft;
|
|
3372
|
+
y = 0;
|
|
3373
|
+
} else {
|
|
3374
|
+
x = 1;
|
|
3375
|
+
y = cell.righttop;
|
|
3376
|
+
}
|
|
3377
|
+
break;
|
|
3378
|
+
case 10:
|
|
3379
|
+
if (cval & Node3) {
|
|
3380
|
+
x = 1;
|
|
3381
|
+
y = cell.righttop;
|
|
3382
|
+
} else {
|
|
3383
|
+
x = 0;
|
|
3384
|
+
y = cell.leftbottom;
|
|
3385
|
+
}
|
|
3386
|
+
break;
|
|
3387
|
+
case 11:
|
|
3388
|
+
if (cval & Node0) {
|
|
3389
|
+
x = 0;
|
|
3390
|
+
y = cell.lefttop;
|
|
3391
|
+
} else {
|
|
3392
|
+
x = 1;
|
|
3393
|
+
y = cell.righttop;
|
|
3394
|
+
}
|
|
3395
|
+
break;
|
|
3396
|
+
case 12:
|
|
3397
|
+
if (cval & Node2) {
|
|
3398
|
+
x = 1;
|
|
3399
|
+
y = cell.rightbottom;
|
|
3400
|
+
} else {
|
|
3401
|
+
x = cell.bottomright;
|
|
3402
|
+
y = 0;
|
|
3403
|
+
}
|
|
3404
|
+
break;
|
|
3405
|
+
case 13:
|
|
3406
|
+
if (cval & Node3) {
|
|
3407
|
+
x = cell.bottomleft;
|
|
3408
|
+
y = 0;
|
|
3409
|
+
} else {
|
|
3410
|
+
x = 1;
|
|
3411
|
+
y = cell.rightbottom;
|
|
3412
|
+
}
|
|
3413
|
+
break;
|
|
3414
|
+
case 14:
|
|
3415
|
+
if (cval & Node3) {
|
|
3416
|
+
x = 1;
|
|
3417
|
+
y = cell.rightbottom;
|
|
3418
|
+
} else {
|
|
3419
|
+
x = 0;
|
|
3420
|
+
y = cell.leftbottom;
|
|
3421
|
+
}
|
|
3422
|
+
break;
|
|
3423
|
+
case 15:
|
|
3424
|
+
if (cval & Node0) {
|
|
3425
|
+
x = 0;
|
|
3426
|
+
y = cell.lefttop;
|
|
3427
|
+
} else {
|
|
3428
|
+
x = 1;
|
|
3429
|
+
y = cell.rightbottom;
|
|
3430
|
+
}
|
|
3431
|
+
break;
|
|
3432
|
+
case 16:
|
|
3433
|
+
if (cval & Node2) {
|
|
3434
|
+
x = 0;
|
|
3435
|
+
y = cell.leftbottom;
|
|
3436
|
+
} else {
|
|
3437
|
+
x = cell.bottomright;
|
|
3438
|
+
y = 0;
|
|
3439
|
+
}
|
|
3440
|
+
break;
|
|
3441
|
+
case 17:
|
|
3442
|
+
if (cval & Node0) {
|
|
3443
|
+
x = 0;
|
|
3444
|
+
y = cell.lefttop;
|
|
3445
|
+
} else {
|
|
3446
|
+
x = cell.bottomright;
|
|
3447
|
+
y = 0;
|
|
3448
|
+
}
|
|
3449
|
+
break;
|
|
3450
|
+
case 18:
|
|
3451
|
+
if (cval & Node3) {
|
|
3452
|
+
x = cell.bottomleft;
|
|
3453
|
+
y = 0;
|
|
3454
|
+
} else {
|
|
3455
|
+
x = 0;
|
|
3456
|
+
y = cell.leftbottom;
|
|
3457
|
+
}
|
|
3458
|
+
break;
|
|
3459
|
+
case 19:
|
|
3460
|
+
if (cval & Node0) {
|
|
3461
|
+
x = 0;
|
|
3462
|
+
y = cell.lefttop;
|
|
3463
|
+
} else {
|
|
3464
|
+
x = cell.bottomleft;
|
|
3465
|
+
y = 0;
|
|
3466
|
+
}
|
|
3467
|
+
break;
|
|
3468
|
+
case 20:
|
|
3469
|
+
if (cval & Node0) {
|
|
3470
|
+
x = 0;
|
|
3471
|
+
y = cell.leftbottom;
|
|
3472
|
+
} else {
|
|
3473
|
+
x = cell.topleft;
|
|
3474
|
+
y = 1;
|
|
3475
|
+
}
|
|
3476
|
+
break;
|
|
3477
|
+
case 21:
|
|
3478
|
+
if (cval & Node1) {
|
|
3479
|
+
x = cell.topright;
|
|
3480
|
+
y = 1;
|
|
3481
|
+
} else {
|
|
3482
|
+
x = 0;
|
|
3483
|
+
y = cell.leftbottom;
|
|
3484
|
+
}
|
|
3485
|
+
break;
|
|
3486
|
+
case 22:
|
|
3487
|
+
if (cval & Node0) {
|
|
3488
|
+
x = 0;
|
|
3489
|
+
y = cell.lefttop;
|
|
3490
|
+
} else {
|
|
3491
|
+
x = cell.topleft;
|
|
3492
|
+
y = 1;
|
|
3493
|
+
}
|
|
3494
|
+
break;
|
|
3495
|
+
case 23:
|
|
3496
|
+
if (cval & Node1) {
|
|
3497
|
+
x = cell.topright;
|
|
3498
|
+
y = 1;
|
|
3499
|
+
} else {
|
|
3500
|
+
x = 0;
|
|
3501
|
+
y = cell.lefttop;
|
|
3502
|
+
}
|
|
3503
|
+
break;
|
|
3504
|
+
default:
|
|
3505
|
+
console.log("MarchingSquaresJS-isoBands: edge index out of range!");
|
|
3506
|
+
console.log(cell);
|
|
3507
|
+
return null;
|
|
3508
|
+
}
|
|
3509
|
+
|
|
3510
|
+
if (
|
|
3511
|
+
typeof x === "undefined" ||
|
|
3512
|
+
typeof y === "undefined" ||
|
|
3513
|
+
typeof d_x === "undefined" ||
|
|
3514
|
+
typeof d_y === "undefined" ||
|
|
3515
|
+
typeof d_o === "undefined"
|
|
3516
|
+
) {
|
|
3517
|
+
console.log("MarchingSquaresJS-isoBands: undefined value!");
|
|
3518
|
+
console.log(cell);
|
|
3519
|
+
console.log(x + " " + y + " " + d_x + " " + d_y + " " + d_o);
|
|
3520
|
+
}
|
|
3521
|
+
return { p: [x, y], x: d_x, y: d_y, o: d_o };
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
function BandGrid2Areas(grid) {
|
|
3525
|
+
var areas = [];
|
|
3526
|
+
var area_idx = 0;
|
|
3527
|
+
|
|
3528
|
+
grid.cells.forEach(function (g, j) {
|
|
3529
|
+
g.forEach(function (gg, i) {
|
|
3530
|
+
if (typeof gg !== "undefined") {
|
|
3531
|
+
var a = polygon_table[gg.cval](gg);
|
|
3532
|
+
if (typeof a === "object" && isArray(a)) {
|
|
3533
|
+
if (typeof a[0] === "object" && isArray(a[0])) {
|
|
3534
|
+
if (typeof a[0][0] === "object" && isArray(a[0][0])) {
|
|
3535
|
+
a.forEach(function (aa) {
|
|
3536
|
+
aa.forEach(function (aaa) {
|
|
3537
|
+
aaa[0] += i;
|
|
3538
|
+
aaa[1] += j;
|
|
3539
|
+
});
|
|
3540
|
+
areas[area_idx++] = aa;
|
|
3541
|
+
});
|
|
3542
|
+
} else {
|
|
3543
|
+
a.forEach(function (aa) {
|
|
3544
|
+
aa[0] += i;
|
|
3545
|
+
aa[1] += j;
|
|
3546
|
+
});
|
|
3547
|
+
areas[area_idx++] = a;
|
|
3548
|
+
}
|
|
3549
|
+
} else {
|
|
3550
|
+
console.log(
|
|
3551
|
+
"MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"
|
|
3552
|
+
);
|
|
3553
|
+
}
|
|
3554
|
+
} else {
|
|
3555
|
+
console.log(
|
|
3556
|
+
"MarchingSquaresJS-isoBands: bandcell polygon with null coordinates"
|
|
3557
|
+
);
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
});
|
|
3561
|
+
});
|
|
3562
|
+
|
|
3563
|
+
return areas;
|
|
3564
|
+
}
|
|
3565
|
+
|
|
3566
|
+
/**
|
|
3567
|
+
* Takes a square or rectangular grid {@link FeatureCollection} of {@link Point} features with z-values and an array of
|
|
3568
|
+
* value breaks and generates filled contour isobands.
|
|
3569
|
+
*
|
|
3570
|
+
* @name isobands
|
|
3571
|
+
* @param {FeatureCollection<Point>} pointGrid input points - must be square or rectangular
|
|
3572
|
+
* @param {Array<number>} breaks where to draw contours
|
|
3573
|
+
* @param {Object} [options={}] options on output
|
|
3574
|
+
* @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled
|
|
3575
|
+
* @param {Object} [options.commonProperties={}] GeoJSON properties passed to ALL isobands
|
|
3576
|
+
* @param {Array<Object>} [options.breaksProperties=[]] GeoJSON properties passed, in order, to the correspondent isoband (order defined by breaks)
|
|
3577
|
+
* @returns {FeatureCollection<MultiPolygon>} a FeatureCollection of {@link MultiPolygon} features representing isobands
|
|
3578
|
+
*/
|
|
3579
|
+
function isobands(pointGrid, breaks, options) {
|
|
3580
|
+
// Optional parameters
|
|
3581
|
+
options = options || {};
|
|
3582
|
+
if (!helpers.isObject(options)) throw new Error("options is invalid");
|
|
3583
|
+
var zProperty = options.zProperty || "elevation";
|
|
3584
|
+
var commonProperties = options.commonProperties || {};
|
|
3585
|
+
var breaksProperties = options.breaksProperties || [];
|
|
3586
|
+
|
|
3587
|
+
// Validation
|
|
3588
|
+
invariant.collectionOf(pointGrid, "Point", "Input must contain Points");
|
|
3589
|
+
if (!breaks) throw new Error("breaks is required");
|
|
3590
|
+
if (!Array.isArray(breaks)) throw new Error("breaks is not an Array");
|
|
3591
|
+
if (!helpers.isObject(commonProperties))
|
|
3592
|
+
throw new Error("commonProperties is not an Object");
|
|
3593
|
+
if (!Array.isArray(breaksProperties))
|
|
3594
|
+
throw new Error("breaksProperties is not an Array");
|
|
3595
|
+
|
|
3596
|
+
// Isoband methods
|
|
3597
|
+
var matrix = gridToMatrix(pointGrid, { zProperty: zProperty, flip: true });
|
|
3598
|
+
var contours = createContourLines(matrix, breaks, zProperty);
|
|
3599
|
+
contours = rescaleContours(contours, matrix, pointGrid);
|
|
3600
|
+
|
|
3601
|
+
var multipolygons = contours.map(function (contour, index) {
|
|
3602
|
+
if (breaksProperties[index] && !helpers.isObject(breaksProperties[index])) {
|
|
3603
|
+
throw new Error("Each mappedProperty is required to be an Object");
|
|
3604
|
+
}
|
|
3605
|
+
// collect all properties
|
|
3606
|
+
var contourProperties = objectAssign__default['default'](
|
|
3607
|
+
{},
|
|
3608
|
+
commonProperties,
|
|
3609
|
+
breaksProperties[index]
|
|
3610
|
+
);
|
|
3611
|
+
contourProperties[zProperty] = contour[zProperty];
|
|
3612
|
+
var multiP = helpers.multiPolygon(contour.groupedRings, contourProperties);
|
|
3613
|
+
return multiP;
|
|
3614
|
+
});
|
|
3615
|
+
|
|
3616
|
+
return helpers.featureCollection(multipolygons);
|
|
3617
|
+
}
|
|
3618
|
+
|
|
3619
|
+
/**
|
|
3620
|
+
* Creates the contours lines (featuresCollection of polygon features) from the 2D data grid
|
|
3621
|
+
*
|
|
3622
|
+
* Marchingsquares process the grid data as a 3D representation of a function on a 2D plane, therefore it
|
|
3623
|
+
* assumes the points (x-y coordinates) are one 'unit' distance. The result of the IsoBands function needs to be
|
|
3624
|
+
* rescaled, with turfjs, to the original area and proportions on the map
|
|
3625
|
+
*
|
|
3626
|
+
* @private
|
|
3627
|
+
* @param {Array<Array<number>>} matrix Grid Data
|
|
3628
|
+
* @param {Array<number>} breaks Breaks
|
|
3629
|
+
* @param {string} [property='elevation'] Property
|
|
3630
|
+
* @returns {Array<any>} contours
|
|
3631
|
+
*/
|
|
3632
|
+
function createContourLines(matrix, breaks, property) {
|
|
3633
|
+
var contours = [];
|
|
3634
|
+
for (var i = 1; i < breaks.length; i++) {
|
|
3635
|
+
var lowerBand = +breaks[i - 1]; // make sure the breaks value is a number
|
|
3636
|
+
var upperBand = +breaks[i];
|
|
3637
|
+
|
|
3638
|
+
var isobandsCoords = isoBands(matrix, lowerBand, upperBand - lowerBand);
|
|
3639
|
+
// as per GeoJson rules for creating a Polygon, make sure the first element
|
|
3640
|
+
// in the array of LinearRings represents the exterior ring (i.e. biggest area),
|
|
3641
|
+
// and any subsequent elements represent interior rings (i.e. smaller area);
|
|
3642
|
+
// this avoids rendering issues of the MultiPolygons on the map
|
|
3643
|
+
var nestedRings = orderByArea(isobandsCoords);
|
|
3644
|
+
var groupedRings = groupNestedRings(nestedRings);
|
|
3645
|
+
var obj = {};
|
|
3646
|
+
obj["groupedRings"] = groupedRings;
|
|
3647
|
+
obj[property] = lowerBand + "-" + upperBand;
|
|
3648
|
+
contours.push(obj);
|
|
3649
|
+
}
|
|
3650
|
+
return contours;
|
|
3651
|
+
}
|
|
3652
|
+
|
|
3653
|
+
/**
|
|
3654
|
+
* Transform isobands of 2D grid to polygons for the map
|
|
3655
|
+
*
|
|
3656
|
+
* @private
|
|
3657
|
+
* @param {Array<any>} contours Contours
|
|
3658
|
+
* @param {Array<Array<number>>} matrix Grid Data
|
|
3659
|
+
* @param {Object} points Points by Latitude
|
|
3660
|
+
* @returns {Array<any>} contours
|
|
3661
|
+
*/
|
|
3662
|
+
function rescaleContours(contours, matrix, points) {
|
|
3663
|
+
// get dimensions (on the map) of the original grid
|
|
3664
|
+
var gridBbox = bbox__default['default'](points); // [ minX, minY, maxX, maxY ]
|
|
3665
|
+
var originalWidth = gridBbox[2] - gridBbox[0];
|
|
3666
|
+
var originalHeigth = gridBbox[3] - gridBbox[1];
|
|
3667
|
+
|
|
3668
|
+
// get origin, which is the first point of the last row on the rectangular data on the map
|
|
3669
|
+
var x0 = gridBbox[0];
|
|
3670
|
+
var y0 = gridBbox[1];
|
|
3671
|
+
// get number of cells per side
|
|
3672
|
+
var matrixWidth = matrix[0].length - 1;
|
|
3673
|
+
var matrixHeight = matrix.length - 1;
|
|
3674
|
+
// calculate the scaling factor between matrix and rectangular grid on the map
|
|
3675
|
+
var scaleX = originalWidth / matrixWidth;
|
|
3676
|
+
var scaleY = originalHeigth / matrixHeight;
|
|
3677
|
+
|
|
3678
|
+
var resize = function (point) {
|
|
3679
|
+
point[0] = point[0] * scaleX + x0;
|
|
3680
|
+
point[1] = point[1] * scaleY + y0;
|
|
3681
|
+
};
|
|
3682
|
+
|
|
3683
|
+
// resize and shift each point/line of the isobands
|
|
3684
|
+
contours.forEach(function (contour) {
|
|
3685
|
+
contour.groupedRings.forEach(function (lineRingSet) {
|
|
3686
|
+
lineRingSet.forEach(function (lineRing) {
|
|
3687
|
+
lineRing.forEach(resize);
|
|
3688
|
+
});
|
|
3689
|
+
});
|
|
3690
|
+
});
|
|
3691
|
+
return contours;
|
|
3692
|
+
}
|
|
3693
|
+
|
|
3694
|
+
/* utility functions */
|
|
3695
|
+
|
|
3696
|
+
/**
|
|
3697
|
+
* Returns an array of coordinates (of LinearRings) in descending order by area
|
|
3698
|
+
*
|
|
3699
|
+
* @private
|
|
3700
|
+
* @param {Array<LineString>} ringsCoords array of closed LineString
|
|
3701
|
+
* @returns {Array} array of the input LineString ordered by area
|
|
3702
|
+
*/
|
|
3703
|
+
function orderByArea(ringsCoords) {
|
|
3704
|
+
var ringsWithArea = [];
|
|
3705
|
+
var areas = [];
|
|
3706
|
+
ringsCoords.forEach(function (coords) {
|
|
3707
|
+
// var poly = polygon([points]);
|
|
3708
|
+
var ringArea = area__default['default'](helpers.polygon([coords]));
|
|
3709
|
+
// create an array of areas value
|
|
3710
|
+
areas.push(ringArea);
|
|
3711
|
+
// associate each lineRing with its area
|
|
3712
|
+
ringsWithArea.push({ ring: coords, area: ringArea });
|
|
3713
|
+
});
|
|
3714
|
+
areas.sort(function (a, b) {
|
|
3715
|
+
// bigger --> smaller
|
|
3716
|
+
return b - a;
|
|
3717
|
+
});
|
|
3718
|
+
// create a new array of linearRings coordinates ordered by their area
|
|
3719
|
+
var orderedByArea = [];
|
|
3720
|
+
areas.forEach(function (area) {
|
|
3721
|
+
for (var lr = 0; lr < ringsWithArea.length; lr++) {
|
|
3722
|
+
if (ringsWithArea[lr].area === area) {
|
|
3723
|
+
orderedByArea.push(ringsWithArea[lr].ring);
|
|
3724
|
+
ringsWithArea.splice(lr, 1);
|
|
3725
|
+
break;
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
});
|
|
3729
|
+
return orderedByArea;
|
|
3730
|
+
}
|
|
3731
|
+
|
|
3732
|
+
/**
|
|
3733
|
+
* Returns an array of arrays of coordinates, each representing
|
|
3734
|
+
* a set of (coordinates of) nested LinearRings,
|
|
3735
|
+
* i.e. the first ring contains all the others
|
|
3736
|
+
*
|
|
3737
|
+
* @private
|
|
3738
|
+
* @param {Array} orderedLinearRings array of coordinates (of LinearRings) in descending order by area
|
|
3739
|
+
* @returns {Array<Array>} Array of coordinates of nested LinearRings
|
|
3740
|
+
*/
|
|
3741
|
+
function groupNestedRings(orderedLinearRings) {
|
|
3742
|
+
// create a list of the (coordinates of) LinearRings
|
|
3743
|
+
var lrList = orderedLinearRings.map(function (lr) {
|
|
3744
|
+
return { lrCoordinates: lr, grouped: false };
|
|
3745
|
+
});
|
|
3746
|
+
var groupedLinearRingsCoords = [];
|
|
3747
|
+
while (!allGrouped(lrList)) {
|
|
3748
|
+
for (var i = 0; i < lrList.length; i++) {
|
|
3749
|
+
if (!lrList[i].grouped) {
|
|
3750
|
+
// create new group starting with the larger not already grouped ring
|
|
3751
|
+
var group = [];
|
|
3752
|
+
group.push(lrList[i].lrCoordinates);
|
|
3753
|
+
lrList[i].grouped = true;
|
|
3754
|
+
var outerMostPoly = helpers.polygon([lrList[i].lrCoordinates]);
|
|
3755
|
+
// group all the rings contained by the outermost ring
|
|
3756
|
+
for (var j = i + 1; j < lrList.length; j++) {
|
|
3757
|
+
if (!lrList[j].grouped) {
|
|
3758
|
+
var lrPoly = helpers.polygon([lrList[j].lrCoordinates]);
|
|
3759
|
+
if (isInside(lrPoly, outerMostPoly)) {
|
|
3760
|
+
group.push(lrList[j].lrCoordinates);
|
|
3761
|
+
lrList[j].grouped = true;
|
|
3762
|
+
}
|
|
3763
|
+
}
|
|
3764
|
+
}
|
|
3765
|
+
// insert the new group
|
|
3766
|
+
groupedLinearRingsCoords.push(group);
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
return groupedLinearRingsCoords;
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
/**
|
|
3774
|
+
* @private
|
|
3775
|
+
* @param {Polygon} testPolygon polygon of interest
|
|
3776
|
+
* @param {Polygon} targetPolygon polygon you want to compare with
|
|
3777
|
+
* @returns {boolean} true if test-Polygon is inside target-Polygon
|
|
3778
|
+
*/
|
|
3779
|
+
function isInside(testPolygon, targetPolygon) {
|
|
3780
|
+
var points = explode__default['default'](testPolygon);
|
|
3781
|
+
for (var i = 0; i < points.features.length; i++) {
|
|
3782
|
+
if (!booleanPointInPolygon__default['default'](points.features[i], targetPolygon)) {
|
|
3783
|
+
return false;
|
|
3784
|
+
}
|
|
3785
|
+
}
|
|
3786
|
+
return true;
|
|
3787
|
+
}
|
|
3788
|
+
|
|
3789
|
+
/**
|
|
3790
|
+
* @private
|
|
3791
|
+
* @param {Array<Object>} list list of objects which might contain the 'group' attribute
|
|
3792
|
+
* @returns {boolean} true if all the objects in the list are marked as grouped
|
|
3793
|
+
*/
|
|
3794
|
+
function allGrouped(list) {
|
|
3795
|
+
for (var i = 0; i < list.length; i++) {
|
|
3796
|
+
if (list[i].grouped === false) {
|
|
3797
|
+
return false;
|
|
3798
|
+
}
|
|
3799
|
+
}
|
|
3800
|
+
return true;
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3803
|
+
module.exports = isobands;
|
|
3804
|
+
module.exports.default = isobands;
|