More sophisticated RTree implementation

This new implementation is based on
http://github.com/imbcmdth/RTree/, with only a few modifications
to add the optional type and provide the API of the previous
implementation.

There is still room for optimization, but this is such an
improvement over the previous RTree already that it's worth
bringing it in now.
This commit is contained in:
ahocevar
2013-05-19 01:47:21 +02:00
parent dc4ca15430
commit 79e4ee2717
2 changed files with 536 additions and 165 deletions

View File

@@ -13,10 +13,7 @@ describe('ol.structs.RTree', function() {
rTree.put([-3, -2, -3, -2], 6);
it('stores items', function() {
expect(goog.object.getCount(rTree.find([
Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY,
Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY
]))).to.be(6);
expect(goog.object.getCount(rTree.find([-100, 100, -100, 100]))).to.be(6);
});
it('filters by rectangle', function() {