{"name":"@turf/union","version":"6.0.3","keywords":["turf","gif"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/union@6.0.3","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"463b62d71c406f40a6978f560bfb92e88fe7db56","tarball":"http://registry-npm.ywwl.com/@turf/union/download/@turf/union-6.0.3.tgz","fileCount":4,"integrity":"sha512-SJPhEvsR96k4vFqymxPPC43jcqFydTafGjHWnYzlupxqUDzIYD8X5d9Ed8mONl2T9oM4ErbNuuZ9j/eHvoWtKw==","signatures":[{"sig":"MEYCIQDFVsmnE62TKyFJTedX15KHiBtReCZAjeNYxYpoisSdwwIhAJZ7g/hZidOqua6UkQGIYtIZWx6jY875K6Gi9URuWjxm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbL4NlCRA9TVsSAnZWagAAvwYP/15myB6JW58gE15ApBHv\nm7ZvBJ/54MUZ1/2KVzlaZGBrruY4IOJVIaYbyeQ4xYY1cn+5RG6eyDVxfrhH\nIegNxbinsOJ7zjCEHu4p3Lez0PSsmqVWOroJ5pTMvQswcWYLKxTyUiyIv9Mp\nTx5LCrSKm+oW//Szi2faIAuC4tcbvrEOsFHZ2IC6sq+thZoznjrHGqzrcq7I\n8oOoNDac3RIECv1dAX3xkc/j7OjRs/h/D/3JMhg4iK/NkSlqR3RkHyn9eSg5\nYyr5yGlXmf0DjmGDfF/hLopGTJBqqpZf+EKvmZBSivzA+Ror1ziLcHPJzb56\nrjko/y8QvXqtDuemjphPM3BTLAQ3RUB3p9I4I5va5txeXb9npnz0fA2PBuus\nfmf+hlr06w5stCmdHVBYsYefdVX90BnCg4KNlKOwKpietW0m+tvTHuL7XQHv\nSJP+o0BK1xKjObrsyBwASmCIuVOOIL81F8U1gNg9l+YafTMrr+hIxivtAaeD\nv9fdyNnH9LIyluc9bTb8m6uEq/hSYvwzLrajs6oen1dYsuRlHm4KnyghUvxu\n1zQ2CyHPzp/NsDfJLm9aXswDSYY1QGVQ4Om16pU6plRkQ1AZRyuniBrOmu9q\n5OW5iNwz0PE/J0FbbFCRYCuhgOdedx1zkQPgJ6/O0QjV2j8UbmwyLiPBwA/v\n3yQa\r\n=qU64\r\n-----END PGP SIGNATURE-----\r\n","size":2631,"noattachment":false,"key":"/@turf/union/-/@turf/union-6.0.3.tgz"},"main":"index","files":["index.js","index.d.ts"],"types":"index.d.ts","scripts":{"docs":"node ../../scripts/generate-readmes","test":"node test.js","bench":"node bench.js","pretest":"tsc"},"_npmUser":{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"6.0.1","description":"turf union module","directories":{},"_nodeVersion":"9.11.1","dependencies":{"@turf/helpers":"6.x","@turf/invariant":"6.x","martinez-polygon-clipping":"^0.4.3"},"_hasShrinkwrap":false,"devDependencies":{"glob":"*","tape":"*","tslint":"*","benchmark":"*","typescript":"*","@types/tape":"*","@turf/combine":"*","load-json-file":"*","write-json-file":"*"},"_npmOperationalInternal":{"tmp":"tmp/union_6.0.3_1529840485561_0.7538604533725395","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":1529840485659,"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":1529840485659,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}