{"name":"@turf/centroid","version":"6.2.0-alpha.1","keywords":["turf","geojson","geo","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/centroid@6.2.0-alpha.1","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"9dbe4b153cdeb9ffac687749a4d28de92b07052c","tarball":"http://registry-npm.ywwl.com/@turf/centroid/download/@turf/centroid-6.2.0-alpha.1.tgz","fileCount":6,"integrity":"sha512-XQAaHv+OaClwo5tWfPtOkmdFLxgcj9XBr1NssNgA43bMSSfQ7EMiFE6E1ImEDTOQQQ3bjcpEcM85TrhAuxMFgQ==","signatures":[{"sig":"MEYCIQCjidrTTXKpzNg00rtDPz1QNGlUCIJYpHa2wKsoyIdNRgIhANgFCzK7KOX6MqjdcG7p4uZr/DUuWMeaEf1ruoFCEvLe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefUJmCRA9TVsSAnZWagAA668P/RJATasv1JcUi1nsMIhB\nM7t7xL0qbIlvBzz6BOCS7VbRU5+jqhEYlMFP3ehDQBEc3mva0zTj5yoay0us\nnsU8PVMFcdPyCNaJIk6iVLQcTL4blNaptrDkxke+NED0Onx43Hvcbrcuqaeg\nnxfFnAjq/xcpzSVUEZBu1V6aS4d1TVzTP6+9nrslo7np5TFxpS0sv3Vj1cdx\nhvkha3o6h8v4thAacFYnjUZL0iNxTrVCMHzjmqT40XgX3gr2e39fqjJ8b2g7\nmgJOk4UxubBuz/g5iIYH7CUf8HRzaa2/O0hU6+3w94PdYNHa9KjT0098SV+p\nxp5kk08fa9taBbV+QaCUINGVZfqpZ3ZfbKk/XDmqDYNond8v8UJ8HRNQ0Mnf\n+W8RtNdvBBzlPQqX3PmE8g3/tdYFEiExxc7bLmbN+riHjuvOUOvo1nezxBiq\nPFXtUVfOupMkLfKsYopT/CWp7mWOMnloI5dPqY8Xh7LMxZt7vST5KRUxBtvC\n6r88R+edex3EJQKXxI4FqQQJBV3z9phLCD3+A6nnqpfHBalHT4cCXmT+2y3t\nZcY39fNj3P/PiYqxWdUcYWh49qJredwytccRt9PtsBmeyZoKxNgf4EDl4sUn\nvOt7URiBpfxag8FPCiQSZJZAJ/1+lixx5227svTPXEx+D0mEhmEFueOij1v8\njcat\r\n=xFus\r\n-----END PGP SIGNATURE-----\r\n","size":2774,"noattachment":false,"key":"/@turf/centroid/-/@turf/centroid-6.2.0-alpha.1.tgz"},"main":"dist/js/index.js","types":"dist/js/index.d.ts","module":"dist/es/index.js","gitHead":"fc519c045a8931c1e14eab9160a7e28391f8da02","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.1","@turf/helpers":"^6.2.0-alpha.1"},"publishConfig":{"access":"public"},"_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.1_1585267301665_0.8972294500466669","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":1585267301844,"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":1585267301844,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}