Spatial index/query (finding k nearest points)

后端 未结 3 1097
星月不相逢
星月不相逢 2021-02-11 03:34

I have +10k points (latitude, longitude) and I\'m building an app that shows you the k nearest points to a user\'s location.

I think this is a very common problem and I

3条回答
  •  忘了有多久
    2021-02-11 03:50

    You may want to look at kdtree entry in wikipedia. This would be useful when you have more than two dimensions too (unlike quadtrees). I suggest the kd-tree because the entry has python code for creating and querying the tree.

提交回复
热议问题