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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -