This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository node-rbush.
commit 65cdbc728773a989432875d58ff4b22facfa0a9f Author: Bas Couwenberg <sebas...@xs4all.nl> Date: Sun Sep 20 11:08:06 2015 +0200 Imported Upstream version 1.4.1 --- MIT-LICENSE | 2 +- README.md | 15 ++++++++++++++- package.json | 2 +- rbush.js | 6 ++++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/MIT-LICENSE b/MIT-LICENSE index 226ace0..a4e7516 100644 --- a/MIT-LICENSE +++ b/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013 Vladimir Agafonkin +Copyright (c) 2015 Vladimir Agafonkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 85b9874..e47944b 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,11 @@ var tree = rbush(9).fromJSON(treeData); Importing and exporting as JSON allows you to use RBush on both the server (using Node.js) and the browser combined, e.g. first indexing the data on the server and and then importing the resulting tree data on the client for searching. +### K-Nearest Neighbors + +For "_k_ nearest neighbors around a point" type of queries for RBush, +check out [rbush-knn](https://github.com/mourner/rbush-knn). + ## Algorithms Used * single insertion: non-recursive R-tree insertion with overlap minimizing split routine from R*-tree (split is very effective in JS, while other R*-tree modifications like reinsertion on overflow and overlap minimizing subtree search are too slow and not worth it) @@ -176,9 +181,17 @@ npm run perf # run performance benchmarks npm run cov # report test coverage (with more detailed report in coverage/lcov-report/index.html) ``` +## Compatibility + +RBush should run on Node and all major browsers. The only caveat: IE 8 needs an [Array#indexOf polyfill](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf#Polyfill) for `remove` method to work. + ## Changelog -#### 1.4.0 — Apr 22, 2014 +#### 1.4.1 — Sep 16, 2015 + +- Fixed insertion in IE8. + +#### 1.4.0 — Apr 22, 2015 - Added `collides` method for fast collision detection. diff --git a/package.json b/package.json index e7d39ae..89c90f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rbush", - "version": "1.4.0", + "version": "1.4.1", "description": "High-performance 2D spatial index for rectangles (based on R*-tree with bulk loading and bulk insertion algorithms)", "homepage": "https://github.com/mourner/rbush", "keywords": [ diff --git a/rbush.js b/rbush.js index 915468e..ca54327 100644 --- a/rbush.js +++ b/rbush.js @@ -1,5 +1,5 @@ /* - (c) 2013, Vladimir Agafonkin + (c) 2015, Vladimir Agafonkin RBush, a JavaScript library for high-performance 2D spatial indexing of points and rectangles. https://github.com/mourner/rbush */ @@ -340,8 +340,10 @@ rbush.prototype = { this._chooseSplitAxis(node, m, M); + var splitIndex = this._chooseSplitIndex(node, m, M); + var newNode = { - children: node.children.splice(this._chooseSplitIndex(node, m, M)), + children: node.children.splice(splitIndex, node.children.length - splitIndex), height: node.height }; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/node-rbush.git _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel