{"_id":"k-d-tree","_rev":"5-f296d8c4909cf98031acbd9d74f0bf8d","name":"k-d-tree","description":"JavaScript k-d Tree Implementation","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"k-d-tree","version":"0.0.1","description":"JavaScript k-d Tree Implementation","main":"./kdTree.js","keywords":["tree","k-d"],"author":{"name":"Ubilabs"},"license":"MIT","bugs":{"url":"https://github.com/csbrandt/k-d-tree/issues"},"homepage":"https://github.com/csbrandt/k-d-tree","devDependencies":{},"dependencies":{},"gitHead":"6aab5888b94f630b0d4e869167982b4a838a3ec5","_id":"k-d-tree@0.0.1","scripts":{},"_shasum":"a3437c9369e4fa0fb38bcf7f9f6a9180c7dec3f8","_from":".","_npmVersion":"2.13.4","_nodeVersion":"5.1.0","_npmUser":{"name":"csbrandt","email":"cs.brandt@gmail.com"},"dist":{"shasum":"a3437c9369e4fa0fb38bcf7f9f6a9180c7dec3f8","tarball":"https://registry.npmjs.org/k-d-tree/-/k-d-tree-0.0.1.tgz","integrity":"sha512-lt1yXzM0yqKwwN/tJh4dJ20x1adz41VXva2BFwBBobCgnLNtmVJNgNugKGJ0FaQ081wUPVSamxCY/LIjMxf51Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDa1AHNfysMA9j+ZXXxX4e3DZW8WUPfuwF5VtNxC78/rAiAmXS5MB3rzQXlWUPtLwFrjvfzLsUJYJD75A/OWXYZuTw=="}]},"maintainers":[{"name":"csbrandt","email":"cs.brandt@gmail.com"}]},"1.0.0":{"name":"k-d-tree","version":"1.0.0","description":"JavaScript k-d Tree Implementation","main":"index.js","keywords":["tree","k-d","GeoJSON"],"scripts":{"test":"coffee -c ./test/tests.coffee && make test","coverage":"istanbul cover _mocha test --recursive -- -u      exports -R spec","build":"browserify index.js > dist/bundle.js"},"contributors":[{"name":"Mircea Pricop","email":"pricop@ubilabs.net"},{"name":"Martin Kleppe","email":"kleppe@ubilabs.net"},{"name":"csbrandt"}],"license":"MIT","bugs":{"url":"https://github.com/csbrandt/k-d-tree/issues"},"homepage":"https://github.com/csbrandt/k-d-tree","devDependencies":{"browserify":"^12.0.1","coffee-script":"^1.10.0","expect.js":"^0.3.1","istanbul":"^0.4.1","lodash":"^3.10.1","mocha":"^2.3.4","wgs84-util":"^2.0.1"},"dependencies":{},"gitHead":"33db82d4ad341e17e015d6125246ef2b45bf20ee","_id":"k-d-tree@1.0.0","_shasum":"17147a00a0a4ff49c0363f8df5441a45488e8f6f","_from":".","_npmVersion":"2.13.4","_nodeVersion":"5.4.0","_npmUser":{"name":"csbrandt","email":"cs.brandt@gmail.com"},"dist":{"shasum":"17147a00a0a4ff49c0363f8df5441a45488e8f6f","tarball":"https://registry.npmjs.org/k-d-tree/-/k-d-tree-1.0.0.tgz","integrity":"sha512-hg5/rHwlSbvRVkYOB9FGGntj22uysMOob4NyHx8nC9AAsEP+OxKuwTJu4QY3tB2VuStr7BlSq7bXo9FgOTbYyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3RLOzap3POE2VQjUcKXg1WThDZKNQF54lJhd2L8hUFAiB7dhWIdzrgpEI2L7M5NIflLm3GMW+WwidcOztpHEWqAA=="}]},"maintainers":[{"name":"csbrandt","email":"cs.brandt@gmail.com"}]},"1.0.1":{"name":"k-d-tree","version":"1.0.1","description":"JavaScript k-d Tree Implementation","main":"index.js","keywords":["tree","k-d","GeoJSON"],"scripts":{"test":"coffee -c ./test/tests.coffee && make test","coverage":"istanbul cover _mocha test --recursive -- -u      exports -R spec","build":"browserify index.js > dist/bundle.js"},"contributors":[{"name":"Mircea Pricop","email":"pricop@ubilabs.net"},{"name":"Martin Kleppe","email":"kleppe@ubilabs.net"},{"name":"csbrandt"}],"license":"MIT","bugs":{"url":"https://github.com/csbrandt/kd-tree-javascript/issues"},"homepage":"https://github.com/csbrandt/kd-tree-javascript","devDependencies":{"browserify":"^12.0.1","coffee-script":"^1.10.0","expect.js":"^0.3.1","istanbul":"^0.4.1","lodash":"^3.10.1","mocha":"^2.3.4","wgs84-util":"^2.0.1"},"dependencies":{},"gitHead":"92849bb017407b2189b1da4910493077960dc1f6","_id":"k-d-tree@1.0.1","_shasum":"fffe35d20e5403a41f4262539382877c939fbca2","_from":".","_npmVersion":"2.13.4","_nodeVersion":"5.4.0","_npmUser":{"name":"csbrandt","email":"cs.brandt@gmail.com"},"dist":{"shasum":"fffe35d20e5403a41f4262539382877c939fbca2","tarball":"https://registry.npmjs.org/k-d-tree/-/k-d-tree-1.0.1.tgz","integrity":"sha512-7vAXhe3xF7vkOH2WERT5ET0aVhUEAzVdwdeU2noVVxsnQDdpNiCK3dNLDHkh2PbaooFLeBd4cbQzaVitK7JceQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDKIppVO0fA32m5oOrM0PqzqVliZr0adTqW1f07jxvbKAiEAwbi6onXeyMY2v0dQTIZkfkVFk69RJOun4FuxNqHzdq8="}]},"maintainers":[{"name":"csbrandt","email":"cs.brandt@gmail.com"}]}},"readme":"[![NPM](https://nodei.co/npm/k-d-tree.png?downloads=true&stars=true)](https://nodei.co/npm/k-d-tree/)\n\nA basic but super fast JavaScript implementation of the k-dimensional tree data structure.\n\nIn computer science, a k-d tree (short for k-dimensional tree) is a space-partitioning data structure for organizing points in a k-dimensional space. k-d trees are a useful data structure for several applications, such as searches involving a multidimensional search key (e.g. range searches and nearest neighbor searches). k-d trees are a special case of binary space partitioning trees.\n\nInstallation\n-------------\n    $ npm install k-d-tree\n\nMethods\n--------\n    constructor(points, metric)\n> Create a new tree\n>\n> **Parameters**\n>\n> **points**:  *Array*,  GeoJSON points\n>\n> **metric**:  *function*,  a distance function\n>\n\n    nearest(point, maxNodes, maxDistance)\n> Query the nearest *maxNodes* neighbors to a point\n>\n> **Parameters**\n>\n> **point**:  *object*, GeoJSON point\n>\n> **maxNodes**:  *number*, maximum amount of elements to return\n>\n> **maxDistance**:  *number*, optional maximal search distance\n>\n> **Returns**\n>\n> *Array*, Elements with two components: the searched point and\n> the distance to it\n\n\n    insert(point)\n> Insert a new point into the tree\n>\n> **Parameters**\n>\n> **point**:  *object*, GeoJSON point\n>\n> **Returns**\n>\n> *Node*,  reference to inserted Node instance\n\n    remove(point)\n> Remove a point from the tree by reference\n>\n> **Parameters**\n>\n> **point**:  *object*,  GeoJSON point\n>\n> **Returns**\n>\n> *Node*,  reference to removed Node instance\n\n    balanceFactor()\n> Get an approximation of how unbalanced the tree is\n>\n> **Returns**\n>\n> *number*, The higher this number, the worse query performance will be.\n> It indicates how many times worse it is than the optimal tree.\n> Minimum is 1. Unreliable for small trees.\n\n    toJSON()\n> Convert tree to a JSON serializable structure\n>\n> **Returns**\n>\n> *object*, JSON representation of the k-d tree\n\n\nRunning Tests\n--------------\nInstall the development dependencies:\n\n    $ npm install\n\nThen run the tests:\n\n    $ npm test\n\nCode Coverage\n--------------\nInstall the development dependencies:\n\n    $ npm install\n\nThen run coverage\n\n    $ npm run coverage\n\nView coverage reports\n\n    $ firefox coverage/lcov-report/index.html\n\nBrowser Bundle\n---------------\n    $ npm run build\n","maintainers":[{"name":"csbrandt","email":"cs.brandt@gmail.com"}],"time":{"modified":"2022-06-19T07:37:45.440Z","created":"2015-11-25T22:40:54.409Z","0.0.1":"2015-11-25T22:40:54.409Z","1.0.0":"2016-01-08T22:01:53.093Z","1.0.1":"2016-01-08T22:05:14.617Z"},"homepage":"https://github.com/csbrandt/kd-tree-javascript","keywords":["tree","k-d","GeoJSON"],"bugs":{"url":"https://github.com/csbrandt/kd-tree-javascript/issues"},"license":"MIT","readmeFilename":"README.md","contributors":[{"name":"Mircea Pricop","email":"pricop@ubilabs.net"},{"name":"Martin Kleppe","email":"kleppe@ubilabs.net"},{"name":"csbrandt"}]}