{"name":"@turf/centroid","version":"7.0.0-alpha.0","keywords":["turf","geojson","geo","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/centroid@7.0.0-alpha.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"500b854cbc07e4aa6b85590b5f70d5698d2e6846","tarball":"http://registry-npm.ywwl.com/@turf/centroid/download/@turf/centroid-7.0.0-alpha.0.tgz","fileCount":7,"integrity":"sha512-8Krw5dPrbHXdZ4CT6Y14lpQ4Lm+7ZHhAEtzr0uvGIu4EUGSeZ2mI0HmxVkWNEfTxaF0/q9uP4kQdgwsg0BZQwg==","signatures":[{"sig":"MEUCIB0L4mCSv4OWLTZa+9vtbraRvcfB5g+1Vmyf968C63O9AiEAtARfCn6hymcgYDaooaCmJQt9xxUTQSZyqpCIRIQyk7o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja8OpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5Ug//ZLw0NB6t8GdMb1zyHydaEq59I0EIbnoe6TKWAeN/z5J0YPhg\r\nrVXMqrrJFcD6++bXkWx5Wm1sXg3oBY8sl4Kjveg70Pr+r5beR2ANe1F5jJc2\r\nuitVlt/DNcdk4Xn9eltQCqOXnwNh+E/R39/2E+0HVHvs6vBd/5smhJgcsNfQ\r\n9YPOFkaYLuYds29K8cbn744SHVa2Ga/HZc83jAwT0s0Hob3wtH7g9MBT6GoU\r\n5W7701sFedkgtB0gGv6i6n8U2C5mDMZX930CX35JA7Ity/vBzChwYekU84P3\r\nbkj0dkVrdBdo8hOchzMKPax9f031KvtTD/HGtantLAUVkiIaiPibr6MaWk9N\r\nqS9/S+w6C9O493/ad0GSF84y8dh6cIsZKD1ihda6YwdZj6+cWI6h7KfpF1N5\r\nABYf5NJcGBamHBrAyicVsmgWAjO0Mkio3dUxB/hlW9mW7/NLCk0Pl81T9yaH\r\nIMQs97edKyuV0CqZIu84F2VYOoNwuae3UCg5dLLM2wfzey5eivsyRw5l3J8T\r\nQ0lB1oHYBG/th2axhh98irNcDzdnCOV0uVNUYYcNHjIMc1cjCj9EdJ1wvd6a\r\nsYQGCaMGs7SEAlonSIxEEZKwCLmQLM0YBpfmOmW3vWYpO+XskvOxG/qf0Evf\r\npwpYXdodlUQLNaU8A3kIxnWmGTT/QfzwOi0=\r\n=fGM6\r\n-----END PGP SIGNATURE-----\r\n","size":2870,"noattachment":false,"key":"/@turf/centroid/-/@turf/centroid-7.0.0-alpha.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":"0edc4c491b999e5ace770a61e1cf549f7c004189","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 --strict types.ts"},"_npmUser":{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v19.0.1+arm64 (darwin)","description":"turf centroid module","directories":{},"sideEffects":false,"_nodeVersion":"19.0.1","dependencies":{"tslib":"^2.3.0","@turf/meta":"^7.0.0-alpha.0","@turf/helpers":"^7.0.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","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_7.0.0-alpha.0_1668006824969_0.575228032076897","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":1668006825129,"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":1668006825129,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}