0

I am trying to use the JSI RTree implementation https://github.com/aled/jsi to index geo locations for my application. I load it up with about 7M entries and then I query it using the contains method with a bounding box around the states of Massachusetts and Connecticut. The results that come back are not actually in that bounding box. Is this user error or a bug in the RTree implementation?

Here is my bounding box:

Rectangle r = new Rectangle(-73.630F,43.185F,-69.675F,40.946F);

one of the many incorrect results returned was this one

"lon" : -74.24565887, "lat" : 40.66231918

...but many of them are much farther out of the box.

I have checked that I haven't accidentally mapped the IDs in the index incorrectly to wrong data.

When I did some initial testing I added a couple dozen points to the index and queried it with a bounding box and found the results to be accurate. So I'm stumped. Hopefully someone has some advice.

mattx
  • 245
  • 1
  • 10
  • Have you tried debugging the RTree code? Your link above doesn't seem to work, btw. – Has QUIT--Anony-Mousse Aug 24 '13 at 22:27
  • I haven't. I read through the code just to make sure there wasn't any obvious problems like inverting the comparison against the bounding rectangle and that is fine. I'll probably step through it if no one else has anything to say. – mattx Aug 26 '13 at 14:34

1 Answers1

0

author of jsi here. My initial thoughts are that this is probably a problem with the way you're using the library.

If you raise an issue on github with enough information to reproduce then I'll take a look.

Aled
  • 157
  • 1
  • 7