{"name":"@turf/union","version":"6.3.0","keywords":["turf","gif"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/union@6.3.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"12ff74d144c30f90bc8f5b8a34fe7d78acc6563a","tarball":"http://registry-npm.ywwl.com/@turf/union/download/@turf/union-6.3.0.tgz","fileCount":7,"integrity":"sha512-m8yh13Q5E0Y+YC10+iI/Qq0Txt7UmSIFByc7DfNVlMMGTceqLFa8xGwSVdFuB/d6MWwKuzKonQMl1PUx/Vd2Iw==","signatures":[{"sig":"MEQCIG7LR+tqGob0f8OSk6jRFrInhZ7vArnbS6OWqZPi/9wgAiA6pOjd/8LeOwcfx6OnV3aBQPG8Huq6UqixiPwFuvOneg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCECOCRA9TVsSAnZWagAATc0P/iMKn6zeub8qkvseAfYQ\nQJpebtNvPvzKLi4UCeds2SSezp3Rl+PBNJeQm72basw6snVl6maBbGUoR6D8\nQSGvc3prYJdVwTUN16zkj2xTDljr6aXcNUbr+HRFvAxSPCBUjLuH7VqUM/o2\nX6V6rFRWvgiNGTa0n0im3FmvGhr8Bjqd/jKX1pqt7oWZkUam5LSeU/ZtP9Pi\nIoCQmJ+Js6P422OlrZH7lHeyAgrqfm0JQCP9EZ+idQDpwjXc48A4/siZuT1e\nxHMCyj5c82iBMv98OWv1tsDjRb6B+TO8cQZZVUzdECgqp6szLKz2UgOsoL0j\nmaNERxVArOHgpWWRF969p17EBBELbko+DQKzP+nsZ3INxO3OqjXKDnPcn43e\ncH3Bp1id1DALhhy5bvqeSheebj0A4+jWa+KcQTcFFynHDMYz8tIWa2UOG3/R\nqcQPF0bzB5Kvxw3XkslgWuzgesVP9D4aAK+bRiDKGijlSANe+rqXuA93Z6RJ\nEn+KLSDbsrV5lVI2e40+kZTi5/dygkFdXt8Xw4VzJ9cV0/zEKcrS4NvbXRNy\nSk9phVLz2RRPsVxaCbWiY+saUd1cEBU774vLsXUsURjmVw2T7pLNX9gP43xJ\nkTT9mxW2dUm8aD1zsVLhe5RLvX1tebqxDhIZ6SOFsVKoON5UoQJ4ADbDsf60\nEvBD\r\n=lS3M\r\n-----END PGP SIGNATURE-----\r\n","size":3202,"noattachment":false,"key":"/@turf/union/-/@turf/union-6.3.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"},"gitHead":"57c8877e1e2d67effc2cdd23385c02b2a6615a49","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":"mdfedderly","email":"mdfedderly@mdfedderly.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/3.20.2/node@v13.10.1+x64 (darwin)","description":"turf union module","directories":{},"sideEffects":false,"_nodeVersion":"13.10.1","dependencies":{"@turf/helpers":"^6.3.0","@turf/invariant":"^6.3.0","polygon-clipping":"^0.15.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"glob":"*","tape":"*","tslint":"*","ts-node":"*","benchmark":"*","typescript":"*","@types/tape":"*","npm-run-all":"*","@turf/combine":"^6.3.0","load-json-file":"*","write-json-file":"*"},"_npmOperationalInternal":{"tmp":"tmp/union_6.3.0_1611153549830_0.2952873917858052","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":1611153549961,"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":1611153549961,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}