{"name":"@turf/geojson-rbush","version":"3.2.1","keywords":["geojson","index","tree","spatial","rbush"],"author":{"name":"Denis Carriere","email":"@DenisCarriere"},"license":"MIT","_id":"@turf/geojson-rbush@3.2.1","contributors":[{"name":"Vladimir Agafonkin","email":"@mourner"},{"name":"Denis Carriere","email":"@DenisCarriere"},{"name":"Jordan Rousseau","email":"@jvrousseau"}],"dist":{"shasum":"2efb7b1dd7f2605607e6488dba28ca0c841828cf","tarball":"http://registry-npm.ywwl.com/@turf/geojson-rbush/download/@turf/geojson-rbush-3.2.1.tgz","fileCount":6,"integrity":"sha512-kZvfdbjiq/xjjCAVQ0AnWLiwLPf5f24WEHPbSdHvW56vY7JrREKyUeK21T1muAsmfLzexGCBqawCe1Wn4sfG3A==","signatures":[{"sig":"MEUCIG0ljPo6F+3tGhCWBtxrbd+kz9T2Sr+PUREUbVyRXvUcAiEA6SHqWOSWHwDFhg93Yk0jTl7gJn//L35csGy2Sk0/UUQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwlHKCRA9TVsSAnZWagAA+lMP/RPa8tTDi+nqtrmsCBwk\noEEVJ43KPsYRk62Eo8peUOGCJFk9KeYfBkEi3Egnnon9bbOXBaFBauh7zDWk\nisZdi8u9eL5Vjy3ry8/hsRdhjNadaQxPc2hFH061vjn1nAKi8m6P7UWC6U5B\nOrRhL78KemIs5NVvBbiXSefA9Iz6IEBzj5Vtx5inYJZCLNdsFJE35cHyQYj1\nDPFADmxpdZoqprOtlO57tuPq2gZmMPl4eXDiuSEK7K+6nPq/YL5B71bzGj2/\nsRkbLJnjqrJ7liUVAFDc+JM9AmHGLVv/NzptZ/jrdlxj1harQsesWiIbDZA4\nZiXuDy4jgkstm2hUigkamkejx5S1/nv+qTHGNWG++6n3HG8e+3JLzegKpJtD\nbIfA7eE0GEi8K+P6pDnNGvJ9pqp36BhONgvZ4/YbPsDkEGvpHI59TdRFJksS\n72LdLMalEjbDn1gTou0wICBhifW3vOfA5iDnMHOwGqhH1urgduYEjK3LIde4\nyZTiNcWcLoZtxjasl55ADqxs+tQ6kNPMHFY5M74wj6yFj/viv7YWahxNyu3U\ngWTN2WGY9exnhDxFcGhoOsAp8sw8H4aDnbLmrYVK+dRBQBCD6E5ck5of+gth\n7w/FRzP6Dj7TZyLgflU19aK0KV74DJQC1m6U+vrg0Tps618edb3/Ak2jgG02\nriR+\r\n=vgkk\r\n-----END PGP SIGNATURE-----\r\n","size":4665,"noattachment":false,"key":"/@turf/geojson-rbush/-/@turf/geojson-rbush-3.2.1.tgz"},"main":"index","types":"index.d.ts","gitHead":"e36e77ac67ad7e62a0e1ccdd511a62b8d64d04ea","scripts":{"docs":"documentation readme index.js --section=API","test":"node test.js --coverage","bench":"node bench.js","pretest":"tsc types.ts"},"_npmUser":{"name":"jamesmilneruk","email":"jamesmilner22@hotmail.com"},"_npmVersion":"6.14.14","description":"GeoJSON implementation of RBush","directories":{},"_nodeVersion":"14.16.0","dependencies":{"rbush":"^3.0.1","@turf/bbox":"*","@turf/meta":"6.x","@turf/helpers":"6.x","@types/geojson":"7946.0.8"},"_hasShrinkwrap":false,"devDependencies":{"tap":"*","tape":"*","benchmark":"*","typescript":"*","@types/node":"*","@turf/random":"*","documentation":"*","load-json-file":"*","write-json-file":"*","@turf/bbox-polygon":"*"},"_npmOperationalInternal":{"tmp":"tmp/geojson-rbush_3.2.1_1640124874307_0.8641412591157092","host":"s3://npm-registry-packages"},"readme":"# @turf/geojson-rbush\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## rbush\n\n### insert\n\n[insert][1]\n\n#### Parameters\n\n*   `feature` **[Feature][2]** insert single GeoJSON Feature\n\n#### Examples\n\n```javascript\nvar poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\ntree.insert(poly)\n```\n\nReturns **RBush** GeoJSON RBush\n\n### load\n\n[load][3]\n\n#### Parameters\n\n*   `features` **([FeatureCollection][4] | [Array][5]<[Feature][2]>)** load entire GeoJSON FeatureCollection\n\n#### Examples\n\n```javascript\nvar polys = turf.polygons([\n    [[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]],\n    [[[-93, 32], [-83, 32], [-83, 39], [-93, 39], [-93, 32]]]\n]);\ntree.load(polys);\n```\n\nReturns **RBush** GeoJSON RBush\n\n### remove\n\n[remove][6]\n\n#### Parameters\n\n*   `feature` **[Feature][2]** remove single GeoJSON Feature\n*   `equals` **[Function][7]** Pass a custom equals function to compare by value for removal.\n\n#### Examples\n\n```javascript\nvar poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n\ntree.remove(poly);\n```\n\nReturns **RBush** GeoJSON RBush\n\n### clear\n\n[clear][6]\n\n#### Examples\n\n```javascript\ntree.clear()\n```\n\nReturns **RBush** GeoJSON Rbush\n\n### search\n\n[search][8]\n\n#### Parameters\n\n*   `geojson` **([BBox][9] | [FeatureCollection][4] | [Feature][2])** search with GeoJSON\n\n#### Examples\n\n```javascript\nvar poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n\ntree.search(poly);\n```\n\nReturns **[FeatureCollection][4]** all features that intersects with the given GeoJSON.\n\n### collides\n\n[collides][10]\n\n#### Parameters\n\n*   `geojson` **([BBox][9] | [FeatureCollection][4] | [Feature][2])** collides with GeoJSON\n\n#### Examples\n\n```javascript\nvar poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n\ntree.collides(poly);\n```\n\nReturns **[boolean][11]** true if there are any items intersecting the given GeoJSON, otherwise false.\n\n### all\n\n[all][8]\n\n#### Examples\n\n```javascript\ntree.all()\n```\n\nReturns **[FeatureCollection][4]** all the features in RBush\n\n### toJSON\n\n[toJSON][12]\n\n#### Examples\n\n```javascript\nvar exported = tree.toJSON()\n```\n\nReturns **any** export data as JSON object\n\n### fromJSON\n\n[fromJSON][12]\n\n#### Parameters\n\n*   `json` **any** import previously exported data\n\n#### Examples\n\n```javascript\nvar exported = {\n  \"children\": [\n    {\n      \"type\": \"Feature\",\n      \"geometry\": {\n        \"type\": \"Point\",\n        \"coordinates\": [110, 50]\n      },\n      \"properties\": {},\n      \"bbox\": [110, 50, 110, 50]\n    }\n  ],\n  \"height\": 1,\n  \"leaf\": true,\n  \"minX\": 110,\n  \"minY\": 50,\n  \"maxX\": 110,\n  \"maxY\": 50\n}\ntree.fromJSON(exported)\n```\n\nReturns **RBush** GeoJSON RBush\n\n## rbush\n\nGeoJSON implementation of [RBush][13] spatial index.\n\n### Parameters\n\n*   `maxEntries` **[number][14]** defines the maximum number of entries in a tree node. 9 (used by default) is a\n    reasonable choice for most applications. Higher value means faster insertion and slower search, and vice versa. (optional, default `9`)\n\n### Examples\n\n```javascript\nvar geojsonRbush = require('geojson-rbush').default;\nvar tree = geojsonRbush();\n```\n\nReturns **RBush** GeoJSON RBush\n\n### insert\n\n[insert][1]\n\n#### Parameters\n\n*   `feature` **[Feature][2]** insert single GeoJSON Feature\n\n#### Examples\n\n```javascript\nvar poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\ntree.insert(poly)\n```\n\nReturns **RBush** GeoJSON RBush\n\n### load\n\n[load][3]\n\n#### Parameters\n\n*   `features` **([FeatureCollection][4] | [Array][5]<[Feature][2]>)** load entire GeoJSON FeatureCollection\n\n#### Examples\n\n```javascript\nvar polys = turf.polygons([\n    [[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]],\n    [[[-93, 32], [-83, 32], [-83, 39], [-93, 39], [-93, 32]]]\n]);\ntree.load(polys);\n```\n\nReturns **RBush** GeoJSON RBush\n\n### remove\n\n[remove][6]\n\n#### Parameters\n\n*   `feature` **[Feature][2]** remove single GeoJSON Feature\n*   `equals` **[Function][7]** Pass a custom equals function to compare by value for removal.\n\n#### Examples\n\n```javascript\nvar poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n\ntree.remove(poly);\n```\n\nReturns **RBush** GeoJSON RBush\n\n### clear\n\n[clear][6]\n\n#### Examples\n\n```javascript\ntree.clear()\n```\n\nReturns **RBush** GeoJSON Rbush\n\n### search\n\n[search][8]\n\n#### Parameters\n\n*   `geojson` **([BBox][9] | [FeatureCollection][4] | [Feature][2])** search with GeoJSON\n\n#### Examples\n\n```javascript\nvar poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n\ntree.search(poly);\n```\n\nReturns **[FeatureCollection][4]** all features that intersects with the given GeoJSON.\n\n### collides\n\n[collides][10]\n\n#### Parameters\n\n*   `geojson` **([BBox][9] | [FeatureCollection][4] | [Feature][2])** collides with GeoJSON\n\n#### Examples\n\n```javascript\nvar poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n\ntree.collides(poly);\n```\n\nReturns **[boolean][11]** true if there are any items intersecting the given GeoJSON, otherwise false.\n\n### all\n\n[all][8]\n\n#### Examples\n\n```javascript\ntree.all()\n```\n\nReturns **[FeatureCollection][4]** all the features in RBush\n\n### toJSON\n\n[toJSON][12]\n\n#### Examples\n\n```javascript\nvar exported = tree.toJSON()\n```\n\nReturns **any** export data as JSON object\n\n### fromJSON\n\n[fromJSON][12]\n\n#### Parameters\n\n*   `json` **any** import previously exported data\n\n#### Examples\n\n```javascript\nvar exported = {\n  \"children\": [\n    {\n      \"type\": \"Feature\",\n      \"geometry\": {\n        \"type\": \"Point\",\n        \"coordinates\": [110, 50]\n      },\n      \"properties\": {},\n      \"bbox\": [110, 50, 110, 50]\n    }\n  ],\n  \"height\": 1,\n  \"leaf\": true,\n  \"minX\": 110,\n  \"minY\": 50,\n  \"maxX\": 110,\n  \"maxY\": 50\n}\ntree.fromJSON(exported)\n```\n\nReturns **RBush** GeoJSON RBush\n\n[1]: https://github.com/mourner/rbush#data-format\n\n[2]: https://tools.ietf.org/html/rfc7946#section-3.2\n\n[3]: https://github.com/mourner/rbush#bulk-inserting-data\n\n[4]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array\n\n[6]: https://github.com/mourner/rbush#removing-data\n\n[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function\n\n[8]: https://github.com/mourner/rbush#search\n\n[9]: https://tools.ietf.org/html/rfc7946#section-5\n\n[10]: https://github.com/mourner/rbush#collisions\n\n[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n\n[12]: https://github.com/mourner/rbush#export-and-import\n\n[13]: https://github.com/mourner/rbush#rbush\n\n[14]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\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/geojson-rbush\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":1640124874536,"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":1640124874536,"dist-tags":{"latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}