{"name":"geojson-rbush","version":"3.1.2","description":"GeoJSON implementation of RBush","main":"index","types":"index.d.ts","scripts":{"pretest":"tsc types.ts","test":"tap test.js --coverage","bench":"node bench.js","docs":"documentation readme index.js --section=API"},"keywords":["geojson","index","tree","spatial","rbush"],"author":{"name":"Denis Carriere","email":"@DenisCarriere"},"contributors":[{"name":"Vladimir Agafonkin","email":"@mourner"},{"name":"Denis Carriere","email":"@DenisCarriere"},{"name":"Jordan Rousseau","email":"@jvrousseau"}],"license":"MIT","devDependencies":{"@turf/bbox-polygon":"*","@turf/random":"*","@types/node":"*","benchmark":"*","documentation":"*","load-json-file":"*","tap":"*","tape":"*","typescript":"*","write-json-file":"*"},"dependencies":{"@turf/bbox":"*","@turf/helpers":"6.x","@turf/meta":"6.x","rbush":"^2.0.0"},"gitHead":"bcb8bbe9606ec683f836041f547bd05f80c7a703","_id":"geojson-rbush@3.1.2","_nodeVersion":"11.9.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-grkfdg3HIeTjwTfiJe5FT8+fGU3fABCc+vRJDBwdQz9kkLF0Sbif2gs2JUzjewwgmnvLGy9fInySDeADoNuk7w==","shasum":"577d6ec70ba986d4e60b741f1df5147faeb82c97","tarball":"http://registry-npm.ywwl.com/geojson-rbush/download/geojson-rbush-3.1.2.tgz","fileCount":6,"unpackedSize":15716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5FTcCRA9TVsSAnZWagAAT4cP/0pFr4MXbtekKX0pYgy6\nB13oLpw0pdbYVdocWc2e83AostQV3eSTG+xontocfNw2qhwc7Wq4qmyprA45\n4ZFA51/ygMy67bItYV/UcoayPZTjSKZKpx0yevDfODFrjjpES1U0gSTepKb9\nGsAs8TfKSm2nX93DwU1snUVRcAFYcUjbA7OSSOVIOshA14Sen19SZM3rdwgl\nocp2JnJ8v9wpHo82zJLk4p3ohQR6djzZrQf6AiYI6qESqwwjd4rqHUjLY70k\nPsINRMboTYEl3EQGuUE+xeHJqkkT3WjEYeWTNrJ3m3ivm9W8kQinempI8P+C\nCJjDD5NKuZ8UXPBUgRwR7bC++RZJ1zVyrRbXkLzpxrTUoppUF1RRkJqU5zfV\nLK8CDhM2UnU4tfjEmdmIm0nIyqk+uhn5BCMOebBIM5VVsBplGFKOC7mtv9Rz\nbl4OlEQqL9Ijp65i5SVXemvRLmstOZ3+LBoZddGL9t7oZUy1B8TFIm/pOnwX\n2nGpj1mvDd1WRdi1qWbdKNbV9i5r7HuQgbWWOL+wpk/utMwoCMIBjBLMY/YC\nNjhaIM03gVz1CIzeFkQKMbTGWKqkgA2ki46cC/K7FTutg1l/kiKp7WvbbSMb\n1GWk3lbPaj8Lpy6zRYGx5hh4NEpsCgDwxX2RuGqYRJ3oecoY34lGDCGoi6dE\nqbYN\r\n=4EB6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAx8NvhBORKqBPBqGx+8LDfdI++FWb2YKuwwTTAxPiuPAiEAzjsPwReVVtprGfjFP536ih7rByBfq+//NMjkT9J/NNI="}],"size":4586,"noattachment":false,"key":"/geojson-rbush/-/geojson-rbush-3.1.2.tgz"},"maintainers":[{"name":"deniscarriere","email":"carriere.denis@gmail.com"}],"_npmUser":{"name":"deniscarriere","email":"carriere.denis@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/geojson-rbush_3.1.2_1558467804035_0.3272393333205388"},"_hasShrinkwrap":false,"readme":"# GeoJSON RBush\n\n[![Build Status](https://travis-ci.org/DenisCarriere/geojson-rbush.svg?branch=master)](https://travis-ci.org/DenisCarriere/geojson-rbush)\n[![npm version](https://badge.fury.io/js/geojson-rbush.svg)](https://badge.fury.io/js/geojson-rbush)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/DenisCarriere/geojson-rbush/master/LICENSE)\n\nGeoJSON implementation of [RBush](https://github.com/mourner/rbush) — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles.\n\n## Install\n\n**npm**\n\n```bash\n$ npm install --save geojson-rbush\n```\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n-   [rbush](#rbush)\n-   [insert](#insert)\n-   [load](#load)\n-   [remove](#remove)\n-   [clear](#clear)\n-   [search](#search)\n-   [collides](#collides)\n-   [all](#all)\n-   [toJSON](#tojson)\n-   [fromJSON](#fromjson)\n\n### rbush\n\nGeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index.\n\n**Parameters**\n\n-   `maxEntries` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 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](https://github.com/mourner/rbush#data-format)\n\n**Parameters**\n\n-   `feature` **Feature** 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](https://github.com/mourner/rbush#bulk-inserting-data)\n\n**Parameters**\n\n-   `features` **(FeatureCollection | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;Feature>)** 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](https://github.com/mourner/rbush#removing-data)\n\n**Parameters**\n\n-   `feature` **Feature** remove single GeoJSON Feature\n-   `equals` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 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](https://github.com/mourner/rbush#removing-data)\n\n**Examples**\n\n```javascript\ntree.clear()\n```\n\nReturns **RBush** GeoJSON Rbush\n\n### search\n\n[search](https://github.com/mourner/rbush#search)\n\n**Parameters**\n\n-   `geojson` **(BBox | FeatureCollection | Feature)** 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** all features that intersects with the given GeoJSON.\n\n### collides\n\n[collides](https://github.com/mourner/rbush#collisions)\n\n**Parameters**\n\n-   `geojson` **(BBox | FeatureCollection | Feature)** 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](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if there are any items intersecting the given GeoJSON, otherwise false.\n\n### all\n\n[all](https://github.com/mourner/rbush#search)\n\n**Examples**\n\n```javascript\ntree.all()\n```\n\nReturns **FeatureCollection** all the features in RBush\n\n### toJSON\n\n[toJSON](https://github.com/mourner/rbush#export-and-import)\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](https://github.com/mourner/rbush#export-and-import)\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","publish_time":1558467804181,"_cnpm_publish_time":1558467804181,"dist-tags":{"latest":"3.2.0"}}