2

I have a data set stored in database table that includes a position in 3-space. I need to retrieve the k nearest neighbors in an efficient manner. My datastore does not include native spacial indexes for 3 dimensions. How do I simulate a spacial index in the client.

This question might be rephrased, How can KD-Trees be implemented for date stored in a database?

(if it makes a difference, the actual databases used are MongoDB and Redis)

Community
  • 1
  • 1
John F. Miller
  • 26,961
  • 10
  • 71
  • 121
  • P.S. if you think I can somehow use MongoDB 2d indexes to solve my 3d problem please see [this question][http://stackoverflow.com/q/5436119/163177] instead. – John F. Miller Mar 25 '11 at 17:59

1 Answers1

0

Maybe that could interest you:

http://en.wikipedia.org/wiki/Octree

I suppose it could play nicely with algorithms such as Map-Reduce.

julx
  • 8,694
  • 6
  • 47
  • 86