{"name":"@turf/centroid","version":"6.2.0","keywords":["turf","geojson","geo","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/centroid@6.2.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"728d55cbfc97ea32937b1461bebe535787b10ad9","tarball":"http://registry-npm.ywwl.com/@turf/centroid/download/@turf/centroid-6.2.0.tgz","fileCount":7,"integrity":"sha512-k21egD4s45pBDIsEAiEUSs23anwdyzIK+/jQvHq+mL+Fwn9Zntk6GEUtpoBZq92fs2NyCvjGKlB2LNdHWXZtAw==","signatures":[{"sig":"MEUCIQCFFQD82M1p36f2UKJtHB964g75TLJuwjHl0fVMQf82OAIgHGxjp0/X2Cy3EOYsPwgBdUryGjgp3iMSyF2C7tutaLI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/bjOCRA9TVsSAnZWagAAgFoP/Rwg+3oxNWPRdcvboOc4\ni3gOarRsSs0U1URt9UHoHZJ4rUyBlOE7ewtqFtFtA6obMK1rIVc/z51es+r1\nbGHy+5y/kZcK50qg6aEEg+Ggjln6BOe6nckDMgNOQkP+kAByE1K2P+vzJWiC\nmNclkY8AjMnlMpGw2UuvlCH5f8oX5lxHGGiEvQiiGBf4Hn4gM7HILtoORQuc\nO8LIVTZJR1elnSQ3Se3RwgMIXeWX0+91YW9zd/JlFcvaFDBM4UKYlMwTn+OO\nxhc1isxn34KzCDMWdWG/FIKKm8rdMP9NmlJ0u2G0NIvniDQXy7AN1mOVls2o\nwDvRqfcEjzCAZzqVuTnYmEcicSzKxJusbrMKmoYTK6mkq5JDPWeuVozw1qFb\nf9Q/cf8vjBA21HvSI4wfrh2ffttxQn2+C7xbGtLvVbt8LRXVYcM4LkWnXsHC\n9Z/tBqg7L4wgUaYL9SBdKCjbfBG/iSi33prMWOdD7sEsk324Q7FOqOcHmvpA\nvqGsKKnJKvF5/nnsA2wi/GxMCOuAt115J5LPDQHqFvLlHyiW1r/4LLQFN5pf\ngmnaES4wOMKPGBfOYa+wo9DerkinmsALrz5z77OOfe2U6osWXxcDwSP7gHzA\nfOUjFJj2FXXJx/tovk727HBMR5wMHbKK7uuXS4ryIwDxjA1yTdyXqcsK0RQT\n6xBJ\r\n=uttQ\r\n-----END PGP SIGNATURE-----\r\n","size":2882,"noattachment":false,"key":"/@turf/centroid/-/@turf/centroid-6.2.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"},"gitHead":"c277baf2b967a35efec75de9ae54869d20da5288","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 centroid module","directories":{},"sideEffects":false,"_nodeVersion":"13.10.1","dependencies":{"@turf/meta":"^6.2.0","@turf/helpers":"^6.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"glob":"*","tape":"*","tslint":"*","ts-node":"*","benchmark":"*","typescript":"*","@types/tape":"*","npm-run-all":"*","load-json-file":"*","write-json-file":"*","geojson-fixtures":"*"},"_npmOperationalInternal":{"tmp":"tmp/centroid_6.2.0_1610463438518_0.7224505843987772","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":1610463438660,"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":1610463438660,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}