algorithm - How to find specific dots in lots of dots quickly(Location Based Service)? -


i have map of tens of millions of dots stand people's location, given dot, how find dots(stand people's location) @ distance in 1 kilo meters given dot quickly? best algorithm?

grids sound practical solution, there number of tree-based data structures problem well. basic idea arrange data in tree , add annotations tree such bounding box @ each node holds points held below node. when search tree can work out don't need in descendants of nodes.

http://en.wikipedia.org/wiki/k-d_tree http://en.wikipedia.org/wiki/cover_tree


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -