{"name":"@turf/center-of-mass","version":"6.2.0-alpha.3","keywords":["turf","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/center-of-mass@6.2.0-alpha.3","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"72064ccc58930f02deb17adf3f6652a0d609d4c8","tarball":"http://registry-npm.ywwl.com/@turf/center-of-mass/download/@turf/center-of-mass-6.2.0-alpha.3.tgz","fileCount":7,"integrity":"sha512-SUcLT4Cg/9xuGMqPtmnFLR0GDBqjH1IZOY+D/W0b7sPNapzgs9nOvEIKcMbDBqTypHFwI3BxAZaIAJmsanurPA==","signatures":[{"sig":"MEUCIFyi6Gyd63vpPcW8g5yVGGwxr4//pOWS8svxjtnHPwH4AiEAhARCxGufxZiM8463AX3Bv951up7C6Oc4Z0JHFNThc88=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0o2LCRA9TVsSAnZWagAAW+YP/AnymP0AngM9JDCqS7mO\ngdVx0WfnR+s+GlUZByI6K7GbngY3Vsm1hstZf4Y0DYWL1Ec2HkJv6RMYMwlj\nkGFtKUGJRaXZ6AB7Hu4fpQm3TuZKsPJe3fReMaB8QGvtxDii5ct1p7JjqE22\n1juZkOxiUncnK+b9N2CilUdbhftMHd9ejMcyRqsintMkDqOGmz9fc5enpnQ7\nCty0u9F2KAAd8oIStH6IVFqG15rwH9s6hqzcg9FlOZkxVhKveUs4Y942F/Jr\nfFqOPg8Mz2AuYl99XKK5siSxDvADH7rBbfXOdcGJHNiKDOiGMBYtmqabcWCr\nBgHH9xTqCODbPwiWbLV8zzF+d8yfRY2q5M2u7EO8JwzS+RNl475MzanH6io5\ndV3Kv1/2hnOxN4SLXp/MCRzsQ9kaLK4otSZjlOhrZRK+7hse222RhpxAprMp\nb3S7qehM21Qd/HxCdELlHO8TsciE3EvxNFKoTWlIcbLEVhlsDzWWM9/3lw/N\nv9keSYfAK9Y+qM7QFaXiUsPlBqjW9bKsuzEStYpvEzDFl/ndTZpPYrjKSRtn\npRflOIgKgjdOUqAyZqB72i7bEDQqAIF9Rlgw1ZdVt7EJYs1b7nEVGJywz3Wu\noPDF8HCCLNgANVjsVewWXpL4OSye4hDHtKI0MemmNGfOxVlGw1I7cazrNdxv\njjNN\r\n=Ovy3\r\n-----END PGP SIGNATURE-----\r\n","size":3794,"noattachment":false,"key":"/@turf/center-of-mass/-/@turf/center-of-mass-6.2.0-alpha.3.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"},"gitHead":"dce9edfc705352e8cb9e0083c9330ba0e8d77409","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 center-of-mass module","directories":{},"sideEffects":false,"_nodeVersion":"13.10.1","dependencies":{"@turf/meta":"^6.2.0-alpha.3","@turf/convex":"^6.2.0-alpha.3","@turf/helpers":"^6.2.0-alpha.3","@turf/centroid":"^6.2.0-alpha.3","@turf/invariant":"^6.2.0-alpha.3"},"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":"*"},"_npmOperationalInternal":{"tmp":"tmp/center-of-mass_6.2.0-alpha.3_1607634314941_0.6222356895645649","host":"s3://npm-registry-packages"},"readme":"# @turf/center-of-mass\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## centerOfMass\n\nTakes any [Feature][1] or a [FeatureCollection][2] and returns its [center of mass][3] using this formula: [Centroid of Polygon][4].\n\n### Parameters\n\n*   `geojson` **[GeoJSON][5]** GeoJSON to be centered\n*   `options` **[Object][6]** Optional Parameters (optional, default `{}`)\n\n    *   `options.properties` **[Object][6]** Translate Properties to Feature (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 center = turf.centerOfMass(polygon);\n\n//addToMap\nvar addToMap = [polygon, center]\n```\n\nReturns **[Feature][1]<[Point][7]>** the center of mass\n\n[1]: https://tools.ietf.org/html/rfc7946#section-3.2\n\n[2]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n[3]: https://en.wikipedia.org/wiki/Center_of_mass\n\n[4]: https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon\n\n[5]: https://tools.ietf.org/html/rfc7946#section-3\n\n[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[7]: 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/center-of-mass\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":1607634315053,"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":1607634315053,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}