{"name":"@turf/centroid","version":"6.3.0","keywords":["turf","geojson","geo","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/centroid@6.3.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"e86611e1e171fb0a38ade30453351a00e04956a3","tarball":"http://registry-npm.ywwl.com/@turf/centroid/download/@turf/centroid-6.3.0.tgz","fileCount":7,"integrity":"sha512-7KTyqhUEqXDoyR/nf/jAXiW8ZVszEnrp5XZkgYyrf2GWdSovSO0iCN1J3bE2jkJv7IWyeDmGYL61GGzuTSZS2Q==","signatures":[{"sig":"MEQCIGd46J/X1CYudasNt5xD940+Z7CARdYqZYOjnWuYGkyhAiBag8Uc8HxXlN4KI54kU1TdjaSt0EjyTGO0AL2GuBE0Eg==","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\nwsFcBAEBCAAQBQJgCECWCRA9TVsSAnZWagAAC5cP/A6WDZb+q1ofseCp5Wu1\nRQ1TAr8XOFMpWPbRq/cH/l09x1HJMXZElFUhiNoJsNT0KYhn1/GX4yj7AJZo\nQa0Yd38jfhSYDsQg0s9wJez2RsUQHvbnxvjyTy0W/4NMwMYnovmA5No/6cEc\nNfFz7JT0cpR7qkOKgVCCh9TKngh89I4Q2HsdSfab2+7so2r2Imyv7lW2t7no\nZ4d06e4RLVfAgu5zeK/M4eoJz6JikUpxpz8U9vw0qKqZnIKMnBuFQZMq11Bk\nOZKij9uTj2NAY4lN/ydw4gq/OhMrGd6l8cmYYvXvu1TwjXKr0WtHHQLUMvj8\nzu+MUe9p1SfTjBon2vOVFOEQ/EZ7rn4SV/AvQgjig1XPkAdY23YUT1coYeH1\nQ9goCIIRE5fEw2F63yXvRTfh61s5mPRYHK/zrQ/Byd1G5ZVCkWF5SWcxujZC\nk56g/QGZRpyduHumZX8vqAio0xCLboNKSz7yXMDF4yqMD6N9I4ybZ0SVo/u3\n5g4hxXRzaLT/oFaWXfq8pWMoSzLa+aKN8FNahtwULL3HTp1pkbbxLDfzN/ta\nDFCwKnuK/UsAtE+zFzn9V5E3+OhQeQ/ra8sie7npWtANAowkyXV05Ns+AN8+\nQyfv2Q6yBLawADGgdmpsjCM9iS1SPlGWNoYE3DwoMfJIuT+1jgdbcXea+Pbh\nnGJG\r\n=r60R\r\n-----END PGP SIGNATURE-----\r\n","size":2892,"noattachment":false,"key":"/@turf/centroid/-/@turf/centroid-6.3.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":"57c8877e1e2d67effc2cdd23385c02b2a6615a49","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.3.0","@turf/helpers":"^6.3.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.3.0_1611153558388_0.09705237782122245","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":1611153558529,"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":1611153558529,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}