{"name":"@turf/hex-grid","version":"3.5.2-alpha.d2c36ee7","keywords":["turf","grid","hexgrid","hexbin","points","geojson"],"author":{"name":"morganherlocker"},"license":"MIT","_id":"@turf/hex-grid@3.5.2-alpha.d2c36ee7","contributors":[{"name":"jseppi"},{"name":"jvail"},{"name":"lyzidiamond"},{"name":"tmcw"}],"homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"55e732d04605c0ed17cc8abc395aa8005e58ba89","tarball":"http://registry-npm.ywwl.com/@turf/hex-grid/download/@turf/hex-grid-3.5.2-alpha.d2c36ee7.tgz","integrity":"sha512-bWhWarthW0cQFxyePcJuMEOLZYxwfjw1d7N81f7c3+Y+IxETdutdMgyYWee7Mx+dAheM0F7aud9064PwCke/cw==","signatures":[{"sig":"MEUCICzDrKCEIvTumMTOzLYP8RSjEvsmm6zMVU4coOH2UsJuAiEA+fDj1eQiRj277HPU1CIg+f4YzuEH90qJN5rVHWnrr5Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":4346,"noattachment":false,"key":"/@turf/hex-grid/-/@turf/hex-grid-3.5.2-alpha.d2c36ee7.tgz"},"main":"index.js","_from":".","_shasum":"55e732d04605c0ed17cc8abc395aa8005e58ba89","scripts":{"doc":"dox -r < index.js | doxme --readme > README.md","test":"tape test.js"},"_npmUser":{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"2.15.9","description":"# hexGrid","directories":{},"_nodeVersion":"4.5.0","dependencies":{"@turf/helpers":"^3.5.2-alpha.d2c36ee7","@turf/distance":"^3.5.2-alpha.d2c36ee7"},"devDependencies":{"tape":"^3.5.0","benchmark":"^1.0.0","@turf/inside":"^3.5.2-alpha.d2c36ee7","@turf/explode":"^3.5.2-alpha.d2c36ee7","@turf/bbox-polygon":"^3.5.2-alpha.d2c36ee7"},"_npmOperationalInternal":{"tmp":"tmp/hex-grid-3.5.2-alpha.d2c36ee7.tgz_1478287979086_0.9656172294635326","host":"packages-18-east.internal.npmjs.com"},"readme":"# @turf/hex-grid\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## hexGrid\n\nTakes a bounding box and the diameter of the cell and returns a [FeatureCollection][1] of flat-topped\nhexagons or triangles ([Polygon][2] features) aligned in an \"odd-q\" vertical grid as\ndescribed in [Hexagonal Grids][3].\n\n### Parameters\n\n*   `bbox` **[BBox][4]** extent in \\[minX, minY, maxX, maxY] order\n*   `cellSide` **[number][5]** length of the side of the the hexagons or triangles, in units. It will also coincide with the\n    radius of the circumcircle of the hexagons.\n*   `options` **[Object][6]** Optional parameters (optional, default `{}`)\n\n    *   `options.units` **Units** used in calculating cell size. Supports all valid Turf [Units][7]. (optional, default `'kilometers'`)\n    *   `options.properties` **[Object][6]** passed to each hexagon or triangle of the grid (optional, default `{}`)\n    *   `options.mask` **[Feature][8]<([Polygon][2] | [MultiPolygon][9])>?** if passed a Polygon or MultiPolygon, the grid Points will be created only inside it\n    *   `options.triangles` **[boolean][10]** whether to return as triangles instead of hexagons (optional, default `false`)\n\n### Examples\n\n```javascript\nvar bbox = [-96,31,-84,40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar hexgrid = turf.hexGrid(bbox, cellSide, options);\n\n//addToMap\nvar addToMap = [hexgrid];\n```\n\nReturns **[FeatureCollection][1]<[Polygon][2]>** a hexagonal grid\n\n[1]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n[2]: https://tools.ietf.org/html/rfc7946#section-3.1.6\n\n[3]: http://www.redblobgames.com/grids/hexagons/\n\n[4]: https://tools.ietf.org/html/rfc7946#section-5\n\n[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\n\n[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[7]: https://turfjs.org/docs/api/types/Units\n\n[8]: https://tools.ietf.org/html/rfc7946#section-3.2\n\n[9]: https://tools.ietf.org/html/rfc7946#section-3.1.7\n\n[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\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/hex-grid\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":1478287980952,"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":1478287980952,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}