{"name":"@turf/centroid","version":"6.4.0","keywords":["turf","geojson","geo","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/centroid@6.4.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"4624a07c0b7eca9f0c2b4eb8e45bc6f88306626a","tarball":"http://registry-npm.ywwl.com/@turf/centroid/download/@turf/centroid-6.4.0.tgz","fileCount":7,"integrity":"sha512-p78MVeJ3InVZzkBP4rpoWTUspsRqsW6a/fGuigfjizHz+YqTRXyG7HDkqoR8IwLwpQC83Nlw5kyacgMlgEbN+Q==","signatures":[{"sig":"MEYCIQDF30RIXGzEMQpoSSHwdXoaw9p5Di5YdgrNGUX76WAB2AIhAMj0UPjzwDTswv86AZR6mJtZpvQ4YfDgNXf01Ny99O6u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy06HCRA9TVsSAnZWagAAT6gQAJ0cuX6iuoaCiS3F7xLP\ns/zmZkwgVdE4GZZGq4GJROMQY1cDnj6z5BsXHg2FZdUdfW3P2e8aJpYfFCAy\ngxI/+fkO6S0+XjCJN9TXxV6efzOZH9d071i6jyrg3201Ofn88E+X4FK5AkTm\nfsWLPE8wkmhNXx7qVZBSmGR7uc5hrjxCwX4zIq9dLyzfklowZVE1wpE0LuI3\ngx29fxAjPKPB1scK3bNimpYRRad7iiCzvxQR/rhBKYLg+KCYbOv1Lby2H2Xw\n97xnQD32da9uUYHeYOuxOzc4GS9cD+og8aD0rIu1+iy4CEWJceQm5OXQ4WNF\nugpMAm04cBSlX4iCgxUGQp4hN1JdsuGPHYjDmJ94cYw5E4DS3KgsT0gZ0SXe\nAX1IkqhNggWJSUXyLMOfkUABh3yiGAv0152lXl5GqN93FfrNCcalNdlu+/eR\nbhxbcA7JaxTqjtp57SUxzqgJXMDx+ZmvZU9W/g5q1nSbab0tTFPS+9GEuSfl\nvgKG0qmqhRHXLsvEvdBtPjmegnONvEV08goRA22+e+7c/X6ZfwbmAxd66kBd\ngRIMkbcwFlgpPfb9EZ+iqSptjPpLSPO6Kfsqalr9fdikaG6XcDl2E0TDpJHS\nL7vErw7i6x7tvtvsLIbkPX9A1v26xM4+N9kvNRhve1m5GKDDmqSH/tiMy0Hd\nx/Sm\r\n=pUHf\r\n-----END PGP SIGNATURE-----\r\n","size":2898,"noattachment":false,"key":"/@turf/centroid/-/@turf/centroid-6.4.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":"1e62773cfc88c627cca8effcb5c14cfb65a905ac","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/3.20.2/node@v14.14.0+x64 (darwin)","description":"turf centroid module","directories":{},"sideEffects":false,"_nodeVersion":"14.14.0","dependencies":{"@turf/meta":"^6.4.0","@turf/helpers":"^6.4.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.4.0_1623936647285_0.46131949464359256","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":1623936647417,"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":1623936647417,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}