dhconnelly / rtreego

an R-Tree library for Go

Home Page:http://dhconnelly.github.com/rtreego

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why you only do slice on top level?

Isuxiz opened this issue · comments

Hi, I noticed that in the r-tree implementation where in file "rtree.go", you only do the slicing at the root level, the other levels use just one slice whose length is the size of entire current subdataset (i.e. don't slice).

May i ask why you are doing this?

From what I have observed, if the slicing strategy is used in every height of recursion, it is possible to generate better leaf MBRs (their length and width are closer rather than one being much larger than the other).

Good question! Unfortunately I do not remember. My intention was to follow the algorithm as outlined in the linked papers, so if slicing at every height is implemented there, then probably this was just an oversight. I'd be happy to evaluate a pull request that changes this though, particularly if there's some benchmarking that shows it outperforms the existing implementation.