{"name":"@turf/union","version":"6.5.0","keywords":["turf","gif"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/union@6.5.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"82d28f55190608f9c7d39559b7f543393b03b82d","tarball":"http://registry-npm.ywwl.com/@turf/union/download/@turf/union-6.5.0.tgz","fileCount":7,"integrity":"sha512-igYWCwP/f0RFHIlC2c0SKDuM/ObBaqSljI3IdV/x71805QbIvY/BYGcJdyNcgEA6cylIGl/0VSlIbpJHZ9ldhw==","signatures":[{"sig":"MEYCIQCJ45Up4YfV9uI0jSqQwrWMFD1yiQTMRw92QHF/fnu3hwIhAN8X9HgUga3+hme7cLNRfbW/vC6e5DYlltVa27LAaQnp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2fLVCRA9TVsSAnZWagAANLMP/ih7LP2rH9G+wK9maoT8\nMieGizGRU+CXXjVeBjyc3NDoN4nsjIEv1s/Lu0COk0nYhVp0GkDFiBuuQkP9\nqdzjD8mPFvA+v/xvapnXfqapsnxBzEZom0EDMjvkBPO9QvzYBvwz2jNF92IX\nJAHkMeqNl6lc6Ga5HDoGCkljeKaxn4HNOVTByeLZ95AP/pvVP2n882NkpdYR\n1tYjh5sLqpWA1F66CZBQBMkRhi9OJjXEj556td0rHCsDE11uxSiYypP3WgeF\n67qWXQQ9R4KYQoeFKVUS9Dgik+ErUrWmovdXPnGhml0HrYRP8qWDAum6djns\nZtkp1FIKUSnSnRaG/0SDvwGiDpsSGeZkjtSoSP2+2vZ+hKIeI+KTIUhd4Mbh\n7kJj1l1POKF0azCx6xF83SC+3Q3YxGHWohBEF9EUe6Ru+ZTgUh40lJfkJvbT\nJUDtijgYO/oMgMBVcqJlrCTyLxmfpuA4WnQB7+MwhhmEwJZes4efuRJVP2+b\nySTB9i2E1sm36TYqQJ7ttE72gdbE+JOcaszr+a3EjlTXafcFGCqhJ6fu0Se7\nujh390Y8DWSinUgAEE2oEIwkd7cg8dpxZwfMwFL0cpo6DiGb12IPSRykKYjf\noDOCt4hFpDu4GwGEeEpZaInCCIucwrN1dJtQsG4gf6kLO948uElSkKpnfG2/\nCX5m\r\n=ouOc\r\n-----END PGP SIGNATURE-----\r\n","size":3256,"noattachment":false,"key":"/@turf/union/-/@turf/union-6.5.0.tgz"},"main":"dist/js/index.js","types":"dist/js/index.d.ts","module":"dist/es/index.js","exports":{".":{"import":"./dist/es/index.js","require":"./dist/js/index.js"},"./package.json":"./package.json"},"funding":"https://opencollective.com/turf","gitHead":"5375941072b90d489389db22b43bfe809d5e451e","scripts":{"docs":"node ../../scripts/generate-readmes","test":"npm-run-all test:*","bench":"ts-node bench.js","build":"npm-run-all build:*","build:es":"tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json","build:js":"tsc","test:tape":"ts-node -r esm test.js","test:types":"tsc --esModuleInterop --noEmit types.ts"},"_npmUser":{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.8.0+x64 (darwin)","description":"turf union module","directories":{},"sideEffects":false,"_nodeVersion":"14.8.0","dependencies":{"@turf/helpers":"^6.5.0","@turf/invariant":"^6.5.0","polygon-clipping":"^0.15.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"glob":"*","tape":"*","tslint":"*","ts-node":"*","benchmark":"*","typescript":"*","@types/tape":"*","npm-run-all":"*","@turf/combine":"^6.5.0","load-json-file":"*","write-json-file":"*"},"_npmOperationalInternal":{"tmp":"tmp/union_6.5.0_1625912253730_0.6907662601551994","host":"s3://npm-registry-packages"},"readme":"# @turf/union\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## union\n\nTakes a collection of input polygons and returns a combined polygon. If the\ninput polygons are not contiguous, this function returns a multi-polygon\nfeature.\n\n### Parameters\n\n*   `features` **[FeatureCollection][1]<([Polygon][2] | [MultiPolygon][3])>** input polygon features\n*   `options` **[Object][4]** Optional Parameters (optional, default `{}`)\n\n    *   `options.properties` **[GeoJsonProperties][5]** properties to assign to output feature (optional, default `{}`)\n\n### Examples\n\n```javascript\nconst poly1 = turf.polygon(\n  [\n    [\n      [-82.574787, 35.594087],\n      [-82.574787, 35.615581],\n      [-82.545261, 35.615581],\n      [-82.545261, 35.594087],\n      [-82.574787, 35.594087],\n    ],\n  ],\n  { fill: \"#0f0\" }\n);\n\nconst poly2 = turf.polygon(\n  [\n    [\n      [-82.560024, 35.585153],\n      [-82.560024, 35.602602],\n      [-82.52964, 35.602602],\n      [-82.52964, 35.585153],\n      [-82.560024, 35.585153],\n    ],\n  ],\n);\n\nconst union = turf.union(turf.featureCollection([poly1, poly2]));\n\n//addToMap\nconst addToMap = { poly1, poly2, union };\n\npoly1.properties.fill = \"#0f0\";\npoly2.properties.fill = \"#00f\";\nunion.properties.stroke = \"red\";\nunion.properties[\"stroke-width\"] = 4;\nunion.properties.fill = \"transparent\";\n```\n\nReturns **([Feature][5]<([Polygon][2] | [MultiPolygon][3])> | null)** a combined polygon or multi-polygon feature, or null if there were no input polygons to combine\n\n[1]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n[2]: https://tools.ietf.org/html/rfc7946#section-3.1.6\n\n[3]: https://tools.ietf.org/html/rfc7946#section-3.1.7\n\n[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[5]: https://tools.ietf.org/html/rfc7946#section-3.2\n\n<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run \"yarn docs\" from the root of the turf project. -->\n\n---\n\nThis module is part of the [Turfjs project](https://turfjs.org/), an open source module collection dedicated to geographic algorithms. It is maintained in the [Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create PRs and issues.\n\n### Installation\n\nInstall this single module individually:\n\n```sh\n$ npm install @turf/union\n```\n\nOr install the all-encompassing @turf/turf module that includes all modules as functions:\n\n```sh\n$ npm install @turf/turf\n```\n","publish_time":1625912253836,"maintainers":[{"name":"smallsaucepan","email":"james@smallsaucepan.com"},{"name":"morgan.herlocker","email":"morganherlocker@gmail.com"},{"name":"twelch","email":"tim.j.welch@gmail.com"},{"name":"jamesmilneruk","email":"jamesmilner22@hotmail.com"},{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},{"name":"tmcw","email":"tom@macwright.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"tcql","email":"tim.channell@gmail.com"},{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"}],"_cnpm_publish_time":1625912253836,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}