{"name":"@turf/centroid","version":"6.2.0-alpha.2","keywords":["turf","geojson","geo","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/centroid@6.2.0-alpha.2","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"8560b7643cc599c74fe32c8196fb6a8e60412776","tarball":"http://registry-npm.ywwl.com/@turf/centroid/download/@turf/centroid-6.2.0-alpha.2.tgz","fileCount":6,"integrity":"sha512-40FqdRNcnfyTSkyR+8ge8rr8NMdM4lsTTfLJT4Q1ni/A9yumIGysJO6KQedVcX/HtjHKjdT6+i8/aDjK8gaVIA==","signatures":[{"sig":"MEUCIQCQLNdk0eFH39Kp5DNO+5AtHaM+MG+qaByp4Zizf6o2yAIgQ41J2Elpf+BfD98T6rqkx4vS5PLwfw5FoaI4gTHPFdI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDHJOCRA9TVsSAnZWagAAeFEP/14b1JVv+NFVQIOyDbDF\nsWWPLiwP4g9tJq9UhnOTTwyY5s38FvzNgNE332dfNQYcmwGJOrmjVMTHJWI5\nV4Hey1fJqQ+TZA/OEZe1A3ynm3LluimH2eeXqzs3s3fynDl0PVvSJ27B3Nw+\nCHedd3xq0jFTq53xidX4eShIo6mJw6wsSp6gqbeLDfmQ6AdvOVN14yd5sU4s\nZ8ZoXscMdPrL8eEhEq3NpE6lcCyOZVoDakR5XemgSJZXCJoYNah4q1e0DQmo\nL8Y8AXDA1ydhWSLPVnWlRWmhx+ZSyHr8qCEDUSC04KYwAGVkXXRtxw2Y0EIO\nZa0lZ9KdY1RK2OSNsr3AaNu8Ts8DSzJ3JjVcCMJVzJxTeCpanO3YCUqER0Y4\nykJMudnkDZ0Z3iEgP7muIqGcB46FfNDb/4KfKOaLqPYy1mjSzfFMJF5SVkko\n6eWNCngaxsKexoGOVkq0udna6EtFjMEm3Dsq89kN+YswRP2RfOYR6wm4KY+O\nE+NFDRmmLuic6lZVpU3s7Bn/9xDPYy5FGmTt08eWvMlOG7mbAHBgG46v3rWl\nSOSjIW5LQ518TL738jBvN9ZSYBdr4+TMCAzO29LeMeHuFFDICKu93kLbgIf/\nMbV1dBhE2jKyzgI5atouXpm8btFDDqfBHErD3wK5hJ0ekrwY0pv1QvZio3E9\nZbjQ\r\n=rXLN\r\n-----END PGP SIGNATURE-----\r\n","size":2784,"noattachment":false,"key":"/@turf/centroid/-/@turf/centroid-6.2.0-alpha.2.tgz"},"main":"dist/js/index.js","types":"dist/js/index.d.ts","module":"dist/es/index.js","gitHead":"23d5cb91d77e0c1e2e903a2252f525797f1d0d09","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.2","@turf/helpers":"^6.2.0-alpha.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"glob":"*","tape":"*","tslint":"*","benchmark":"*","typescript":"*","@types/tape":"*","npm-run-all":"*","load-json-file":"*","write-json-file":"*","geojson-fixtures":"*"},"_npmOperationalInternal":{"tmp":"tmp/centroid_6.2.0-alpha.2_1594651213610_0.8810654209755437","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":1594651213749,"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":1594651213749,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}