diff --git a/package-lock.json b/package-lock.json index 17ee5e34d..5b178d200 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,8 +6,12 @@ "": { "license": "GPL-3.0-only", "dependencies": { - "@biigle/ol": "^5.3.0", + "@biigle/ol": "^9.2.4", "@fortawesome/fontawesome-free": "^5.2.0", + "@turf/boolean-contains": "^6.5.0", + "@turf/difference": "^6.5.0", + "@turf/helpers": "^6.5.0", + "@turf/union": "^6.5.0", "bootstrap-sass": "^3.3.7", "echarts": "^5.3.2", "jsts": "^2.11.0", @@ -2098,19 +2102,17 @@ } }, "node_modules/@biigle/ol": { - "version": "5.3.4", - "resolved": "https://npm.pkg.github.com/download/@biigle/ol/5.3.4/dfd8c69f0b9e233c0505336d1b98b235a8d428f4", - "integrity": "sha512-WEPbCRlfb3vhXmjY/LFB1K3PdadZnj5s1TkSZRaO9sKU5Uw3FaIi+ElWUgJRvIAGAo8zExELGvaRmtSJ4M2Xdg==", + "version": "9.2.4", + "resolved": "https://npm.pkg.github.com/download/@biigle/ol/9.2.4/1c025faf01d9f35d5cc036d4c6bc48538a3ba7d1", + "integrity": "sha512-scfuI2HDw6p666koJv7vGSzihCWZY+Ld6zGsLKTBddMufIeKE6XbUrQXxLWmPWiNYUQ11OJoVUo3NIXsQnxo0w==", "license": "BSD-2-Clause", "dependencies": { - "@turf/boolean-contains": "^6.0.1", - "@turf/boolean-overlap": "^6.0.1", - "@turf/difference": "6.0.1", - "@turf/helpers": "^6.1.4", - "@turf/union": "^6.0.3", - "pbf": "3.1.0", - "pixelworks": "1.1.0", - "rbush": "2.0.2" + "color-rgba": "^3.0.0", + "color-space": "^2.0.1", + "earcut": "^2.2.3", + "geotiff": "^2.0.7", + "pbf": "3.2.1", + "rbush": "^3.0.1" } }, "node_modules/@discoveryjs/json-ext": { @@ -2270,6 +2272,11 @@ "node": ">= 8" } }, + "node_modules/@petamoriken/float16": { + "version": "3.8.7", + "resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.7.tgz", + "integrity": "sha512-/Ri4xDDpe12NT6Ex/DRgHzLlobiQXEW/hmG08w1wj/YU7hLemk97c+zHQFp0iZQ9r7YqgLEXZR2sls4HxBf9NA==" + }, "node_modules/@sindresorhus/is": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.4.0.tgz", @@ -2301,18 +2308,6 @@ "node": ">=10.13.0" } }, - "node_modules/@turf/area": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/area/-/area-6.5.0.tgz", - "integrity": "sha512-xCZdiuojokLbQ+29qR6qoMD89hv+JAgWjLrwSEWL+3JV8IXKeNFl6XkEJz9HGkVpnXvQKJoRz4/liT+8ZZ5Jyg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, "node_modules/@turf/bbox": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-6.5.0.tgz", @@ -2325,18 +2320,6 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/bearing": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-6.5.0.tgz", - "integrity": "sha512-dxINYhIEMzgDOztyMZc20I7ssYVNEpSv04VbMo5YPQsqa80KO3TFvbuCahMsCAW5z8Tncc8dwBlEFrmRjJG33A==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, "node_modules/@turf/boolean-contains": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-6.5.0.tgz", @@ -2352,22 +2335,6 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/boolean-overlap": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-overlap/-/boolean-overlap-6.5.0.tgz", - "integrity": "sha512-8btMIdnbXVWUa1M7D4shyaSGxLRw6NjMcqKBcsTXcZdnaixl22k7ar7BvIzkaRYN3SFECk9VGXfLncNS3ckQUw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/line-overlap": "^6.5.0", - "@turf/meta": "^6.5.0", - "geojson-equality": "0.1.6" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, "node_modules/@turf/boolean-point-in-polygon": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-6.5.0.tgz", @@ -2392,37 +2359,14 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/destination": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-6.5.0.tgz", - "integrity": "sha512-4cnWQlNC8d1tItOz9B4pmJdWpXqS0vEvv65bI/Pj/genJnsL7evI0/Xw42RvEGROS481MPiU80xzvwxEvhQiMQ==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, "node_modules/@turf/difference": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-6.0.1.tgz", - "integrity": "sha512-lkhJjNfPeLARQm232A851vVhrUvX3gdvTft5QlqkUlr7AzLpiT8PW14yEkU9xABxRh6PGv7T1UUVAeRgC7JxuA==", - "dependencies": { - "@turf/area": "6.x", - "@turf/helpers": "6.x", - "@turf/invariant": "6.x", - "@turf/meta": "6.x", - "martinez-polygon-clipping": "*" - } - }, - "node_modules/@turf/distance": { "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-6.5.0.tgz", - "integrity": "sha512-xzykSLfoURec5qvQJcfifw/1mJa+5UwByZZ5TZ8iaqjGYN0vomhV9aiSLeYdUGtYRESZ+DYC/OzY+4RclZYgMg==", + "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-6.5.0.tgz", + "integrity": "sha512-l8iR5uJqvI+5Fs6leNbhPY5t/a3vipUF/3AeVLpwPQcgmedNXyheYuy07PcMGH5Jdpi5gItOiTqwiU/bUH4b3A==", "dependencies": { "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" + "@turf/invariant": "^6.5.0", + "polygon-clipping": "^0.15.3" }, "funding": { "url": "https://opencollective.com/turf" @@ -2447,52 +2391,6 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/line-intersect": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-6.5.0.tgz", - "integrity": "sha512-CS6R1tZvVQD390G9Ea4pmpM6mJGPWoL82jD46y0q1KSor9s6HupMIo1kY4Ny+AEYQl9jd21V3Scz20eldpbTVA==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/meta": "^6.5.0", - "geojson-rbush": "3.x" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-overlap": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-6.5.0.tgz", - "integrity": "sha512-xHOaWLd0hkaC/1OLcStCpfq55lPHpPNadZySDXYiYjEz5HXr1oKmtMYpn0wGizsLwrOixRdEp+j7bL8dPt4ojQ==", - "dependencies": { - "@turf/boolean-point-on-line": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/nearest-point-on-line": "^6.5.0", - "deep-equal": "1.x", - "geojson-rbush": "3.x" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-segment": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-6.5.0.tgz", - "integrity": "sha512-jI625Ho4jSuJESNq66Mmi290ZJ5pPZiQZruPVpmHkUw257Pew0alMmb6YrqYNnLUuiVVONxAAKXUVeeUGtycfw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, "node_modules/@turf/meta": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-6.5.0.tgz", @@ -2504,23 +2402,6 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/nearest-point-on-line": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-6.5.0.tgz", - "integrity": "sha512-WthrvddddvmymnC+Vf7BrkHGbDOUu6Z3/6bFYUGv1kxw8tiZ6n83/VG6kHz4poHOfS0RaNflzXSkmCi64fLBlg==", - "dependencies": { - "@turf/bearing": "^6.5.0", - "@turf/destination": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, "node_modules/@turf/union": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/union/-/union-6.5.0.tgz", @@ -2692,11 +2573,6 @@ "@types/range-parser": "*" } }, - "node_modules/@types/geojson": { - "version": "7946.0.8", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.8.tgz", - "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" - }, "node_modules/@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -3891,6 +3767,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -4120,6 +3997,36 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/color-parse": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/color-parse/-/color-parse-2.0.2.tgz", + "integrity": "sha512-eCtOz5w5ttWIUcaKLiktF+DxZO1R9KLNY/xhbV6CkhM7sR3GhVghmt6X6yOnzeaM24po+Z9/S1apbXMwA3Iepw==", + "dependencies": { + "color-name": "^2.0.0" + } + }, + "node_modules/color-parse/node_modules/color-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.0.0.tgz", + "integrity": "sha512-SbtvAMWvASO5TE2QP07jHBMXKafgdZz8Vrsrn96fiL+O92/FN/PLARzUW5sKt013fjAprK2d2iCn2hk2Xb5oow==", + "engines": { + "node": ">=12.20" + } + }, + "node_modules/color-rgba": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color-rgba/-/color-rgba-3.0.0.tgz", + "integrity": "sha512-PPwZYkEY3M2THEHHV6Y95sGUie77S7X8v+h1r6LSAPF3/LL2xJ8duUXSrkic31Nzc4odPwHgUbiX/XuTYzQHQg==", + "dependencies": { + "color-parse": "^2.0.0", + "color-space": "^2.0.0" + } + }, + "node_modules/color-space": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-space/-/color-space-2.0.1.tgz", + "integrity": "sha512-nKqUYlo0vZATVOFHY810BSYjmCARrG7e5R3UE3CQlyjJTvv5kSSmPG1kzm/oDyyqjehM+lW1RnEt9It9GNa5JA==" + }, "node_modules/colord": { "version": "2.9.2", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz", @@ -4711,22 +4618,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dependencies": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -4757,6 +4648,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -4778,17 +4670,6 @@ "node": ">=8" } }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -4997,6 +4878,11 @@ "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", "dev": true }, + "node_modules/earcut": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" + }, "node_modules/echarts": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.2.tgz", @@ -5135,6 +5021,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -5146,6 +5033,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -5911,6 +5799,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5930,37 +5819,38 @@ "node": ">=6.9.0" } }, - "node_modules/geojson-equality": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/geojson-equality/-/geojson-equality-0.1.6.tgz", - "integrity": "sha1-oXE3TvBD5dR5eZWEC65GSOB1LXI=", - "dependencies": { - "deep-equal": "^1.0.0" - } - }, - "node_modules/geojson-rbush": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-3.2.0.tgz", - "integrity": "sha512-oVltQTXolxvsz1sZnutlSuLDEcQAKYC/uXt9zDzJJ6bu0W+baTI8LZBaTup5afzibEH4N3jlq2p+a152wlBJ7w==", + "node_modules/geotiff": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/geotiff/-/geotiff-2.1.3.tgz", + "integrity": "sha512-PT6uoF5a1+kbC3tHmZSUsLHBp2QJlHasxxxxPW47QIY1VBKpFB+FcDvX+MxER6UzgLQZ0xDzJ9s48B9JbOCTqA==", "dependencies": { - "@turf/bbox": "*", - "@turf/helpers": "6.x", - "@turf/meta": "6.x", - "@types/geojson": "7946.0.8", - "rbush": "^3.0.1" + "@petamoriken/float16": "^3.4.7", + "lerc": "^3.0.0", + "pako": "^2.0.4", + "parse-headers": "^2.0.2", + "quick-lru": "^6.1.1", + "web-worker": "^1.2.0", + "xml-utils": "^1.0.2", + "zstddec": "^0.1.0" + }, + "engines": { + "node": ">=10.19" } }, - "node_modules/geojson-rbush/node_modules/quickselect": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", - "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" + "node_modules/geotiff/node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" }, - "node_modules/geojson-rbush/node_modules/rbush": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", - "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", - "dependencies": { - "quickselect": "^2.0.0" + "node_modules/geotiff/node_modules/quick-lru": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.2.tgz", + "integrity": "sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/get-caller-file": { @@ -5976,6 +5866,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -6089,6 +5980,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -6163,6 +6055,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -6174,6 +6067,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -6185,20 +6079,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dependencies": { - "has-symbols": "^1.0.2" - }, + "dev": true, "engines": { "node": ">= 0.4" }, @@ -6274,6 +6155,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -6715,21 +6597,6 @@ "node": ">= 10" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -6766,20 +6633,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-docker": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", @@ -6858,21 +6711,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -7258,6 +7096,11 @@ "shell-quote": "^1.8.1" } }, + "node_modules/lerc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lerc/-/lerc-3.0.0.tgz", + "integrity": "sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww==" + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -7427,16 +7270,6 @@ "semver": "bin/semver.js" } }, - "node_modules/martinez-polygon-clipping": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/martinez-polygon-clipping/-/martinez-polygon-clipping-0.7.1.tgz", - "integrity": "sha512-Xt5hOjAVkRoGN7kUb/0VmkxcG07Ja+OA3qU+7YcY2pAlJ78V1G181VTozHCXpzlj0paNBbcLno77mcGeGStI0A==", - "dependencies": { - "robust-predicates": "^2.0.4", - "splaytree": "^0.1.4", - "tinyqueue": "^1.2.0" - } - }, "node_modules/md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -7898,29 +7731,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/obuf": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", @@ -8121,6 +7931,11 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/parse-headers": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz", + "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==" + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -8213,12 +8028,12 @@ } }, "node_modules/pbf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.1.0.tgz", - "integrity": "sha512-/hYJmIsTmh7fMkHAWWXJ5b8IKLWdjdlAFb3IHkRBn1XUhIYBChVGfVwmHEAV3UfXTxsP/AKfYTXTS/dCPxJd5w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", + "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", "dependencies": { - "ieee754": "^1.1.6", - "resolve-protobuf-schema": "^2.0.0" + "ieee754": "^1.1.12", + "resolve-protobuf-schema": "^2.1.0" }, "bin": { "pbf": "bin/pbf" @@ -8258,11 +8073,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pixelworks": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pixelworks/-/pixelworks-1.1.0.tgz", - "integrity": "sha1-Hwla1I3Ki/ihyCWOAJIDGkTyLKU=" - }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -8276,17 +8086,23 @@ } }, "node_modules/polygon-clipping": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/polygon-clipping/-/polygon-clipping-0.15.3.tgz", - "integrity": "sha512-ho0Xx5DLkgxRx/+n4O74XyJ67DcyN3Tu9bGYKsnTukGAW6ssnuak6Mwcyb1wHy9MZc9xsUWqIoiazkZB5weECg==", + "version": "0.15.7", + "resolved": "https://registry.npmjs.org/polygon-clipping/-/polygon-clipping-0.15.7.tgz", + "integrity": "sha512-nhfdr83ECBg6xtqOAJab1tbksbBAOMUltN60bU+llHVOL0e5Onm1WpAXXWXVB39L8AJFssoIhEVuy/S90MmotA==", "dependencies": { + "robust-predicates": "^3.0.2", "splaytree": "^3.1.0" } }, + "node_modules/polygon-clipping/node_modules/robust-predicates": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", + "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" + }, "node_modules/polygon-clipping/node_modules/splaytree": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.0.tgz", - "integrity": "sha512-gvUGR7xnOy0fLKTCxDeUZYgU/I1Tdf8M/lM1Qrf8L2TIOR5ipZjGk02uYcdv0o2x7WjVRgpm3iS2clLyuVAt0Q==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.2.tgz", + "integrity": "sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==" }, "node_modules/polymorph-js": { "version": "0.2.4", @@ -9063,9 +8879,9 @@ } }, "node_modules/quickselect": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-1.1.1.tgz", - "integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", + "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" }, "node_modules/randombytes": { "version": "2.1.0", @@ -9120,11 +8936,11 @@ } }, "node_modules/rbush": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/rbush/-/rbush-2.0.2.tgz", - "integrity": "sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", + "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", "dependencies": { - "quickselect": "^1.0.1" + "quickselect": "^2.0.0" } }, "node_modules/readable-stream": { @@ -9214,21 +9030,6 @@ "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==", "dev": true }, - "node_modules/regexp.prototype.flags": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", - "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -9477,11 +9278,6 @@ "inherits": "^2.0.1" } }, - "node_modules/robust-predicates": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-2.0.4.tgz", - "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==" - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -9781,6 +9577,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -10005,11 +9802,6 @@ "node": ">= 6" } }, - "node_modules/splaytree": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-0.1.4.tgz", - "integrity": "sha512-D50hKrjZgBzqD3FT2Ek53f2dcDLAQT8SSGrzj3vidNH5ISRgceeGVJ2dQIthKOuayqFXfFjXheHNo4bbt9LhRQ==" - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -10455,11 +10247,6 @@ "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "dev": true }, - "node_modules/tinyqueue": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-1.2.3.tgz", - "integrity": "sha512-Qz9RgWuO9l8lT+Y9xvbzhPT2efIUIFd69N7eF7tJ9lnQl0iLj1M7peK7IoUGZL9DJHw9XftqLreccfxcQgYLxA==" - }, "node_modules/to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -10497,9 +10284,9 @@ } }, "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true }, "node_modules/tty-browserify": { @@ -10947,6 +10734,11 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/web-worker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.3.0.tgz", + "integrity": "sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==" + }, "node_modules/webpack": { "version": "5.76.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz", @@ -11428,6 +11220,11 @@ } } }, + "node_modules/xml-utils": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/xml-utils/-/xml-utils-1.10.1.tgz", + "integrity": "sha512-Dn6vJ1Z9v1tepSjvnCpwk5QqwIPcEFKdgnjqfYOABv1ngSofuAhtlugcUC3ehS1OHdgDWSG6C5mvj+Qm15udTQ==" + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -11500,6 +11297,11 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, + "node_modules/zstddec": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/zstddec/-/zstddec-0.1.0.tgz", + "integrity": "sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg==" } }, "dependencies": { @@ -12983,18 +12785,16 @@ } }, "@biigle/ol": { - "version": "5.3.4", - "resolved": "https://npm.pkg.github.com/download/@biigle/ol/5.3.4/dfd8c69f0b9e233c0505336d1b98b235a8d428f4", - "integrity": "sha512-WEPbCRlfb3vhXmjY/LFB1K3PdadZnj5s1TkSZRaO9sKU5Uw3FaIi+ElWUgJRvIAGAo8zExELGvaRmtSJ4M2Xdg==", - "requires": { - "@turf/boolean-contains": "^6.0.1", - "@turf/boolean-overlap": "^6.0.1", - "@turf/difference": "6.0.1", - "@turf/helpers": "^6.1.4", - "@turf/union": "^6.0.3", - "pbf": "3.1.0", - "pixelworks": "1.1.0", - "rbush": "2.0.2" + "version": "9.2.4", + "resolved": "https://npm.pkg.github.com/download/@biigle/ol/9.2.4/1c025faf01d9f35d5cc036d4c6bc48538a3ba7d1", + "integrity": "sha512-scfuI2HDw6p666koJv7vGSzihCWZY+Ld6zGsLKTBddMufIeKE6XbUrQXxLWmPWiNYUQ11OJoVUo3NIXsQnxo0w==", + "requires": { + "color-rgba": "^3.0.0", + "color-space": "^2.0.1", + "earcut": "^2.2.3", + "geotiff": "^2.0.7", + "pbf": "3.2.1", + "rbush": "^3.0.1" } }, "@discoveryjs/json-ext": { @@ -13123,6 +12923,11 @@ "fastq": "^1.6.0" } }, + "@petamoriken/float16": { + "version": "3.8.7", + "resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.7.tgz", + "integrity": "sha512-/Ri4xDDpe12NT6Ex/DRgHzLlobiQXEW/hmG08w1wj/YU7hLemk97c+zHQFp0iZQ9r7YqgLEXZR2sls4HxBf9NA==" + }, "@sindresorhus/is": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.4.0.tgz", @@ -13142,15 +12947,6 @@ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", "dev": true }, - "@turf/area": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/area/-/area-6.5.0.tgz", - "integrity": "sha512-xCZdiuojokLbQ+29qR6qoMD89hv+JAgWjLrwSEWL+3JV8IXKeNFl6XkEJz9HGkVpnXvQKJoRz4/liT+8ZZ5Jyg==", - "requires": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - } - }, "@turf/bbox": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-6.5.0.tgz", @@ -13160,15 +12956,6 @@ "@turf/meta": "^6.5.0" } }, - "@turf/bearing": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-6.5.0.tgz", - "integrity": "sha512-dxINYhIEMzgDOztyMZc20I7ssYVNEpSv04VbMo5YPQsqa80KO3TFvbuCahMsCAW5z8Tncc8dwBlEFrmRjJG33A==", - "requires": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - } - }, "@turf/boolean-contains": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-6.5.0.tgz", @@ -13181,19 +12968,6 @@ "@turf/invariant": "^6.5.0" } }, - "@turf/boolean-overlap": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-overlap/-/boolean-overlap-6.5.0.tgz", - "integrity": "sha512-8btMIdnbXVWUa1M7D4shyaSGxLRw6NjMcqKBcsTXcZdnaixl22k7ar7BvIzkaRYN3SFECk9VGXfLncNS3ckQUw==", - "requires": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/line-overlap": "^6.5.0", - "@turf/meta": "^6.5.0", - "geojson-equality": "0.1.6" - } - }, "@turf/boolean-point-in-polygon": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-6.5.0.tgz", @@ -13212,34 +12986,14 @@ "@turf/invariant": "^6.5.0" } }, - "@turf/destination": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-6.5.0.tgz", - "integrity": "sha512-4cnWQlNC8d1tItOz9B4pmJdWpXqS0vEvv65bI/Pj/genJnsL7evI0/Xw42RvEGROS481MPiU80xzvwxEvhQiMQ==", - "requires": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - } - }, "@turf/difference": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-6.0.1.tgz", - "integrity": "sha512-lkhJjNfPeLARQm232A851vVhrUvX3gdvTft5QlqkUlr7AzLpiT8PW14yEkU9xABxRh6PGv7T1UUVAeRgC7JxuA==", - "requires": { - "@turf/area": "6.x", - "@turf/helpers": "6.x", - "@turf/invariant": "6.x", - "@turf/meta": "6.x", - "martinez-polygon-clipping": "*" - } - }, - "@turf/distance": { "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-6.5.0.tgz", - "integrity": "sha512-xzykSLfoURec5qvQJcfifw/1mJa+5UwByZZ5TZ8iaqjGYN0vomhV9aiSLeYdUGtYRESZ+DYC/OzY+4RclZYgMg==", + "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-6.5.0.tgz", + "integrity": "sha512-l8iR5uJqvI+5Fs6leNbhPY5t/a3vipUF/3AeVLpwPQcgmedNXyheYuy07PcMGH5Jdpi5gItOiTqwiU/bUH4b3A==", "requires": { "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" + "@turf/invariant": "^6.5.0", + "polygon-clipping": "^0.15.3" } }, "@turf/helpers": { @@ -13255,43 +13009,6 @@ "@turf/helpers": "^6.5.0" } }, - "@turf/line-intersect": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-6.5.0.tgz", - "integrity": "sha512-CS6R1tZvVQD390G9Ea4pmpM6mJGPWoL82jD46y0q1KSor9s6HupMIo1kY4Ny+AEYQl9jd21V3Scz20eldpbTVA==", - "requires": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/meta": "^6.5.0", - "geojson-rbush": "3.x" - } - }, - "@turf/line-overlap": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-6.5.0.tgz", - "integrity": "sha512-xHOaWLd0hkaC/1OLcStCpfq55lPHpPNadZySDXYiYjEz5HXr1oKmtMYpn0wGizsLwrOixRdEp+j7bL8dPt4ojQ==", - "requires": { - "@turf/boolean-point-on-line": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/nearest-point-on-line": "^6.5.0", - "deep-equal": "1.x", - "geojson-rbush": "3.x" - } - }, - "@turf/line-segment": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-6.5.0.tgz", - "integrity": "sha512-jI625Ho4jSuJESNq66Mmi290ZJ5pPZiQZruPVpmHkUw257Pew0alMmb6YrqYNnLUuiVVONxAAKXUVeeUGtycfw==", - "requires": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0" - } - }, "@turf/meta": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-6.5.0.tgz", @@ -13300,20 +13017,6 @@ "@turf/helpers": "^6.5.0" } }, - "@turf/nearest-point-on-line": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-6.5.0.tgz", - "integrity": "sha512-WthrvddddvmymnC+Vf7BrkHGbDOUu6Z3/6bFYUGv1kxw8tiZ6n83/VG6kHz4poHOfS0RaNflzXSkmCi64fLBlg==", - "requires": { - "@turf/bearing": "^6.5.0", - "@turf/destination": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/meta": "^6.5.0" - } - }, "@turf/union": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/union/-/union-6.5.0.tgz", @@ -13481,11 +13184,6 @@ "@types/range-parser": "*" } }, - "@types/geojson": { - "version": "7946.0.8", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.8.tgz", - "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" - }, "@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -14492,6 +14190,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, "requires": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -14660,6 +14359,35 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "color-parse": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/color-parse/-/color-parse-2.0.2.tgz", + "integrity": "sha512-eCtOz5w5ttWIUcaKLiktF+DxZO1R9KLNY/xhbV6CkhM7sR3GhVghmt6X6yOnzeaM24po+Z9/S1apbXMwA3Iepw==", + "requires": { + "color-name": "^2.0.0" + }, + "dependencies": { + "color-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.0.0.tgz", + "integrity": "sha512-SbtvAMWvASO5TE2QP07jHBMXKafgdZz8Vrsrn96fiL+O92/FN/PLARzUW5sKt013fjAprK2d2iCn2hk2Xb5oow==" + } + } + }, + "color-rgba": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color-rgba/-/color-rgba-3.0.0.tgz", + "integrity": "sha512-PPwZYkEY3M2THEHHV6Y95sGUie77S7X8v+h1r6LSAPF3/LL2xJ8duUXSrkic31Nzc4odPwHgUbiX/XuTYzQHQg==", + "requires": { + "color-parse": "^2.0.0", + "color-space": "^2.0.0" + } + }, + "color-space": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-space/-/color-space-2.0.1.tgz", + "integrity": "sha512-nKqUYlo0vZATVOFHY810BSYjmCARrG7e5R3UE3CQlyjJTvv5kSSmPG1kzm/oDyyqjehM+lW1RnEt9It9GNa5JA==" + }, "colord": { "version": "2.9.2", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz", @@ -15115,19 +14843,6 @@ } } }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -15152,6 +14867,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, "requires": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -15164,14 +14880,6 @@ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", "dev": true }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - } - }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -15333,6 +15041,11 @@ "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", "dev": true }, + "earcut": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" + }, "echarts": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.2.tgz", @@ -15454,6 +15167,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, "requires": { "get-intrinsic": "^1.2.4" } @@ -15461,7 +15175,8 @@ "es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true }, "es-module-lexer": { "version": "0.9.3", @@ -16037,7 +15752,8 @@ "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true }, "functional-red-black-tree": { "version": "1.0.1", @@ -16051,38 +15767,30 @@ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, - "geojson-equality": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/geojson-equality/-/geojson-equality-0.1.6.tgz", - "integrity": "sha1-oXE3TvBD5dR5eZWEC65GSOB1LXI=", - "requires": { - "deep-equal": "^1.0.0" - } - }, - "geojson-rbush": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-3.2.0.tgz", - "integrity": "sha512-oVltQTXolxvsz1sZnutlSuLDEcQAKYC/uXt9zDzJJ6bu0W+baTI8LZBaTup5afzibEH4N3jlq2p+a152wlBJ7w==", - "requires": { - "@turf/bbox": "*", - "@turf/helpers": "6.x", - "@turf/meta": "6.x", - "@types/geojson": "7946.0.8", - "rbush": "^3.0.1" - }, - "dependencies": { - "quickselect": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", - "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" + "geotiff": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/geotiff/-/geotiff-2.1.3.tgz", + "integrity": "sha512-PT6uoF5a1+kbC3tHmZSUsLHBp2QJlHasxxxxPW47QIY1VBKpFB+FcDvX+MxER6UzgLQZ0xDzJ9s48B9JbOCTqA==", + "requires": { + "@petamoriken/float16": "^3.4.7", + "lerc": "^3.0.0", + "pako": "^2.0.4", + "parse-headers": "^2.0.2", + "quick-lru": "^6.1.1", + "web-worker": "^1.2.0", + "xml-utils": "^1.0.2", + "zstddec": "^0.1.0" + }, + "dependencies": { + "pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" }, - "rbush": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", - "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", - "requires": { - "quickselect": "^2.0.0" - } + "quick-lru": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.2.tgz", + "integrity": "sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==" } } }, @@ -16096,6 +15804,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, "requires": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -16178,6 +15887,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, "requires": { "get-intrinsic": "^1.1.3" } @@ -16237,6 +15947,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, "requires": { "es-define-property": "^1.0.0" } @@ -16244,20 +15955,14 @@ "has-proto": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==" + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "requires": { - "has-symbols": "^1.0.2" - } + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true }, "hash-base": { "version": "3.1.0", @@ -16309,6 +16014,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, "requires": { "function-bind": "^1.1.2" } @@ -16628,15 +16334,6 @@ "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==", "dev": true }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -16667,14 +16364,6 @@ "has": "^1.0.3" } }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "requires": { - "has-tostringtag": "^1.0.0" - } - }, "is-docker": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", @@ -16723,15 +16412,6 @@ "isobject": "^3.0.1" } }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -17021,6 +16701,11 @@ "shell-quote": "^1.8.1" } }, + "lerc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lerc/-/lerc-3.0.0.tgz", + "integrity": "sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww==" + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -17161,16 +16846,6 @@ } } }, - "martinez-polygon-clipping": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/martinez-polygon-clipping/-/martinez-polygon-clipping-0.7.1.tgz", - "integrity": "sha512-Xt5hOjAVkRoGN7kUb/0VmkxcG07Ja+OA3qU+7YcY2pAlJ78V1G181VTozHCXpzlj0paNBbcLno77mcGeGStI0A==", - "requires": { - "robust-predicates": "^2.0.4", - "splaytree": "^0.1.4", - "tinyqueue": "^1.2.0" - } - }, "md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -17531,20 +17206,6 @@ "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true }, - "object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, "obuf": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", @@ -17697,6 +17358,11 @@ "safe-buffer": "^5.1.1" } }, + "parse-headers": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz", + "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==" + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -17768,12 +17434,12 @@ "dev": true }, "pbf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.1.0.tgz", - "integrity": "sha512-/hYJmIsTmh7fMkHAWWXJ5b8IKLWdjdlAFb3IHkRBn1XUhIYBChVGfVwmHEAV3UfXTxsP/AKfYTXTS/dCPxJd5w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", + "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", "requires": { - "ieee754": "^1.1.6", - "resolve-protobuf-schema": "^2.0.0" + "ieee754": "^1.1.12", + "resolve-protobuf-schema": "^2.1.0" } }, "pbkdf2": { @@ -17801,11 +17467,6 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, - "pixelworks": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pixelworks/-/pixelworks-1.1.0.tgz", - "integrity": "sha1-Hwla1I3Ki/ihyCWOAJIDGkTyLKU=" - }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -17816,17 +17477,23 @@ } }, "polygon-clipping": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/polygon-clipping/-/polygon-clipping-0.15.3.tgz", - "integrity": "sha512-ho0Xx5DLkgxRx/+n4O74XyJ67DcyN3Tu9bGYKsnTukGAW6ssnuak6Mwcyb1wHy9MZc9xsUWqIoiazkZB5weECg==", + "version": "0.15.7", + "resolved": "https://registry.npmjs.org/polygon-clipping/-/polygon-clipping-0.15.7.tgz", + "integrity": "sha512-nhfdr83ECBg6xtqOAJab1tbksbBAOMUltN60bU+llHVOL0e5Onm1WpAXXWXVB39L8AJFssoIhEVuy/S90MmotA==", "requires": { + "robust-predicates": "^3.0.2", "splaytree": "^3.1.0" }, "dependencies": { + "robust-predicates": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", + "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" + }, "splaytree": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.0.tgz", - "integrity": "sha512-gvUGR7xnOy0fLKTCxDeUZYgU/I1Tdf8M/lM1Qrf8L2TIOR5ipZjGk02uYcdv0o2x7WjVRgpm3iS2clLyuVAt0Q==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.2.tgz", + "integrity": "sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==" } } }, @@ -18329,9 +17996,9 @@ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" }, "quickselect": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-1.1.1.tgz", - "integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", + "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" }, "randombytes": { "version": "2.1.0", @@ -18379,11 +18046,11 @@ } }, "rbush": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/rbush/-/rbush-2.0.2.tgz", - "integrity": "sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", + "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", "requires": { - "quickselect": "^1.0.1" + "quickselect": "^2.0.0" } }, "readable-stream": { @@ -18466,15 +18133,6 @@ "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==", "dev": true }, - "regexp.prototype.flags": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", - "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -18665,11 +18323,6 @@ "inherits": "^2.0.1" } }, - "robust-predicates": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-2.0.4.tgz", - "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==" - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -18896,6 +18549,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, "requires": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -19079,11 +18733,6 @@ } } }, - "splaytree": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-0.1.4.tgz", - "integrity": "sha512-D50hKrjZgBzqD3FT2Ek53f2dcDLAQT8SSGrzj3vidNH5ISRgceeGVJ2dQIthKOuayqFXfFjXheHNo4bbt9LhRQ==" - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -19401,11 +19050,6 @@ "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "dev": true }, - "tinyqueue": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-1.2.3.tgz", - "integrity": "sha512-Qz9RgWuO9l8lT+Y9xvbzhPT2efIUIFd69N7eF7tJ9lnQl0iLj1M7peK7IoUGZL9DJHw9XftqLreccfxcQgYLxA==" - }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -19434,9 +19078,9 @@ "dev": true }, "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true }, "tty-browserify": { @@ -19760,6 +19404,11 @@ "minimalistic-assert": "^1.0.0" } }, + "web-worker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.3.0.tgz", + "integrity": "sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==" + }, "webpack": { "version": "5.76.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz", @@ -20082,6 +19731,11 @@ "dev": true, "requires": {} }, + "xml-utils": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/xml-utils/-/xml-utils-1.10.1.tgz", + "integrity": "sha512-Dn6vJ1Z9v1tepSjvnCpwk5QqwIPcEFKdgnjqfYOABv1ngSofuAhtlugcUC3ehS1OHdgDWSG6C5mvj+Qm15udTQ==" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -20141,6 +19795,11 @@ "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" } } + }, + "zstddec": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/zstddec/-/zstddec-0.1.0.tgz", + "integrity": "sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg==" } } } diff --git a/package.json b/package.json index c9dfe61c3..88408ea23 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,12 @@ "vue-template-compiler": "^2.6.11" }, "dependencies": { - "@biigle/ol": "^5.3.0", + "@biigle/ol": "^9.2.4", "@fortawesome/fontawesome-free": "^5.2.0", + "@turf/boolean-contains": "^6.5.0", + "@turf/difference": "^6.5.0", + "@turf/helpers": "^6.5.0", + "@turf/union": "^6.5.0", "bootstrap-sass": "^3.3.7", "echarts": "^5.3.2", "jsts": "^2.11.0", diff --git a/resources/assets/js/annotations/annotatorContainer.vue b/resources/assets/js/annotations/annotatorContainer.vue index 84f295869..a19df869b 100644 --- a/resources/assets/js/annotations/annotatorContainer.vue +++ b/resources/assets/js/annotations/annotatorContainer.vue @@ -501,10 +501,9 @@ export default { }, 10000); }, updateColorAdjustment(params) { - let canvas = this.$refs.canvas; - debounce(function () { + debounce(() => { ImagesStore.updateColorAdjustment(params); - canvas.render(); + this.$refs.canvas.fireImageSourceChanged(); }, 100, 'annotations.color-adjustment.update'); }, handleSettingsChange(key, value) { diff --git a/resources/assets/js/annotations/components/annotationCanvas.vue b/resources/assets/js/annotations/components/annotationCanvas.vue index f0854373c..4484b7d98 100644 --- a/resources/assets/js/annotations/components/annotationCanvas.vue +++ b/resources/assets/js/annotations/components/annotationCanvas.vue @@ -2,7 +2,7 @@ import * as PolygonValidator from '../ol/PolygonValidator'; import AnnotationTooltip from './annotationCanvas/annotationTooltip'; import AttachLabelInteraction from './annotationCanvas/attachLabelInteraction'; -import CanvasSource from '@biigle/ol/source/Canvas'; +import CanvasSource from '../ol/source/Canvas'; import Circle from '@biigle/ol/geom/Circle'; import Collection from '@biigle/ol/Collection'; import ControlButton from './controlButton'; @@ -48,7 +48,6 @@ import {shiftKeyOnly as shiftKeyOnlyCondition} from '@biigle/ol/events/condition import {singleClick as singleClickCondition} from '@biigle/ol/events/condition'; import { isInvalidShape } from '../utils'; - /** * The annotator canvas * @@ -328,8 +327,6 @@ export default { center: view.getCenter(), resolution: view.getResolution(), }); - - }, invertPointsYAxis(points) { // Expects a points array like [x1, y1, x2, y2]. Inverts the y axis of @@ -520,7 +517,7 @@ export default { this.annotationSource.removeFeature(e.feature); return; } - + if (isInvalidShape(e.feature)) { // This must be done in the change event handler. // Not exactly sure why. @@ -586,10 +583,10 @@ export default { this.resetInteractionMode(); } }, - render() { - if (this.map) { - this.map.render(); - this.$emit('render'); + fireImageSourceChanged() { + const source = this.imageLayer?.getSource(); + if (source) { + source.changed(); } }, handleRegularImage(image) { @@ -710,12 +707,34 @@ export default { this.resetHoveredAnnotations(); }, selectedAnnotations(annotations) { - let source = this.annotationSource; + // This allows selection of annotations outside OpenLayers and forwards + // the state to the SelectInteraction. let features = this.selectedFeatures; - features.clear(); - annotations.forEach(function (annotation) { - features.push(source.getFeatureById(annotation.id)); + let featureIdMap = {}; + let annotationIdMap = {}; + annotations.forEach(a => annotationIdMap[a.id] = true); + let toRemove = []; + + features.forEach(f => { + const id = f.getId(); + if (annotationIdMap[id]) { + featureIdMap[id] = true; + } else { + toRemove.push(f); + } }); + + if (toRemove.length === features.getLength()) { + features.clear(); + } else { + toRemove.forEach(f => features.remove(f)); + } + + annotations + .filter(a => !featureIdMap[a.id]) + .forEach( + a => features.push(this.annotationSource.getFeatureById(a.id)) + ); }, extent(extent, oldExtent) { // The extent only truly changes if the width and height changed. @@ -736,12 +755,14 @@ export default { projection: this.projection, center: center, resolution: this.resolution, - zoomFactor: 2, // Allow a maximum of 100x magnification for non-tiled images. More // cannot be represented in the URL parameters. minResolution: 0.01, // Restrict movement. extent: extent, + showFullExtent: true, + constrainOnlyCenter: true, + padding: [10, 10, 10, 10], })); if (this.resolution === undefined) { diff --git a/resources/assets/js/annotations/components/annotationCanvas/annotationTooltip.vue b/resources/assets/js/annotations/components/annotationCanvas/annotationTooltip.vue index ccee4344b..f06fec913 100644 --- a/resources/assets/js/annotations/components/annotationCanvas/annotationTooltip.vue +++ b/resources/assets/js/annotations/components/annotationCanvas/annotationTooltip.vue @@ -38,7 +38,7 @@ export default { return layer.get('name') === 'annotations'; }, updateHoveredAnnotations(e) { - let features = this.map.getFeaturesAtPixel(e.pixel, {layerFilter: this.annotationLayerFilter}) || []; + let features = this.map.getFeaturesAtPixel(e.pixel, {layerFilter: this.annotationLayerFilter}); let hash = features.map((f) => f.getId()).join('-'); if (this.hoveredFeaturesHash !== hash) { diff --git a/resources/assets/js/annotations/components/annotationCanvas/polygonBrushInteraction.vue b/resources/assets/js/annotations/components/annotationCanvas/polygonBrushInteraction.vue index c642e1100..144a29c1d 100644 --- a/resources/assets/js/annotations/components/annotationCanvas/polygonBrushInteraction.vue +++ b/resources/assets/js/annotations/components/annotationCanvas/polygonBrushInteraction.vue @@ -1,7 +1,7 @@ diff --git a/resources/assets/js/annotations/components/screenshotButton.vue b/resources/assets/js/annotations/components/screenshotButton.vue index 4724a10f1..94c58babc 100644 --- a/resources/assets/js/annotations/components/screenshotButton.vue +++ b/resources/assets/js/annotations/components/screenshotButton.vue @@ -125,14 +125,20 @@ export default { }, capture() { if (this.map) { - this.map.once('postcompose', (e) => { - this.makeBlob(e.context.canvas) - .then(this.download) - .catch(this.handleError); - }); + this.map.once('rendercomplete', this.handleRenderComplete); this.map.renderSync(); } }, + handleRenderComplete(e) { + // See: https://openlayers.org/en/v6.15.1/examples/export-map.html + // This version is modified/simplified because we want the screenshot + // in the actual device pixel ratio and not at the original size. + const canvas = e.target + .getViewport() + .querySelector('.ol-layer canvas, canvas.ol-layer'); + + this.makeBlob(canvas).then(this.download).catch(this.handleError); + }, handleError(message) { Messages.danger(message); }, diff --git a/resources/assets/js/annotations/ol/CancelableMap.js b/resources/assets/js/annotations/ol/CancelableMap.js deleted file mode 100644 index 588cdd859..000000000 --- a/resources/assets/js/annotations/ol/CancelableMap.js +++ /dev/null @@ -1,13 +0,0 @@ -import Map from '@biigle/ol/Map'; - -// OL Map that allows explicit canceling of the next animation frame for rendering. -export class CancelableMap extends Map { - cancelRender() { - if (this.animationDelayKey_) { - cancelAnimationFrame(this.animationDelayKey_); - this.animationDelayKey_ = undefined; - } - } -} - -export default CancelableMap; diff --git a/resources/assets/js/annotations/ol/MagicWandInteraction.js b/resources/assets/js/annotations/ol/MagicWandInteraction.js index 78c4784b5..6422a4be1 100644 --- a/resources/assets/js/annotations/ol/MagicWandInteraction.js +++ b/resources/assets/js/annotations/ol/MagicWandInteraction.js @@ -93,7 +93,7 @@ class MagicWandInteraction extends PointerInteraction { width: 3, }), points: 4, - radius1: 6, + radius: 6, radius2: 0, angle: Math.PI / 4 }) @@ -105,7 +105,7 @@ class MagicWandInteraction extends PointerInteraction { width: 1.5, }), points: 4, - radius1: 6, + radius: 6, radius2: 0, angle: Math.PI / 4 }) @@ -118,6 +118,12 @@ class MagicWandInteraction extends PointerInteraction { zIndex: 200, })); + this.snapshotListener = this.updateSnapshot.bind(this); + + this.mapExtent_ = null; + this.snapshotHeight_ = 0; + this.scaleFactor_ = 0; + // Update the snapshot and set event listeners if the interaction is active. this.toggleActive(); } @@ -141,16 +147,10 @@ class MagicWandInteraction extends PointerInteraction { * @return {Array} */ toSnapshotCoordinates(points) { - let extent = this.map.getView().calculateExtent(this.map.getSize()); - let height = this.snapshot.height; - let factor = this.getHighDpiScaling() / this.map.getView().getResolution(); - - return points.map(function (point) { - return [ - Math.round((point[0] - extent[0]) * factor), - height - Math.round((point[1] - extent[1]) * factor), - ]; - }); + return points.map(point => [ + Math.round((point[0] - this.mapExtent_[0]) * this.scaleFactor_), + this.snapshotHeight_ - Math.round((point[1] - this.mapExtent_[1]) * this.scaleFactor_), + ]); } /** @@ -161,16 +161,10 @@ class MagicWandInteraction extends PointerInteraction { * @return {Array} */ fromSnapshotCoordinates(points) { - let extent = this.map.getView().calculateExtent(this.map.getSize()); - let height = this.snapshot.height; - let factor = this.map.getView().getResolution() / this.getHighDpiScaling(); - - return points.map(function (point) { - return [ - Math.round((point[0] * factor) + extent[0]), - Math.round(((height - point[1]) * factor) + extent[1]), - ]; - }); + return points.map(point => [ + Math.round((point[0] / this.scaleFactor_) + this.mapExtent_[0]), + Math.round(((this.snapshotHeight_ - point[1]) / this.scaleFactor_) + this.mapExtent_[1]), + ]); } /** @@ -181,9 +175,7 @@ class MagicWandInteraction extends PointerInteraction { * @return {Array} */ fromMagicWandCoordinates(points) { - return points.map(function (point) { - return [point.x, point.y]; - }); + return points.map(point => [point.x, point.y]); } /** @@ -283,10 +275,10 @@ class MagicWandInteraction extends PointerInteraction { */ toggleActive() { if (this.getActive()) { - this.map.on(['moveend', 'change:size'], this.updateSnapshot.bind(this)); + this.map.on(['moveend', 'change:size'], this.snapshotListener); this.updateSnapshot(); } else { - this.map.un(['moveend', 'change:size'], this.updateSnapshot.bind(this)); + this.map.un(['moveend', 'change:size'], this.snapshotListener); this.indicatorSource.clear(); this.isShowingPoint = false; this.isShowingCross = false; @@ -302,12 +294,16 @@ class MagicWandInteraction extends PointerInteraction { */ updateSnapshot() { if (!this.updatingSnapshot && this.layer) { - this.layer.once('postcompose', this.updateSnapshotCanvas.bind(this)); + this.layer.once('postrender', this.updateSnapshotCanvas.bind(this)); // Set flag to avoid infinite recursion since renderSync will trigger the // moveend event again! this.updatingSnapshot = true; this.map.renderSync(); this.updatingSnapshot = false; + + this.mapExtent_ = this.map.getView().calculateExtent(this.map.getSize()); + this.snapshotHeight_ = this.snapshot.height; + this.scaleFactor_ = this.getHighDpiScaling() / this.map.getView().getResolution(); } } @@ -352,9 +348,7 @@ class MagicWandInteraction extends PointerInteraction { // Take only the outer contour. let contour = MagicWand.traceContours(sketch) - .filter(function (c) { - return !c.innner; - }) + .filter(c => !c.innner) .shift(); if (contour) { diff --git a/resources/assets/js/annotations/ol/geom/flat/difference.js b/resources/assets/js/annotations/ol/geom/flat/difference.js new file mode 100644 index 000000000..f78241ddf --- /dev/null +++ b/resources/assets/js/annotations/ol/geom/flat/difference.js @@ -0,0 +1,42 @@ +import turfDifference from '@turf/difference'; +import Polygon from '@biigle/ol/geom/Polygon.js'; +import {reducePrecision} from './simplify.js'; + +export function difference(first, second) { + // Reduce the precision of the coordinates to avoid artifacts from the difference + // operation. If the full precision is used, some coordinates that should be equal are + // not considered equal and the difference operation returns a multipolygon where it + // shouldn't. + first.geometry.coordinates = reducePrecision(first.geometry.coordinates); + second.geometry.coordinates = reducePrecision(second.geometry.coordinates); + + const differencePolygon = turfDifference(first, second); + + // This can happen if second entirely contains first, resulting in an empty polygon. + if (differencePolygon === null) { + return []; + } + + // Return the larger part if a polygon has been split by the difference operation. + if (differencePolygon.geometry.type === 'MultiPolygon') { + let maxArea = 0; + let maxCoords; + let area; + for (let i = 0; i < differencePolygon.geometry.coordinates.length; i++) { + area = (new Polygon(differencePolygon.geometry.coordinates[i])).getArea(); + if (area > maxArea) { + maxArea = area; + maxCoords = differencePolygon.geometry.coordinates[i]; + } + } + + return maxCoords; + } + + // This can happen if second made a hole in first. We keep first in this case. + if (differencePolygon.geometry.coordinates.length > 1) { + return first.geometry.coordinates; + } + + return differencePolygon.geometry.coordinates; +} diff --git a/resources/assets/js/annotations/ol/geom/flat/simplify.js b/resources/assets/js/annotations/ol/geom/flat/simplify.js new file mode 100644 index 000000000..7b273fc51 --- /dev/null +++ b/resources/assets/js/annotations/ol/geom/flat/simplify.js @@ -0,0 +1,18 @@ +/** + * Reduce the coordinate precision with rounding. + * + * @param {Array} coordinates Polygon coordinates. + * + * @return {Array} + */ +export function reducePrecision(coordinates, decimals) { + decimals = decimals ? Math.pow(10, decimals) : 1000; + + return coordinates.map(function (ring) { + return ring.map(function (coordinate) { + return coordinate.map(function (value) { + return Math.round(value * decimals) / decimals; + }); + }); + }); +} diff --git a/resources/assets/js/annotations/ol/geom/flat/union.js b/resources/assets/js/annotations/ol/geom/flat/union.js new file mode 100644 index 000000000..635d2a167 --- /dev/null +++ b/resources/assets/js/annotations/ol/geom/flat/union.js @@ -0,0 +1,24 @@ +import turfUnion from '@turf/union'; +import {reducePrecision} from './simplify.js'; + +export function union(first, second) { + // Reduce the precision of the coordinates to avoid artifacts from the union operation. + // If the full precision is used, some coordinates that should be equal are not + // considered equal and the union operation returns a multipolygon where it shouldn't. + first.geometry.coordinates = reducePrecision(first.geometry.coordinates); + second.geometry.coordinates = reducePrecision(second.geometry.coordinates); + const unionPolygon = turfUnion(first, second); + + // This can hapen if first and second are disjoint. Take first in this case. + if (unionPolygon.geometry.type === 'MultiPolygon') { + return first.geometry.coordinates; + } + + let coords = unionPolygon.geometry.coordinates; + // This can happen if the polygon has holes. Take the outer ring in this case. + if (coords.length > 1) { + coords = [coords[0]]; + } + + return coords; +} diff --git a/resources/assets/js/annotations/ol/interaction/ModifyPolygonBrush.js b/resources/assets/js/annotations/ol/interaction/ModifyPolygonBrush.js new file mode 100644 index 000000000..dd25a2860 --- /dev/null +++ b/resources/assets/js/annotations/ol/interaction/ModifyPolygonBrush.js @@ -0,0 +1,257 @@ +import booleanContains from '@turf/boolean-contains'; +import Circle from '@biigle/ol/geom/Circle'; +import Collection from '@biigle/ol/Collection'; +import EventType from '@biigle/ol/events/EventType'; +import Feature from '@biigle/ol/Feature'; +import Modify from '@biigle/ol/interaction/Modify'; +import Polygon from '@biigle/ol/geom/Polygon'; +import {always} from '@biigle/ol/events/condition'; +import {createEditingStyle} from '@biigle/ol/style/Style'; +import {difference} from '../geom/flat/difference'; +import {fromCircle} from '@biigle/ol/geom/Polygon'; +import {getNewSketchPointRadius, getNewSketchPointRadiusByPressure} from './PolygonBrush'; +import {ModifyEvent} from '@biigle/ol/interaction/Modify'; +import {polygon as turfPolygon} from '@turf/helpers'; +import {shiftKeyOnly} from '@biigle/ol/events/condition'; +import {union} from '../geom/flat/union'; + +export const ModifyEventType = { + MODIFYSTART: 'modifystart', + MODIFYREMOVE: 'modifyremove', + MODIFYEND: 'modifyend', +}; + +/** + * @classdesc + * Interaction for modifying polygons with a brush. + * + * @fires ModifyEvent + * @api + */ +class ModifyPolygonBrush extends Modify { + constructor(options) { + + super(options); + + this.overlay_.setStyle(options.style ? options.style : getDefaultStyleFunction()); + + this.sketchPoint_ = null; + this.sketchPointRadius_ = options.brushRadius !== undefined ? + options.brushRadius : 100; + this.addCondition_ = options.addCondition !== undefined ? + options.addCondition : always; + this.subtractCondition_ = options.subtractCondition !== undefined ? + options.subtractCondition : always; + this.resizeCondition_ = options.resizeCondition !== undefined ? + options.resizeCondition : shiftKeyOnly; + this.allowRemove_ = options.allowRemove !== undefined ? + options.allowRemove : true; + + this.isAdding_ = false; + this.isSubtracting_ = false; + + this.sketchCircle_ = null; + + } + + setMap(map) { + super.setMap(map); + if (map) { + let view = map.getView(); + if (view) { + this.watchViewForChangedResolution(view); + } + + map.on('change:view', e => this.watchViewForChangedResolution(e.target.getView())); + } + } + + watchViewForChangedResolution(view) { + view.on('change:resolution', this.updateRelativeSketchPointRadius_.bind(this)); + } + + createOrUpdateSketchPoint_(event) { + const coordinates = event.coordinate.slice(); + if (!this.sketchPoint_) { + let relativeRadius = event.map.getView().getResolution() * this.sketchPointRadius_; + this.sketchPoint_ = new Feature(new Circle(coordinates, relativeRadius)); + this.overlay_.getSource().addFeature(this.sketchPoint_) + } else { + const sketchPointGeom = this.sketchPoint_.getGeometry(); + sketchPointGeom.setCenter(coordinates); + } + } + + createOrUpdateSketchCircle_(event) { + const coordinates = event.coordinate.slice(); + if (!this.sketchCircle_) { + this.sketchCircle_ = new Circle(coordinates, this.sketchPoint_.getGeometry().getRadius()); + } else { + this.sketchCircle_.setCenter(coordinates); + this.sketchCircle_.setRadius(this.sketchPoint_.getGeometry().getRadius()) + } + + if (event.originalEvent.pointerType === 'pen') { + this.sketchCircle_.setRadius( + getNewSketchPointRadiusByPressure(event, this.sketchPointRadius_) + ); + } + } + + updateRelativeSketchPointRadius_(event) { + if (this.sketchPoint_) { + this.sketchPoint_.getGeometry().setRadius( + this.sketchPointRadius_ * event.target.getResolution() + ); + } + } + + updateAbsoluteSketchPointRadius_(event) { + if (this.sketchPoint_) { + this.sketchPointRadius_ = getNewSketchPointRadius(event, this.sketchPointRadius_); + this.sketchPoint_.getGeometry().setRadius( + this.sketchPointRadius_ * event.map.getView().getResolution() + ); + } + } + + handleEvent(event) { + const type = event.type; + let pass = true; + if (this.resizeCondition_(event) && + (type === EventType.WHEEL || EventType.MOUSEWHEEL)) { + event.originalEvent.preventDefault(); + this.updateAbsoluteSketchPointRadius_(event); + pass = false; + } + + return super.handleEvent(event) && pass; + } + + handlePointerMove_(event) { + this.createOrUpdateSketchPoint_(event); + this.createOrUpdateSketchCircle_(event); + } + + handleDownEvent(event) { + if (!this.handlingDownUpSequence) { + this.createOrUpdateSketchPoint_(event); + this.createOrUpdateSketchCircle_(event); + + if (this.subtractCondition_(event)) { + this.startSubtracting_(event); + + return true; + } else if (this.addCondition_(event)) { + this.startAdding_(event); + + return true; + } + } + + return false; + } + + handleUpEvent(event) { + if (this.handlingDownUpSequence && (this.isSubtracting_ || this.isAdding_)) { + this.finishModifying_(event); + + return true; + } + + return false; + } + + startSubtracting_(event) { + this.isSubtracting_ = true; + // this.willModifyFeatures_(event, []); + this.subtractCurrentFeatures_(event); + } + + startAdding_(event) { + this.isAdding_ = true; + // this.willModifyFeatures_(event, []); + this.addCurrentFeatures_(event); + } + + handleDragEvent(event) { + this.createOrUpdateSketchPoint_(event); + this.createOrUpdateSketchCircle_(event); + if (this.isSubtracting_) { + this.subtractCurrentFeatures_(event); + } else if (this.isAdding_) { + this.addCurrentFeatures_(event); + } + } + + subtractCurrentFeatures_(event) { + const sketchPointGeom = fromCircle(this.sketchCircle_); + let sketchPointPolygon = turfPolygon(sketchPointGeom.getCoordinates()); + let sketchPointArea = sketchPointGeom.getArea(); + this.features_.getArray().forEach((feature) => { + let featureGeom = feature.getGeometry(); + try { + var featurePolygon = turfPolygon(featureGeom.getCoordinates()); + } catch (e) { + // Skip features that can't be represented as polygon. + return; + } + if (this.allowRemove_ && booleanContains(sketchPointPolygon, featurePolygon)) { + this.features_.remove(feature); + if (this.source_) { + this.source_.removeFeature(feature); + } + this.dispatchEvent( + new ModifyEvent(ModifyEventType.MODIFYREMOVE, new Collection([feature]), event) + ); + } else { + const coords = difference(featurePolygon, sketchPointPolygon); + if (!this.allowRemove_ && sketchPointArea > (new Polygon(coords)).getArea()) { + // If allowRemove_ is false, the modified polygon may not become smaller than + // the sketchPointPolygon. + return; + } + featureGeom.setCoordinates(coords); + } + }); + } + + addCurrentFeatures_() { + const sketchPointGeom = fromCircle(this.sketchCircle_); + let sketchPointPolygon = turfPolygon(sketchPointGeom.getCoordinates()); + this.features_.getArray().forEach((feature) => { + let featureGeom = feature.getGeometry(); + try { + var featurePolygon = turfPolygon(featureGeom.getCoordinates()); + } catch (e) { + // Skip features that can't be represented as polygon. + return; + } + + // The order of the union() arguments matters! The feature polygon will be kept if + // there is no intersection with the sketch. + featureGeom.setCoordinates(union(featurePolygon, sketchPointPolygon)); + }); + } + + finishModifying_(event) { + this.isSubtracting_ = false; + this.isAdding_ = false; + this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.features_, event)); + } + + getBrushRadius() { + return this.sketchPointRadius_; + } +} + +function getDefaultStyleFunction() { + const style = createEditingStyle(); + + return function() { + return style['Circle']; + } +} + + +export default ModifyPolygonBrush; diff --git a/resources/assets/js/annotations/ol/interaction/PolygonBrush.js b/resources/assets/js/annotations/ol/interaction/PolygonBrush.js new file mode 100644 index 000000000..beb9ca495 --- /dev/null +++ b/resources/assets/js/annotations/ol/interaction/PolygonBrush.js @@ -0,0 +1,274 @@ +import Circle from '@biigle/ol/geom/Circle'; +import Draw from '@biigle/ol/interaction/Draw'; +import Event from '@biigle/ol/events/Event.js'; +import EventType from '@biigle/ol/events/EventType'; +import Feature from '@biigle/ol/Feature'; +import MapBrowserEventType from '@biigle/ol/MapBrowserEventType'; +import VectorLayer from '@biigle/ol/layer/Vector'; +import {always} from '@biigle/ol/events/condition'; +import {createEditingStyle} from '@biigle/ol/style/Style'; +import {fromCircle} from '@biigle/ol/geom/Polygon'; +import {polygon as turfPolygon} from '@turf/helpers'; +import {shiftKeyOnly, penOnly} from '@biigle/ol/events/condition'; +import {union} from '../geom/flat/union'; + +const MIN_BRUSH_SIZE = 5; +const BRUSH_RESIZE_STEP = 5; + +const DrawEventType = { + DRAWSTART: 'drawstart', + DRAWEND: 'drawend', + DRAWABORT: 'drawabort' +}; + +class DrawEvent extends Event { + constructor(type, feature) { + super(type); + this.feature = feature; + } +} + +export function getNewSketchPointRadius(event, radius) { + let delta = event.originalEvent.deltaY; + // Take the delta from deltaX if deltyY is 0 because some systems toggle the scroll + // direction with certain keys pressed (e.g. Mac with Shift+Scroll). + if (event.type == EventType.MOUSEWHEEL) { + delta = -event.originalEvent.wheelDeltaY; + if (delta === 0) { + delta = -event.originalEvent.wheelDeltaX; + } + } else if (delta === 0) { + delta = event.originalEvent.deltaX; + } + + let step = BRUSH_RESIZE_STEP; + if (radius <= (BRUSH_RESIZE_STEP * 5)) { + step = 1; + } + + if (delta > 0) { + return radius + step; + } + + if (delta < 0) { + return Math.max(radius - step, MIN_BRUSH_SIZE); + } + + return radius; +} + +export function getNewSketchPointRadiusByPressure(event, radius) { + if (event.pointerEvent.pressure != 0) { + radius = getNewSketchPointRadius(event, radius); + + return Math.max(radius * event.pointerEvent.pressure, MIN_BRUSH_SIZE) * + event.map.getView().getResolution(); + } + + return radius; +} + +/** + * @classdesc + * Interaction for drawing polygons with a brush. + * + * @fires DrawEvent + * @api + */ +class PolygonBrush extends Draw { + + constructor(options) { + + options.freehandCondition = options.freehandCondition ? + options.freehandCondition : penOnly; + + options.type = 'Polygon'; + + super(options); + + // Override the default overlay to set updateWhileAnimating. + this.overlay_ = new VectorLayer({ + source: this.overlay_.getSource(), + style: options.style ? options.style : getDefaultStyleFunction(), + updateWhileAnimating: true, + updateWhileInteracting: true + }); + + this.sketchPointRadius_ = options.brushRadius !== undefined ? + options.brushRadius : 100; + this.condition_ = options.condition !== undefined ? + options.condition : always; + this.resizeCondition_ = options.resizeCondition !== undefined ? + options.resizeCondition : shiftKeyOnly; + + this.isDrawing_ = false; + this.sketchCircle_ = null; + } + + setMap(map) { + super.setMap(map); + if (map) { + let view = map.getView(); + if (view) { + this.watchViewForChangedResolution(view); + } + + map.on('change:view', e => this.watchViewForChangedResolution(e.target.getView())); + } + } + + watchViewForChangedResolution(view) { + view.on('change:resolution', this.updateRelativeSketchPointRadius_.bind(this)); + } + + handleEvent(event) { + const type = event.type; + let pass = true; + if (this.resizeCondition_(event) && + (type === EventType.WHEEL || EventType.MOUSEWHEEL)) { + event.originalEvent.preventDefault(); + this.updateAbsoluteSketchPointRadius_(event); + pass = false; + } + + if (event.type === MapBrowserEventType.POINTERDRAG && this.handlingDownUpSequence) { + pass = false; + } + + return super.handleEvent(event) && pass; + } + + handleDownEvent(event) { + if (!this.handlingDownUpSequence) { + if (this.condition_(event)) { + this.startDrawing_(event); + + return true; + } + } + + return false; + } + + handleUpEvent() { + if (this.handlingDownUpSequence && this.isDrawing_) { + this.finishDrawing(); + + return true; + } + + return false; + } + + createOrUpdateSketchPoint_(event) { + const coordinates = event.coordinate.slice(); + if (!this.sketchPoint_) { + let relativeRadius = event.map.getView().getResolution() * this.sketchPointRadius_; + this.sketchPoint_ = new Feature(new Circle(coordinates, relativeRadius)); + this.updateSketchFeatures_(); + } else { + const sketchPointGeom = this.sketchPoint_.getGeometry(); + sketchPointGeom.setCenter(coordinates); + } + } + + updateRelativeSketchPointRadius_(event) { + if (this.sketchPoint_) { + this.sketchPoint_.getGeometry().setRadius( + this.sketchPointRadius_ * event.target.getResolution() + ); + } + } + + updateAbsoluteSketchPointRadius_(event) { + if (this.sketchPoint_) { + this.sketchPointRadius_ = getNewSketchPointRadius(event, this.sketchPointRadius_); + this.sketchPoint_.getGeometry().setRadius( + this.sketchPointRadius_ * event.map.getView().getResolution() + ); + } + } + + createOrUpdateSketchCircle_(event) { + const coordinates = event.coordinate.slice(); + if (!this.sketchCircle_) { + this.sketchCircle_ = new Circle(coordinates, this.sketchPoint_.getGeometry().getRadius()); + } else { + this.sketchCircle_.setCenter(coordinates); + this.sketchCircle_.setRadius(this.sketchPoint_.getGeometry().getRadius()) + } + + if (event.originalEvent.pointerType === 'pen') { + this.sketchCircle_.setRadius( + getNewSketchPointRadiusByPressure(event, this.sketchPointRadius_) + ); + } + } + + startDrawing_(event) { + this.isDrawing_ = true; + this.createOrUpdateSketchPoint_(event); + this.createOrUpdateSketchCircle_(event); + const start = event.coordinate; + this.finishCoordinate_ = start; + this.sketchFeature_ = new Feature(fromCircle(this.sketchCircle_)); + this.updateSketchFeatures_(); + this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_)); + } + + handlePointerMove_(event) { + this.createOrUpdateSketchPoint_(event); + this.createOrUpdateSketchCircle_(event); + + if (this.isDrawing_ && this.sketchFeature_) { + const sketchCircleGeometry = fromCircle(this.sketchCircle_); + const sketchCirclePolygon = turfPolygon(sketchCircleGeometry.getCoordinates()); + const sketchFeatureGeometry = this.sketchFeature_.getGeometry(); + const sketchFeaturePolygon = turfPolygon(sketchFeatureGeometry.getCoordinates()); + + // The order of the union() arguments matters! The feature polygon will be kept if + // there is no intersection with the circle. + sketchFeatureGeometry.setCoordinates(union(sketchFeaturePolygon, sketchCirclePolygon)); + } + } + + finishDrawing() { + this.isDrawing_ = false; + const sketchFeature = this.abortDrawing_(); + if (!sketchFeature) { + return; + } + + this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND, sketchFeature)); + if (this.features_) { + this.features_.push(sketchFeature); + } + if (this.source_) { + this.source_.addFeature(sketchFeature); + } + } + + getBrushRadius() { + return this.sketchPointRadius_; + } + + abortDrawing_() { + this.sketchCircle_ = null; + + return super.abortDrawing_(); + } +} + +function getDefaultStyleFunction() { + let styles = createEditingStyle(); + styles['Polygon'] = + styles['Polygon'].concat( + styles['LineString'] + ); + + return function(feature) { + return styles[feature.getGeometry().getType()]; + }; +} + +export default PolygonBrush; diff --git a/resources/assets/js/annotations/ol/source/Canvas.js b/resources/assets/js/annotations/ol/source/Canvas.js new file mode 100644 index 000000000..a6a71bb9f --- /dev/null +++ b/resources/assets/js/annotations/ol/source/Canvas.js @@ -0,0 +1,45 @@ +import Image from '@biigle/ol/source/Image'; +import ImageCanvas from '@biigle/ol/ImageCanvas'; +import {listen} from '@biigle/ol/events'; +import EventType from '@biigle/ol/events/EventType'; +import {getHeight} from '@biigle/ol/extent'; + +/** + * @classdesc + * Base class for canvas sources where a canvas element is the canvas. + * @api + */ +class Canvas extends Image { + /** + * @param {Options} options Single image source options. + */ + constructor(options) { + super({ + attributions: options.attributions, + projection: options.projection, + resolutions: options.resolutions, + state: options.state + }) + + let resolution = getHeight(options.canvasExtent) / options.canvas.height; + + /** + * @private + * @type {import("../ImageCanvas.js").ImageCanvas} + */ + this.canvas_ = new ImageCanvas(options.canvasExtent, resolution, 1, options.canvas); + + listen(this.canvas_, EventType.CHANGE, this.handleImageChange, this); + } + + /** + * @inheritDoc + */ + getImageInternal() { + // No need to check if extent intersects canvas. The canvas is always visible + // in our apllication. + return this.canvas_; + } +} + +export default Canvas; diff --git a/resources/assets/js/annotations/snapInteraction.vue b/resources/assets/js/annotations/snapInteraction.vue index 97d9ad4e9..24008f332 100644 --- a/resources/assets/js/annotations/snapInteraction.vue +++ b/resources/assets/js/annotations/snapInteraction.vue @@ -140,4 +140,4 @@ export default { }) } } - \ No newline at end of file + diff --git a/resources/assets/js/annotations/stores/styles.js b/resources/assets/js/annotations/stores/styles.js index 71e726f8c..5a208e3c3 100644 --- a/resources/assets/js/annotations/stores/styles.js +++ b/resources/assets/js/annotations/stores/styles.js @@ -50,6 +50,10 @@ let selectedCircleFill = new Fill({ color: colors.orange, }); +let transparentFill = new Fill({ + color: 'transparent', +}); + let defaultCircleStroke = new Stroke({ color: colors.white, width: 2 @@ -92,9 +96,7 @@ export default { // Add transparent fill for hit detection inside of circles and // polygons. // See https://github.com/openlayers/openlayers/pull/7750 - fill: new Fill({ - color: 'transparent', - }), + fill: transparentFill, }), new Style({ stroke: new Stroke({ @@ -115,6 +117,10 @@ export default { fill: selectedCircleFill, stroke: selectedCircleStroke, }), + // Add transparent fill for hit detection inside of circles and + // polygons. + // See https://github.com/openlayers/openlayers/pull/7750 + fill: transparentFill, zIndex: 200, }), new Style({ @@ -151,7 +157,7 @@ export default { image: new RegularShape({ stroke: selectedStrokeOutline, points: 4, - radius1: 6, + radius: 6, radius2: 0, angle: Math.PI / 4, }), @@ -160,7 +166,7 @@ export default { image: new RegularShape({ stroke: selectedStroke, points: 4, - radius1: 6, + radius: 6, radius2: 0, angle: Math.PI / 4, }), diff --git a/resources/assets/js/videos/components/videoScreen.vue b/resources/assets/js/videos/components/videoScreen.vue index e6a7db4a9..fb287ecbe 100644 --- a/resources/assets/js/videos/components/videoScreen.vue +++ b/resources/assets/js/videos/components/videoScreen.vue @@ -3,7 +3,6 @@ annotationIdMap[a.id] = true); + let toRemove = []; + + features.forEach(f => { + const id = f.getId(); + if (annotationIdMap[id]) { + featureIdMap[id] = true; + } else { + toRemove.push(f); + } + }); + + if (toRemove.length === features.getLength()) { features.clear(); - annotations.forEach(function (annotation) { - feature = source.getFeatureById(annotation.id); - if (feature) { - features.push(feature); - } - }); + } else { + toRemove.forEach(f => features.remove(f)); } + + annotations + .filter(a => !featureIdMap[a.id]) + .map(a => source.getFeatureById(a.id)) + // Ignore a==null because the selected annotation may not exist in the + // current video frame. + .forEach(a => a && features.push(a)); }, isDefaultInteractionMode(isDefault) { this.selectInteraction.setActive(isDefault); diff --git a/resources/assets/js/videos/components/videoScreen/annotationPlayback.vue b/resources/assets/js/videos/components/videoScreen/annotationPlayback.vue index fa0f65cc2..579a99953 100644 --- a/resources/assets/js/videos/components/videoScreen/annotationPlayback.vue +++ b/resources/assets/js/videos/components/videoScreen/annotationPlayback.vue @@ -48,7 +48,8 @@ export default { }, }, methods: { - refreshAllAnnotations(time) { + refreshAllAnnotations() { + let time = this.video.currentTime; let source = this.annotationSource; let selected = this.selectedFeatures; let annotations = this.annotationsPreparedToRender; @@ -122,7 +123,10 @@ export default { } Object.values(newRendered).forEach((feature) => { - this.updateGeometry(feature, time); + let annotation = feature.get('annotation'); + let points = annotation.interpolatePoints(time); + let geometry = feature.getGeometry(); + this.updateGeometry(geometry, points); }); }, refreshSingleAnnotation(annotation) { @@ -143,11 +147,6 @@ export default { return feature; }, - updateGeometry(feature, time) { - let annotation = feature.get('annotation'); - let points = annotation.interpolatePoints(time); - feature.setGeometry(this.getGeometryFromPoints(annotation.shape, points)); - }, getGeometryFromPoints(shape, points) { points = this.convertPointsFromDbToOl(points); @@ -171,6 +170,20 @@ export default { return; } }, + updateGeometry(geometry, points) { + points = this.convertPointsFromDbToOl(points); + + if (geometry instanceof Point) { + geometry.setCoordinates(points[0]); + } else if (geometry instanceof LineString) { + geometry.setCoordinates(points); + } else if (geometry instanceof Circle) { + geometry.setCenter(points[0]); + geometry.setRadius(points[1][0]); + } else { + geometry.setCoordinates([points]); + } + }, getPointsFromGeometry(geometry) { let points; switch (geometry.getType()) { @@ -233,11 +246,9 @@ export default { }, }, created() { - this.$on('refresh', this.refreshAllAnnotations); this.$once('map-ready', () => { - this.$watch('annotationsRevision', () => { - this.refreshAllAnnotations(this.video.currentTime); - }); + this.$watch('annotationsRevision', this.refreshAllAnnotations); + this.videoSource.on('change', this.refreshAllAnnotations); }); }, }; diff --git a/resources/assets/js/videos/components/videoScreen/polygonBrushInteractions.vue b/resources/assets/js/videos/components/videoScreen/polygonBrushInteractions.vue index 5eedb72d9..a58bb14ff 100644 --- a/resources/assets/js/videos/components/videoScreen/polygonBrushInteractions.vue +++ b/resources/assets/js/videos/components/videoScreen/polygonBrushInteractions.vue @@ -1,7 +1,7 @@