dhconnelly/rtreego — pull request #2 by fumin (2013-09-29 09:35:03+00:00)
Title: Add method SearchIntersectWithLimit

Hi Daniel,

In our use case, we reckoned it'd be great if `SearchIntersect` returned immediately with the first `k` results it found.
This pull request implements an additional method `SearchIntersectWithLimit` that fulfills this need which we think should also benefit most other web apps, too.

Regarding the code, here're two explanations to aid the code review:
* I forgot to run `go fmt` in my last pull request, so this pull request also includes a couple of formatting changes that might make it harder for you to review the code. Please accept my apologies for my mistake. The main changes are really a few, including the change in the private method `searchIntersect` in "rtree.go" line 434 and the test case `TestSearchIntersectWithLimit` in "rtree_test.go" line 718.
* There might be a better name for `SearchIntersectWithLimit`. I'd be most glad to change it to something more descriptive if you can suggest one.