If I have a set of quad tree (say on a Hilbert curve) what would be a good way to approach finding the optimum (or good enough) set of ranges at particular depth.
For example, if I'm searching for points between the bounding box 0,0 and 1,3 then I can apply the following naive ranges:
- Depth 1 - Range 0,0-1,0 (~33% search space)
- Depth 2 - Ranges 0,0-1,0 and 1,0-0,1 (~13% search space)
- Depth 3 - Ranges 0,0-1,0 and 1,3-0,3 (~9.8% search space)
Clearly depth 3 for this search is optimal but the reduced search space has only dropped a small amount compared to the drop from depth 1 to depth 2.
At (much) bigger depths, or with searches that cross boundaries, is there a good algorithm(s) for estimating the difference between various depths, or ideally picking a mix of ranges at different depths that ideally cover the bounding box.
I'm not interested in polygons specifically but bonus points if there is a solution that works for polygons.