Commit Graph

109 Commits

Author SHA1 Message Date
Tom Payne 7fd2e1ffca Factor out ol.structs.Buffer#allocate 2013-06-01 18:09:29 +02:00
Tom Payne bcf7707b01 Factor out ol.structs.Buffer#markDirty 2013-06-01 18:09:28 +02:00
Tom Payne f4d54ace1d Remove unused variables in structs 2013-05-28 16:01:34 +02:00
Tom Payne a162b6fab3 Use empty extents and refactor for clarity 2013-05-25 20:39:55 -05:00
Tom Payne 18b1789512 Sort methods alphabetically 2013-05-25 19:50:44 -05:00
Tom Payne d80ded31ee Clean up some comments 2013-05-25 19:46:40 -05:00
Tom Payne aaa4fec141 Move insert into method 2013-05-25 19:39:51 -05:00
Tom Payne a871f29e75 Move remove into method 2013-05-25 19:35:59 -05:00
Tom Payne ea1ee73392 Move search and searchReturningObject into methods 2013-05-25 19:33:46 -05:00
Tom Payne 32c663cf2c Move more functions into private methods 2013-05-25 19:24:45 -05:00
Tom Payne 3cdb9f130b Make minWidth and maxWidth private member variables 2013-05-25 18:27:38 -05:00
Tom Payne 476e35c276 Move makeMBR into private static function 2013-05-25 18:17:38 -05:00
Tom Payne 7f22455eed Move squarifiedRatio into private static function 2013-05-25 18:14:52 -05:00
ahocevar 10e3a16f40 RTree API improvements and more tests
This change reverts the RTree API back to the original one (i.e.
insert() instead of put(), search() instead of find()), and
creates a new searchReturningObject() method that returns an
object keyed by UIDs.

It also adds missing tests for type restricted search and
searchReturningObject().
2013-05-22 18:25:40 -05:00
ahocevar a2927a0dd9 Addressing @tschaub's review comments 2013-05-21 15:00:50 -05:00
ahocevar 0f4a5c09af Porting tests from http://github.com/imbcmdth/RTree/
Also fixes some issues that were revealed by the new tests.
2013-05-20 17:47:04 +02:00
ahocevar 2b410cf2d0 More performance and size optimizations
Not using Math.max and Math.min increases performance, and by
using ol.extent functions instead of RTree's rectangle
structures and calculations we can get rid of several functions.
2013-05-20 16:20:21 +02:00
ahocevar 9dd4dc3730 Better optimization for advanced compilation mode 2013-05-20 08:50:15 +02:00
ahocevar bf510b570a Making RTree work in advanced compilation mode 2013-05-19 23:59:21 +02:00
ahocevar 958ee7af51 Use strings, like with other indices 2013-05-19 11:16:24 +02:00
ahocevar 79e4ee2717 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.
2013-05-19 01:47:21 +02:00
ahocevar ecea771801 Making RTree's find more efficient
By doing the type check before the intersection check, we can
save he intersection check for cases where we don't care about
type or have the specified type in a node.
2013-05-17 12:54:06 +02:00
Tom Payne ac489c6938 Cache array length in ol.structs.Buffer 2013-04-20 11:34:48 +02:00
Tom Payne 1d4eaf6824 Port ol.structs.RTree to new extents 2013-04-19 10:03:35 +02:00
Tom Payne f1cc5b87da Fix whitespace errors in JavaScript source 2013-04-08 13:25:01 +02:00
Tom Payne 4be8c991f7 Add missing Closure Library requires 2013-04-06 14:28:12 +02:00
Tom Payne f12f5ccc67 Factor out core elements of ol.TileQueue into ol.structs.PriorityQueue 2013-03-27 14:34:28 +01:00
Tom Payne 35df0693e0 Add usage to ol.structs.Buffer 2013-03-22 17:33:19 +01:00
Tom Payne ba0e7ae89c Allow a ol.structs.Buffer to update multiple dirty sets 2013-03-22 17:33:19 +01:00
Tom Payne 4ee73bc02f Add ol.structs.IntegerSet.intersectsRange 2013-03-22 17:33:13 +01:00
Tom Payne 657f58005e Remove unused function 2013-03-22 17:24:26 +01:00
Tom Payne 69f92615b1 Add missing variable declaration 2013-03-22 17:24:03 +01:00
Tom Payne 5192c5e64a Reverse order of arguments to set and s/index/offset/ 2013-03-22 17:23:30 +01:00
Tom Payne 713ad2cfb7 Replace unused entries with NaNs 2013-03-22 17:23:25 +01:00
Tom Payne 6ab5cfae8c Add ol.structs.IntegerSet.toString 2013-03-22 17:23:15 +01:00
Tom Payne 9047e98889 Add initial ol.structs.Buffer 2013-03-22 17:23:08 +01:00
Tom Payne 1833ec15e2 Refactor ol.structs.IntegerSet to use a packed array 2013-03-22 17:23:03 +01:00
Tom Payne 070b80c28d Add ol.structs.IntegerSet 2013-03-22 17:22:57 +01:00
Tom Payne 8b5367c947 Use Infinity instead of Number.POSITIVE_INFINITY 2013-03-22 11:34:44 +01:00
Frederic Junod 8296a1f134 Minor jsdoc fix 2013-03-21 09:19:23 +01:00
Frederic Junod bce9e9d0de Fix typecast
Fix JSC_MISPLACED_TYPE_ANNOTATION warnings with the plovr 2013 release
candidate (http://plovr.com/plovr-2013-rc.jar)
2013-03-14 15:59:21 +01:00
ahocevar 15375df7ab Line was too long after previous change 2013-03-12 08:41:41 +01:00
ahocevar b20a2bae94 Moving RTreeNode_ into ol.structs package 2013-03-12 08:35:57 +01:00
ahocevar f0039ee460 Additional index dimension for RTree; use RTree again
The RTree can easily maintain an additional index dimension,
by passing a type with each added item. Now instead of
maintaining an RTree for each geometry type, we have a single
RTree with a type filter. With this change, using the RTree
finally speeds up rendering as expected.
2013-03-07 14:36:09 +01:00
ahocevar 6b43435262 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-13 12:30:16 +01:00
ahocevar e155f870cd Fixing RTree, and using it for retrieving geometries 2013-02-13 12:29:14 +01:00
Tom Payne 218bf2c78b Improve LRUCache containsKey test, thanks @tschaub 2013-02-07 12:21:12 +01:00
Tom Payne 0b6aeb5b05 Remove unused and erroneous function, thanks @tschaub 2013-02-06 21:43:48 +01:00
ahocevar a13e6bdfda Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-06 16:27:45 +01:00
ahocevar 61e4452c83 Adding missing and removing unused goog.requires 2013-02-06 16:26:24 +01:00