{"name":"@turf/centroid","version":"6.2.0-alpha.0","keywords":["turf","geojson","geo","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/centroid@6.2.0-alpha.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"22beeed938999cc62a1a547af55a41e040213934","tarball":"http://registry-npm.ywwl.com/@turf/centroid/download/@turf/centroid-6.2.0-alpha.0.tgz","fileCount":6,"integrity":"sha512-0m/cQSt98/cVZLVHTeXYH6qN7qAyj1ry+m5X7I84xOwJj/uqbPqB27n4ItAwi/Gvl+3yK026zq4u+YHAC4sIlw==","signatures":[{"sig":"MEUCIDXFQG9pkUXIorYr+Oi2N1scyNv8Wq74ziEOYBno+JvjAiEA/Muehz7eYSa/MXyPusStiTQNngXyc4NEkgjLCsLDjM4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefS4oCRA9TVsSAnZWagAAh5IP/ia7Dbk5aq6+3nXZJH3V\nZ9Qff3+lLU76Ye43lXNY0vXO66L0qNePp+NJ/BqXcDS/dqiR08Coys/vH47E\nJ41gjGD1UZ2Ma97ZEJgfN1tc7EWPB1JFGyAPrAhwIdgvNGhbmwsSntinAikF\nDWnpDEzBmhyGJVuunnMwehq1EALGr9/EWqGYS58jNyXc8F36livoSljkiMaX\nVNw/K/XAYKmsCUybE+eLHD5qxcMbsvJSpuIKU4vg0meBui4s8zQm+xdplL7l\ni3WzmxtP+1lX0f6PoIDuso5newJgOLBcAuWVJGVHudZn8YRB2m5j7526LUn3\nmALpriEsd/Y2kk3WSU5rzccU6LAE6X5u3S3s+YTsjw6s9c02Lx1GfRkxHlUk\nGxE2LpMKQXrMMrxrbDNmXUTBd6ZqH36WoscPY18EPjJQ2OsyrTnlXnUE7pXO\nxt6DrNdd5qLnTvuwO871mRseBxFK6xYa1G+wwGRiNHO+Tdsff5p2Ol9bo5iV\nYkA+nrUmIL+GME9SMOD0b1lqK/q8VEcteiBXqI2XJ6sdbpzlqvqIeAdxt8Ph\nseJ75CFTn5TQl0QbCojui3rhGbFiXHiB7FfG+daVT86oVl9SziXSetX3ChCj\nbUJQhBLpEYZ3c0Ly/p/wGCZh+LTnK8cEpyshBtAdjzK5gDgdOwhXXOjuD057\n+Ra1\r\n=R0Ru\r\n-----END PGP SIGNATURE-----\r\n","size":2753,"noattachment":false,"key":"/@turf/centroid/-/@turf/centroid-6.2.0-alpha.0.tgz"},"main":"dist/js/index.js","types":"dist/js/index.d.ts","module":"dist/es/index.js","gitHead":"23b651deaa1ca6a0960d0142aea620b7cc6a076d","scripts":{"docs":"node ../../scripts/generate-readmes","test":"npm-run-all prepare test:*","bench":"npm-run-all prepare bench:run","prepare":"npm-run-all prepare:*","bench:run":"node bench.js","test:tape":"node -r esm test.js","prepare:es":"tsc --outDir dist/es --module esnext --declaration false","prepare:js":"tsc","test:types":"tsc --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 centroid module","directories":{},"sideEffects":false,"_nodeVersion":"13.10.1","dependencies":{"@turf/meta":"^6.2.0-alpha.0","@turf/helpers":"^6.2.0-alpha.0"},"_hasShrinkwrap":false,"devDependencies":{"glob":"*","tape":"*","tslint":"*","benchmark":"*","typescript":"*","@types/tape":"*","load-json-file":"*","write-json-file":"*","geojson-fixtures":"*"},"_npmOperationalInternal":{"tmp":"tmp/centroid_6.2.0-alpha.0_1585262120182_0.553547876311522","host":"s3://npm-registry-packages"},"readme":"# @turf/centroid\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## centroid\n\nComputes the centroid as the mean of all vertices within the object.\n\n### Parameters\n\n*   `geojson` **[GeoJSON][1]** GeoJSON to be centered\n*   `options` **[Object][2]** Optional Parameters (optional, default `{}`)\n\n    *   `options.properties` **[Object][2]** an Object that is used as the [Feature][3]'s properties (optional, default `{}`)\n\n### Examples\n\n```javascript\nvar polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar centroid = turf.centroid(polygon);\n\n//addToMap\nvar addToMap = [polygon, centroid]\n```\n\nReturns **[Feature][3]<[Point][4]>** the centroid of the input object\n\n[1]: https://tools.ietf.org/html/rfc7946#section-3\n\n[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[3]: https://tools.ietf.org/html/rfc7946#section-3.2\n\n[4]: https://tools.ietf.org/html/rfc7946#section-3.1.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/centroid\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":1585262120295,"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":1585262120295,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}