You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
basically a binary tree but partitions its childs through their geographic planes
2
+
well since we have latitude and longitude, we can use Rtree
3
+
https://en.wikipedia.org/wiki/R-tree
4
+
just what we want
5
+
or we can also use https://en.wikipedia.org/wiki/K-d_tree and use x,y coordinates, which is the same thing whatever
6
+
then perform range search
7
+
8
+
i am not sure whether we need optimization since we dont need nearest neighbour search. Edit: Well we do dumbass
9
+
10
+
11
+
search algo:
12
+
13
+
go recursively deep as a normal insert precudere, check if dist lower than 1km or whatever, add to all nodes, then from parent look at the other branch and from current dim (x or y) calculate if curr dim is bigger than 1km already, if not go check
0 commit comments