{"name":"@turf/centroid","version":"6.5.0","keywords":["turf","geojson","geo","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/centroid@6.5.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"ecaa365412e5a4d595bb448e7dcdacfb49eb0009","tarball":"http://registry-npm.ywwl.com/@turf/centroid/download/@turf/centroid-6.5.0.tgz","fileCount":7,"integrity":"sha512-MwE1oq5E3isewPprEClbfU5pXljIK/GUOMbn22UM3IFPDJX0KeoyLNwghszkdmFp/qMGL/M13MMWvU+GNLXP/A==","signatures":[{"sig":"MEUCIQCjeaXM72v7gYE7pX9R7Y93lNWHOIGT5vkk2PBBTTIPwAIgfS6QRASu6Bth/PVSd4YmRS9ojsN1k4+lRRmaXORMuvQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2fIGCRA9TVsSAnZWagAAb/YQAIMjVPpHS/OKXkOlIKtw\nq9evQC5fM9ZAK+i2ROCPPunuasIDrFGF7mzhtoi1G0HDuYgKwVWUyCQ6pL2G\nA2IR64u1/a3qKftHkw+/58fgettSb5x1s9/7FIX6GNjfFFd5eQPla32YZlne\nfH3Dsfb9BOvwhV27nhNM/B3MyNwr1QFQ7sQ3GAqoJEKxziyvb1p/0nMzWfB8\nCVepCjbXhuqA0INIlDQeKPxUf8EpLyy13CxkfdGwtbMva3V+qjF3PO+yU+Qo\nzhqeCgZlJXYAZ/PDbhcmzTXNkcoh5noN45YOtf+BR4vHP3+5H5gCpYAL80ub\ngaShNcRlh/ApXbnwjZhE+TFHl3PzI24SfPivHCJKeJHb24CqzT7k3mmMqJ/k\nd5loTd0EaiN0xo8lNhJi4/5QtO5G30IKh/pQRXleCbDgTXa28EBzWHfGOQXW\n9efTCjh5EY1GCa3V2htZ2Lg2rcj7PE5LJWpSf1zZwu/Peca9QIV2Bi9JOVjO\n+tDSPlTDFJ2Zs4adAGxSxaKVBqlS8Qe8eTahMEOuPQLTci6hoxw1eM3lS5BH\n74eAgDeY2CwzbEsT0OJ6fltZiD8gmVTtn2/Dz4yJ7G03mQ5dTMC0M0zh4iPB\nftSmhEOoGKTNhcGlLH6ITd0TxpJ+khyqpZbIBv8akwzW8qBz5ry4NB61zcNJ\nBECo\r\n=JqVl\r\n-----END PGP SIGNATURE-----\r\n","size":2924,"noattachment":false,"key":"/@turf/centroid/-/@turf/centroid-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 centroid module","directories":{},"sideEffects":false,"_nodeVersion":"14.8.0","dependencies":{"@turf/meta":"^6.5.0","@turf/helpers":"^6.5.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.5.0_1625912254533_0.19729832979982764","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":1625912254654,"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":1625912254654,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}