user8997599
user8997599

Reputation:

Spatial and spatio-temporal indexing using space-filling curves

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?

Upvotes: 0

Views: 243

Answers (1)

Scott Stensland
Scott Stensland

Reputation: 28285

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

Upvotes: 0

Related Questions