{"_id":"@allmaps/attach","_rev":"7-21f9cde82c6312a9a687cf3411f9e890","name":"@allmaps/attach","dist-tags":{"latest":"1.0.0-beta.50"},"versions":{"1.0.0-beta.44":{"name":"@allmaps/attach","version":"1.0.0-beta.44","keywords":["georeference","map"],"license":"MIT","_id":"@allmaps/attach@1.0.0-beta.44","maintainers":[{"name":"bertspaan","email":"hello@bertspaan.nl"}],"contributors":[{"url":"https://manuelclaeysbouuaert.be","name":"Manuel Claeys Bouuaert","email":"manuel.claeys.b@gmail.com"}],"homepage":"https://allmaps.org","dist":{"shasum":"90c25912154da3ece189fda3d44aa32a94dc384c","tarball":"https://registry.npmjs.org/@allmaps/attach/-/attach-1.0.0-beta.44.tgz","fileCount":11,"integrity":"sha512-Dbd1IYgcOgALpCWKrEctFTAOuEB7S87J3J8HqGSki6pq5CxyWgYNfEE66ANUrOJcj3/g1jPbL5Iv78UuZ4y6gQ==","signatures":[{"sig":"MEUCIGxqZsNaZ7VMOCA767LMHeKuUl9a2EJfw8midFDb/S6YAiEA4M1OI20sL2BT72OZchf9whwhxjGunBgQ8W4CPFXegvo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42794},"type":"module","exports":"./dist/index.js","gitHead":"b0528a2ee528dd035a4cb9188f838adca307c7b3","scripts":{"lint":"prettier --check src test && eslint src test --ext .js,.ts","test":"NODE_ENV=test pnpm run build && mocha","bench":"node bench/index.js","build":"tsc && pnpm run documentation","types":"tsc --noEmit","watch":"tsc --watch","format":"prettier --write src test","documentation":"remark . --output --use remark-api"},"_npmUser":{"name":"bertspaan","actor":{"name":"bertspaan","type":"user","email":"hello@bertspaan.nl"},"email":"hello@bertspaan.nl"},"repository":{"url":"https://github.com/allmaps/allmaps.git","type":"git","directory":"packages/attach"},"_npmVersion":"lerna/4.5.1/node@v23.11.0+arm64 (darwin)","description":"Attaching maps together while transforming them","directories":{},"_nodeVersion":"23.11.0","dependencies":{"lodash-es":"^4.17.21","ml-matrix":"^6.12.0","@allmaps/stdlib":"^1.0.0-beta.35","@allmaps/project":"^1.0.0-beta.3","@types/lodash-es":"^4.17.12","@allmaps/transform":"^1.0.0-beta.46"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.6","mocha":"^10.8.2","eslint":"^8.56.0","prettier":"^3.4.2","remark-api":"^1.1.0","remark-cli":"^12.0.1","typescript":"^5.7.0","@types/eslint":"^8.56.0","@allmaps/types":"^1.0.0-beta.19","@allmaps/annotation":"^1.0.0-beta.34","eslint-config-prettier":"^9.1.0","chai-shallow-deep-equal":"^1.4.6","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/attach_1.0.0-beta.44_1751899550525_0.36525215172031245","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.45":{"name":"@allmaps/attach","version":"1.0.0-beta.45","keywords":["georeference","map"],"license":"MIT","_id":"@allmaps/attach@1.0.0-beta.45","maintainers":[{"name":"bertspaan","email":"hello@bertspaan.nl"}],"contributors":[{"url":"https://manuelclaeysbouuaert.be","name":"Manuel Claeys Bouuaert","email":"manuel.claeys.b@gmail.com"}],"homepage":"https://allmaps.org","dist":{"shasum":"ec6001edcdbcf5df368fb0a32ec7c4ed764f817e","tarball":"https://registry.npmjs.org/@allmaps/attach/-/attach-1.0.0-beta.45.tgz","fileCount":11,"integrity":"sha512-D+A3Iz7PZfrb1dTZH6MLZtLeGrU3Z2J1MbZjIcrzNRRtM20CVvmsDjHdQg/Dl4GXRXw/oH67Mze7IgH0+JR21A==","signatures":[{"sig":"MEQCIAcHRr9i4B/3BaKqq2jnhd8T+RDzAEdLI/d0rAbjGYX7AiBi/Ckxpv16ONpOKqCnKoYB+VnkLStlQk2BShuWf7zZUA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42750},"type":"module","exports":"./dist/index.js","gitHead":"6b93e4d938c15ef1ea0e6ba15dc6585c80f6687b","scripts":{"lint":"prettier --check src test && eslint src test --ext .js,.ts","test":"NODE_ENV=test mocha","bench":"node bench/index.js","build":"tsc","types":"tsc --noEmit","watch":"tsc --watch","format":"prettier --write src test","documentation":"remark . --output --use remark-api"},"_npmUser":{"name":"bertspaan","actor":{"name":"bertspaan","type":"user","email":"hello@bertspaan.nl"},"email":"hello@bertspaan.nl"},"repository":{"url":"https://github.com/allmaps/allmaps.git","type":"git","directory":"packages/attach"},"_npmVersion":"lerna/4.5.1/node@v23.11.0+arm64 (darwin)","description":"Attaching maps together while transforming them","directories":{},"_nodeVersion":"23.11.0","dependencies":{"lodash-es":"^4.17.21","ml-matrix":"^6.12.0","@allmaps/stdlib":"^1.0.0-beta.36","@allmaps/project":"^1.0.0-beta.4","@types/lodash-es":"^4.17.12","@allmaps/transform":"^1.0.0-beta.47"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.6","mocha":"^10.8.2","eslint":"^8.56.0","prettier":"^3.4.2","remark-api":"^1.1.0","remark-cli":"^12.0.1","typescript":"^5.7.0","@types/eslint":"^8.56.0","@allmaps/types":"^1.0.0-beta.20","@allmaps/annotation":"^1.0.0-beta.35","eslint-config-prettier":"^9.1.0","chai-shallow-deep-equal":"^1.4.6","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/attach_1.0.0-beta.45_1752089469247_0.6669341027702165","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.46":{"name":"@allmaps/attach","version":"1.0.0-beta.46","keywords":["georeference","map"],"license":"MIT","_id":"@allmaps/attach@1.0.0-beta.46","maintainers":[{"name":"bertspaan","email":"hello@bertspaan.nl"}],"contributors":[{"url":"https://manuelclaeysbouuaert.be","name":"Manuel Claeys Bouuaert","email":"manuel.claeys.b@gmail.com"}],"homepage":"https://allmaps.org","dist":{"shasum":"e3f181bad645e133b80e0b9e4aeb2ddfabe39dd0","tarball":"https://registry.npmjs.org/@allmaps/attach/-/attach-1.0.0-beta.46.tgz","fileCount":11,"integrity":"sha512-fk2ntaoo7dkAz8bU+1VzNyjU77MeoGa6af5REzyP+7ZczcQOVAAfMICfC28yxxiPGMIWAs09amjgEpS3Guns+Q==","signatures":[{"sig":"MEUCIEWpRuvFKhZxOFDnUfu+x/aNfb4dhFHgCdCTRdAukaWqAiEAsnRFYX5ptbJpMghEyheZMT71pIKoeVjStchqO9uNobk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42753},"type":"module","exports":"./dist/index.js","gitHead":"d7e8b2ee5a5496bffb70cfcd1143cfabce4d5760","scripts":{"lint":"prettier --check src test && eslint src test --ext .js,.ts","test":"NODE_ENV=test mocha","bench":"node bench/index.js","build":"tsc","types":"tsc --noEmit","watch":"tsc --watch","format":"prettier --write src test","documentation":"remark . --output --use remark-api"},"_npmUser":{"name":"bertspaan","email":"hello@bertspaan.nl"},"repository":{"url":"https://github.com/allmaps/allmaps.git","type":"git","directory":"packages/attach"},"_npmVersion":"lerna/4.5.1/node@v23.11.0+arm64 (darwin)","description":"Attaching maps together while transforming them","directories":{},"_nodeVersion":"23.11.0","dependencies":{"lodash-es":"^4.17.21","ml-matrix":"^6.12.0","@allmaps/stdlib":"^1.0.0-beta.37","@allmaps/project":"^1.0.0-beta.5","@types/lodash-es":"^4.17.12","@allmaps/transform":"^1.0.0-beta.48"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.6","mocha":"^10.8.2","eslint":"^8.56.0","prettier":"^3.4.2","remark-api":"^1.1.0","remark-cli":"^12.0.1","typescript":"^5.7.0","@types/eslint":"^8.56.0","@allmaps/types":"^1.0.0-beta.20","@allmaps/annotation":"^1.0.0-beta.35","eslint-config-prettier":"^9.1.0","chai-shallow-deep-equal":"^1.4.6","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/attach_1.0.0-beta.46_1752946888686_0.6436188928027022","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.47":{"name":"@allmaps/attach","version":"1.0.0-beta.47","keywords":["georeference","map"],"license":"MIT","_id":"@allmaps/attach@1.0.0-beta.47","maintainers":[{"name":"bertspaan","email":"hello@bertspaan.nl"}],"contributors":[{"url":"https://manuelclaeysbouuaert.be","name":"Manuel Claeys Bouuaert","email":"manuel.claeys.b@gmail.com"}],"homepage":"https://allmaps.org","bugs":{"url":"https://github.com/allmaps/allmaps/issues"},"dist":{"shasum":"1f45a5aae4d1ea9a626d05474b73dde428c6ce4f","tarball":"https://registry.npmjs.org/@allmaps/attach/-/attach-1.0.0-beta.47.tgz","fileCount":11,"integrity":"sha512-bltzuctj+rZlcnYs/lVUuXGzVfKShGYB66X8SBT9T7r/IISL3uJFCU1JM86bYuZVAw+jnxaeLCT3o2RQtPkF9g==","signatures":[{"sig":"MEYCIQCe8uJ33ttd71uuV8c4BuVR9V6c8ahYDiMsNGMJgbh2UAIhAJxUquyHL2jxrK05ppy+pFfdwE3LeZpe+FZsIwHH1NHO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42695},"type":"module","exports":"./dist/index.js","gitHead":"dfe8dc3b15ae53f3dec0627144a0778de3a51779","scripts":{"lint":"prettier --check src test && eslint src test --ext .js,.ts","test":"NODE_ENV=test vitest run","bench":"node bench/index.js","build":"tsc","types":"tsc --noEmit","watch":"tsc --watch","format":"prettier --write src test","documentation":"remark . --output --use remark-api"},"_npmUser":{"name":"bertspaan","email":"hello@bertspaan.nl"},"repository":{"url":"git+https://github.com/allmaps/allmaps.git","type":"git","directory":"packages/attach"},"_npmVersion":"lerna/4.7.0/node@v24.10.0+arm64 (darwin)","description":"Attaching maps together while transforming them","directories":{},"_nodeVersion":"24.10.0","dependencies":{"lodash-es":"^4.17.21","ml-matrix":"^6.12.0","@allmaps/stdlib":"^1.0.0-beta.38","@allmaps/project":"^1.0.0-beta.6","@types/lodash-es":"^4.17.12","@allmaps/transform":"^1.0.0-beta.49"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","vitest":"^4.0.4","prettier":"^3.6.2","remark-api":"^1.1.0","remark-cli":"^12.0.1","typescript":"^5.7.0","@types/eslint":"^8.56.0","@allmaps/types":"^1.0.0-beta.21","@allmaps/annotation":"^1.0.0-beta.36","eslint-config-prettier":"^9.1.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/attach_1.0.0-beta.47_1762812026802_0.8065949541301602","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.48":{"name":"@allmaps/attach","version":"1.0.0-beta.48","keywords":["georeference","map"],"license":"MIT","_id":"@allmaps/attach@1.0.0-beta.48","maintainers":[{"name":"bertspaan","email":"hello@bertspaan.nl"}],"contributors":[{"url":"https://manuelclaeysbouuaert.be","name":"Manuel Claeys Bouuaert","email":"manuel.claeys.b@gmail.com"}],"homepage":"https://allmaps.org","bugs":{"url":"https://github.com/allmaps/allmaps/issues"},"dist":{"shasum":"cd7121c5695f5b38defb698416937ebd2d24c12f","tarball":"https://registry.npmjs.org/@allmaps/attach/-/attach-1.0.0-beta.48.tgz","fileCount":11,"integrity":"sha512-nG00bJgbOPMWJYRpzNsda5ssgWMA6ykMKGfYWKv7piN2UfPzio3IdEjL3IU2w5aFj7Jukiyghb2VtrSLgf0Q/A==","signatures":[{"sig":"MEUCIQCZUxhLFIc9EOi4+XllbS/0PdDM6WDuAP+zBNtoUxYUUwIgNnLzpRKPhBWvPq6OgZUEIiU9AKGvOnsaz8bAgfNTNBk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42695},"type":"module","exports":"./dist/index.js","gitHead":"814686e9c8e78777708c22dcd1efc4c81d968539","scripts":{"lint":"prettier --check src test && eslint src test --ext .js,.ts","test":"NODE_ENV=test vitest run","bench":"node bench/index.js","build":"tsc","types":"tsc --noEmit","watch":"tsc --watch","format":"prettier --write src test","documentation":"remark . --output --use remark-api"},"_npmUser":{"name":"bertspaan","email":"hello@bertspaan.nl"},"repository":{"url":"git+https://github.com/allmaps/allmaps.git","type":"git","directory":"packages/attach"},"_npmVersion":"lerna/4.7.0/node@v24.10.0+arm64 (darwin)","description":"Attaching maps together while transforming them","directories":{},"_nodeVersion":"24.10.0","dependencies":{"lodash-es":"^4.17.21","ml-matrix":"^6.12.0","@allmaps/stdlib":"^1.0.0-beta.39","@allmaps/project":"^1.0.0-beta.7","@types/lodash-es":"^4.17.12","@allmaps/transform":"^1.0.0-beta.50"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","vitest":"^4.0.4","prettier":"^3.6.2","remark-api":"^1.1.0","remark-cli":"^12.0.1","typescript":"^5.7.0","@types/eslint":"^8.56.0","@allmaps/types":"^1.0.0-beta.22","@allmaps/annotation":"^1.0.0-beta.36","eslint-config-prettier":"^9.1.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/attach_1.0.0-beta.48_1764251095648_0.0822928276587993","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.49":{"name":"@allmaps/attach","version":"1.0.0-beta.49","keywords":["georeference","map"],"license":"MIT","_id":"@allmaps/attach@1.0.0-beta.49","maintainers":[{"name":"bertspaan","email":"hello@bertspaan.nl"}],"contributors":[{"url":"https://manuelclaeysbouuaert.be","name":"Manuel Claeys Bouuaert","email":"manuel.claeys.b@gmail.com"}],"homepage":"https://allmaps.org","bugs":{"url":"https://github.com/allmaps/allmaps/issues"},"dist":{"shasum":"44c54ec6e08c3643d7831641350b3136dc803461","tarball":"https://registry.npmjs.org/@allmaps/attach/-/attach-1.0.0-beta.49.tgz","fileCount":11,"integrity":"sha512-d27L3DwE9DdyQpnRRnT+tw0S4svP/gYOlzFbd4bHu/ckhqihg/L3VzwLA69LJvMAQpFuujJPMEqbdgnCqVuXFA==","signatures":[{"sig":"MEYCIQCtZ1f7k+YlbFkxQBj/Ox+gvOwTwiI9D4R5csDJDX4dBAIhAIdgbOjXZNgjwq1CutkjuuKs5O4/hNC7iL6i28OH6LMd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42695},"type":"module","exports":"./dist/index.js","gitHead":"5801dd5a129c88cb0aaea3f45e2e288f38565d46","scripts":{"lint":"prettier --check src test && eslint src test --ext .js,.ts","test":"NODE_ENV=test vitest run","bench":"node bench/index.js","build":"tsc","types":"tsc --noEmit","watch":"tsc --watch","format":"prettier --write src test","documentation":"remark . --output --use remark-api"},"_npmUser":{"name":"bertspaan","email":"hello@bertspaan.nl"},"repository":{"url":"git+https://github.com/allmaps/allmaps.git","type":"git","directory":"packages/attach"},"_npmVersion":"lerna/4.9.4/node@v24.10.0+arm64 (darwin)","description":"Attaching maps together while transforming them","directories":{},"_nodeVersion":"24.10.0","dependencies":{"lodash-es":"^4.17.21","ml-matrix":"^6.12.0","@allmaps/stdlib":"^1.0.0-beta.40","@allmaps/project":"^1.0.0-beta.8","@types/lodash-es":"^4.17.12","@allmaps/transform":"^1.0.0-beta.51"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","vitest":"^4.0.4","prettier":"^3.6.2","remark-api":"^1.1.0","remark-cli":"^12.0.1","typescript":"^5.7.0","@types/eslint":"^8.56.0","@allmaps/types":"^1.0.0-beta.22","@allmaps/annotation":"^1.0.0-beta.36","eslint-config-prettier":"^9.1.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/attach_1.0.0-beta.49_1770665502074_0.6327811037617748","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.50":{"name":"@allmaps/attach","version":"1.0.0-beta.50","contributors":[{"name":"Manuel Claeys Bouuaert","email":"manuel.claeys.b@gmail.com","url":"https://manuelclaeysbouuaert.be"}],"description":"Attaching maps together while transforming them","type":"module","exports":"./dist/index.js","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/allmaps/allmaps.git","directory":"packages/attach"},"homepage":"https://allmaps.org","keywords":["georeference","map"],"dependencies":{"@allmaps/project":"^1.0.0-beta.9","@allmaps/stdlib":"^1.0.0-beta.41","@allmaps/transform":"^1.0.0-beta.52","@types/lodash-es":"^4.17.12","lodash-es":"^4.17.21","ml-matrix":"^6.12.0"},"devDependencies":{"@allmaps/annotation":"^1.0.0-beta.37","@allmaps/types":"^1.0.0-beta.23","@types/eslint":"^8.56.0","@typescript-eslint/eslint-plugin":"^7.0.0","@typescript-eslint/parser":"^7.0.0","eslint":"^8.56.0","eslint-config-prettier":"^9.1.0","prettier":"^3.6.2","remark-api":"^1.1.0","remark-cli":"^12.0.1","typescript":"^5.9.3","vitest":"^4.0.4"},"scripts":{"watch":"tsc --watch --noCheck","build":"tsc --noCheck","test":"NODE_ENV=test vitest run","lint":"prettier --ignore-path ../../.gitignore --check src test && eslint src test --ext .js,.ts","types":"tsc --noEmit","format":"prettier --ignore-path ../../.gitignore --write src test","documentation":"remark . --output --use remark-api","bench":"node bench/index.js"},"license":"MIT","gitHead":"0776371fa222f670b893d87b302c6334e825ac3e","_id":"@allmaps/attach@1.0.0-beta.50","bugs":{"url":"https://github.com/allmaps/allmaps/issues"},"_nodeVersion":"25.8.0","_npmVersion":"lerna/4.9.4/node@v25.8.0+arm64 (darwin)","dist":{"integrity":"sha512-DqPwoPcnm3U/7AP2UKPVb86Kn/7UTGzji8UnRvJLAG0RnMrDqY6BqVsTkBZVFnF6198bCtCoIrQ7PGXSIhzYqA==","shasum":"d62edad33de0cf913d2f368857bf20b46d6e2ad0","tarball":"https://registry.npmjs.org/@allmaps/attach/-/attach-1.0.0-beta.50.tgz","fileCount":11,"unpackedSize":42762,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFcgIFVJCn4QhPknURK4pv+EHAj0VKmzRHo6g0HOSCIyAiBuzVx6c4XFrtl8F+KiI0BNAVQFmESYl/n1ZdDF/c1IBw=="}]},"_npmUser":{"name":"bertspaan","email":"hello@bertspaan.nl"},"directories":{},"maintainers":[{"name":"bertspaan","email":"hello@bertspaan.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/attach_1.0.0-beta.50_1780001976544_0.5852428741878344"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-07T14:45:50.452Z","modified":"2026-05-28T20:59:36.818Z","1.0.0-beta.44":"2025-07-07T14:45:50.692Z","1.0.0-beta.45":"2025-07-09T19:31:09.431Z","1.0.0-beta.46":"2025-07-19T17:41:28.880Z","1.0.0-beta.47":"2025-11-10T22:00:27.005Z","1.0.0-beta.48":"2025-11-27T13:44:55.885Z","1.0.0-beta.49":"2026-02-09T19:31:42.296Z","1.0.0-beta.50":"2026-05-28T20:59:36.680Z"},"bugs":{"url":"https://github.com/allmaps/allmaps/issues"},"license":"MIT","homepage":"https://allmaps.org","keywords":["georeference","map"],"repository":{"type":"git","url":"git+https://github.com/allmaps/allmaps.git","directory":"packages/attach"},"description":"Attaching maps together while transforming them","contributors":[{"name":"Manuel Claeys Bouuaert","email":"manuel.claeys.b@gmail.com","url":"https://manuelclaeysbouuaert.be"}],"maintainers":[{"name":"bertspaan","email":"hello@bertspaan.nl"}],"readme":"# @allmaps/attach\n\nAttaching maps together:\n\n1. **Link resource points** on different maps using 'attachments'.\n2. Express this attaching using an attached transformation that considers all relevant map transformations jointly and **minimizes the distance in geo space** of the attachments' transformed resource points.\n3. Solve the attached transformation and infer new GCPs from the attachments that **bring the maps closer together**.\n\n## How it works\n\nThe `AttachedTransformation` class from this package allows to work with 'attached transformations': multiple transformation that are coupled by 'attachments' and can hence be solved jointly.\n\nJust like the various transformation classes from [@allmaps/transform](../../packages/transform/), an attached transformation is expressed mathematically using a coefficient matrix. Solving this matrix allows us to obtain the weights that define the transformation, which in turn allows us to evaluate the transformation at new source points. For attached transformations, the coefficient matrix is a block matrix, built from the constituent transformations' coefficient matrices, with added rows that express how each attachment links two transformations by demanding that their corresponding destination points should (ideally) be equal. More details about the mathematical approach can be found [here](https://observablehq.com/d/0ff83cf201ebbf04).\n\nTo make it more practical to create and solve attached transformation when starting from Annotations or Georeferenced Maps, static functions are available to input and output to Georeferenced Maps. They read in Georeferenced Maps and a list of '**Resource Control Points**' (RCPs). These are points that are defined on a map's resource, but don't (yet) have geo coordinates. Using their `id`, they can be linked to other RCPs, where **two RCPs with matching `id`'s will create an 'attachment'** between the corresponding maps. When solving the attached transformation and evaluating the RCPs using the new found weights corresponding to the transformation of their corresponding map, we can compute their geo coordinates and hence infer new Ground Control Points. These new GCPs\n\nSome details:\n\n* An attachment is defined by two '**Source Control Points**' (SCPs). These are the RCPs, where the 'resource' coordinate has been translated to 'source', as custom in a transformation (taking into account `differentHandedness` for example).\n* When there are more then two RCPs with a matching `id`, an attachment is created between the first and second, first and third, first and fourth etc.\n\n## Installation\n\nThis is an ESM-only module that works in browsers and in Node.js.\n\nInstall with pnpm:\n\n```sh\npnpm install @allmaps/attach\n```\n\n## Usage\n\n### Quickstart\n\nWhen starting from an **Annotation** or **Georeferenced Map**, the fastest way to deal with multiple maps that are 'attached together' is:\n\n```js\nimport { parseAnnotation } from '@allmaps/annotation'\nimport { AttachedTransformation } from '@allmaps/attach'\n\n// Fetch an annotation\nconst annotation = await fetch(annoationUrl).then((response) => response.json())\n\n// Create georeferencedMaps from the annotation\nconst georeferencedMaps = parseAnnotation(annotation)\nconst georeferencedMap0 = georeferencedMaps[0]\nconst georeferencedMap1 = georeferencedMaps[1]\n\ngeoreferencedMap0.gcps.length // return 3: map with 3 GCPs\ngeoreferencedMap1.gcps.length // return 3: map with 3 GCPs\n\n// Define Resource Control Points\n// Here two RCPs are have a matching 'id' and will create one attachment between mapO and map1\nconst rcps = [\n  {\n    type: 'rcp',\n    id: 'center',\n    mapId: georeferencedMap0.id,\n    resource: [4779, 261] // resource point on map0\n  },\n  {\n    type: 'rcp',\n    id: 'center', // same id\n    mapId: georeferencedMap1.id, // different mapId\n    resource: [414, 3597] // resource point on map1\n  }\n]\n\n// Create a AttachedTransformation instance from the Georeferenced Maps and the RCPs\nconst attachedtransformation = AttachedTransformation.fromGeoreferencedMaps(\n  [\n    georeferencedMap0,\n    georeferencedMap1\n  ],\n  rcps\n)\n\n// Use the .toGeoreferencedMaps() method to solve the attached transformation and infer new GCPs from the attachments\nconst resultingGeoreferencedMaps = attachedtransformation.toGeoreferencedMaps()\nconst resultingGeoreferencedMap0 = resultingGeoreferencedMaps[0]\nconst resultingGeoreferencedMap1 = resultingGeoreferencedMaps[1]\n\n// Here one attachment created one new GCP on both of it's maps,\n// with the original resource point and a new, identical geo point.\nresultingGeoreferencedMap0.gcps.length // return 4: map with 3 + 1 = 4 GCPs\nresultingGeoreferencedMap1.gcps.length // return 4: map with 3 + 1 = 4 GCPs\nresultingGeoreferencedMap0.gcps[3] // { resource: [4779, 261] , geo: [4.941781094220815, 52.34760910486503] }\nresultingGeoreferencedMap1.gcps[3] // { resource: [414, 3597] , geo: [4.941781094220815, 52.34760910486503] }\n\n```\n\n### Using AttachedTransformation directly\n\nIt is also possible to use the AttachedTransformation class directly. It has similar methods then the various `Transformation` classes from [@allmaps/transform](../../packages/transform/) to e.g. create a coefficient matrix, solve it and evaluate it.\n\n### Attached transformation options\n\nThe following options are available for Attached transformations:\n\n| Option                    | Description                                                                                                                                                                                                                                                                                                                                                               | Type                  | Default                                            |\n|:--------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------|:---------------------------------------------------|\n| `averageOut`     | Average out the resulting geo coordinates for each `id`. For inexact transformations (like `'polynomial'`) the geo coordinates will in general not be equal. This forces them be equal. For exact transformation types (like `'thinPlateSpline'`) the geo coordinates will be (quasi) identical making this averaging not (strictly) necessary. Note: the averaging happens in projected geo coordinates. | `boolean`             | `true`\n\n### Attached transformation From Georeferenced Map options\n\nThe following options are available for Attached transformations from Georeferenced Maps, in addition to the Attached transformation options:\n\n| Option                    | Description                                                                                                                                                                                                                                                                                                                                                               | Type                  | Default                                            |\n|:--------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------|:---------------------------------------------------|\n| `transformationType`     | TransformationType to use when building the attached transformation coefficient matrix. This overrules the map's TransformationType, unless `useMapTransformationTypes` is `true`. | `TransformationType`             | `'polynomial'`\n| `useMapTransformationTypes`     | Let `transformationType` overrule the map's TransformationType. | `boolean`             | `false`\n| `clone`     | Deep Clone the map and its transformer and transformations before returning the results. This prevents from overriding object properties like GCPs on the input objects. | `boolean`             | `true`\n| `evaluateAttachmentScps`     | For both Source Control Points of an attachment, evaluate them using the solved attached transformation and create a GCP on the corresponding map. | `boolean`             | `true`\n| `evaluateSingleScps`     | For Source Control Points without a matching pair, evaluate them using the solved attached transformation and create a GCP on the corresponding map. | `boolean`             | `false`\n| `evaluateGcps`     | For existing GCPs, re-evaluate them using the solved attached transformation. | `boolean`             | `false`\n| `removeExistingGcps`     | Remove existing GCPs. | `boolean`             | `false`\n\n## Typing\n\nRCPs are defined as follows:\n\n```ts\nexport type Rcp = {\n  type: 'rcp'\n  id: string\n  mapId: string\n  resource: Point\n}\n```\n\n## License\n\nMIT\n\n## API\n\n### `new AttachedTransformation(transformationsById, attachments, options)`\n\nCreate a Attached Transformation\n\n###### Parameters\n\n* `transformationsById` (`Map<string, BaseIndependentLinearWeightsTransformation>`)\n* `attachments` (`Array<Attachment>`)\n* `options?` (`Partial<AttachedTransformationOptions> | undefined`)\n\n###### Returns\n\n`AttachedTransformation`.\n\n### `AttachedTransformation#ScpsById`\n\n###### Type\n\n```ts\nArray<Array<Scp>>\n```\n\n### `AttachedTransformation#attachments`\n\n###### Type\n\n```ts\nArray<Attachment>\n```\n\n### `AttachedTransformation#coefsArrayMatrices`\n\n###### Type\n\n```ts\n[Array<Array<number>>, Array<Array<number>>]\n```\n\n### `AttachedTransformation#coefsArrayMatricesSize`\n\n###### Type\n\n```ts\n[[number, number], [number, number]]\n```\n\n### `AttachedTransformation#coefsArrayMatrix`\n\n###### Type\n\n```ts\nArray<Array<number>>\n```\n\n### `AttachedTransformation#coefsArrayMatrixSize`\n\n###### Type\n\n```ts\n[number, number]\n```\n\n### `AttachedTransformation#destinationPointsArrays`\n\n###### Type\n\n```ts\n[Array<number>, Array<number>]\n```\n\n### `AttachedTransformation#evaluateFunction(newSourcePoint, id)`\n\n###### Parameters\n\n* `newSourcePoint` (`[number, number]`)\n* `id` (`string`)\n\n###### Returns\n\n`[number, number]`.\n\n### `AttachedTransformation#getCoefsArrayMatrices()`\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\n`[Array<Array<number>>, Array<Array<number>>]`.\n\n### `AttachedTransformation#getCoefsArrayMatrix()`\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\n`Array<Array<number>>`.\n\n### `AttachedTransformation#getDestinationPointsArrays()`\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\n`[Array<number>, Array<number>]`.\n\n### `AttachedTransformation#options?`\n\n###### Type\n\n```ts\nTransformationTypeInputs & { georeferencedMapsById?: Map<string, GeoreferencedMap>; projectedGcpTransformersById?: Map<string, ProjectedGcpTransformer>; ... 7 more ...; removeExistingGcps: boolean; } & { ...; }\n```\n\n### `AttachedTransformation#processWeightsArrays()`\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\n`void`.\n\n### `AttachedTransformation#solve()`\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\n`void`.\n\n### `AttachedTransformation#toGeoreferencedMaps()`\n\nCreate Georeferenced Maps from this Attached Transformation.\nThis will solve the Attached Transformation,\nevaluate all attachements (in all source control points),\ninfer GCPs from them,\nand add them to the original Georeferenced Maps.\n\nThis only works if this AttachedTransformation has been created from Georeferenced Maps.\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\n`Array<{ type: \"GeoreferencedMap\"; resource: { id: string; type: \"ImageService1\" | \"ImageService2\" | \"ImageService3\" | \"Canvas\"; height?: number | undefined; width?: number | undefined; partOf?: Array<PartOfItemType> | undefined; provider?: Array<{ ...; }> | undefined; }; ... 8 more ...; _allmaps?: unknown; }>`.\n\n### `AttachedTransformation#trailingCumulativeCoefsArrayMatrixSizeById`\n\n###### Type\n\n```ts\nMap<string, [number, number]>\n```\n\n### `AttachedTransformation#transformationsById`\n\n###### Type\n\n```ts\nMap<string, BaseIndependentLinearWeightsTransformation>\n```\n\n### `AttachedTransformation#weightsArrays?`\n\n###### Type\n\n```ts\n[Array<number>, Array<number>]\n```\n\n### `AttachedTransformation#weightsArraysById?`\n\n###### Type\n\n```ts\nMap<string, [Array<number>, Array<number>]>\n```\n\n### `AttachedTransformation.fromGeoreferencedMaps(georeferencedMaps, rcps, options)`\n\nCreate a AttachedTransformation from Georeferenced Maps\n\nBy default, a Projected GCP Transformer is created for each Georeferenced Map,\nand from it a Thin Plate Spline transformation is created and passed to the AttachedTransformation.\n\nUse the options to specify another transformation type for all maps,\nor specifically set the option 'useMapTransformationTypes' to true to use the type defined in the Georeferenced Map.\n\n###### Parameters\n\n* `georeferencedMaps` (`Array<{ type: \"GeoreferencedMap\"; resource: { id: string; type: \"ImageService1\" | \"ImageService2\" | \"ImageService3\" | \"Canvas\"; height?: number | undefined; width?: number | undefined; partOf?: Array<PartOfItemType> | undefined; provider?: Array<{ ...; }> | undefined; }; ... 8 more ...; _allmaps?: unknown; }>`)\n  * Georeferenced Maps\n* `rcps` (`Array<Rcp>`)\n* `options?` (`Partial<{ internalProjection: Projection; projection: Projection; } & { differentHandedness: boolean; } & { maxDepth: number; minSourceDistance: number; ... 6 more ...; preToResource: ProjectionFunction; } & MultiGeometryOptions & TransformationTypeInputs & { ...; }> | undefined`)\n  * Options, including Projected GCP Transformer Options, and a transformation type to overrule the type defined in the Georeferenced Map\n\n###### Returns\n\n`AttachedTransformation`.\n\n### `AttachedTransformationFromGeoreferencedMapOptions`\n\n###### Type\n\n```ts\nTransformationTypeInputs & { georeferencedMapsById?: Map<string, GeoreferencedMap>; projectedGcpTransformersById?: Map<string, ProjectedGcpTransformer>; ... 7 more ...; removeExistingGcps: boolean; }\n```\n\n### `AttachedTransformationOptions`\n\n###### Type\n\n```ts\nTransformationTypeInputs & { georeferencedMapsById?: Map<string, GeoreferencedMap>; projectedGcpTransformersById?: Map<string, ProjectedGcpTransformer>; ... 7 more ...; removeExistingGcps: boolean; } & { ...; }\n```\n\n### `Attachment`\n\n###### Type\n\n```ts\n[Scp, Scp]\n```\n\n### `Rcp`\n\n###### Fields\n\n* `id` (`string`)\n* `mapId` (`string`)\n* `resource` (`[number, number]`)\n* `type` (`'rcp'`)\n\n### `RcpsInput`\n\n###### Fields\n\n* `rcps` (`Array<Rcp>`)\n\n### `Scp`\n\n###### Fields\n\n* `destination?` (`[number, number]`)\n* `id` (`string`)\n* `source` (`[number, number]`)\n* `transformationId` (`string`)\n\n### `Sp`\n\n###### Fields\n\n* `destination?` (`[number, number]`)\n* `source` (`[number, number]`)\n* `transformationId` (`string`)\n","readmeFilename":"README.md"}