0

I want to find the nearest neighbors of a point q given either spatial information or spatio-temporal information. To do this I want to create a B-tree index with keys based on either Z-order curve or Hilbert-curve. However, I have seen that Hilbert-curves are harder to implement than Z-order. My question is:

Is it worth to use Hilbert-curves over Z-order curves in nearest neighbor queries?

1 Answers1

0

Benefit of using a Hilbert Curve is contiguous points cluster quite nicely without those occasional giant jumps as found in the Z order curves. If you are using golang this library offers api calls to both synthesize the curve as well as return a point on the curve given the x,y https://github.com/google/hilbert

Scott Stensland
  • 26,870
  • 12
  • 93
  • 104