Based loosely off: Enhanced nearest neighbour search on the R-tree (Cheung, Fu 1998) & R-Trees: A Dynamic Index Structure for Spatial Searching (Antonn Guttmann, 1984)
n
id 1 x1 y1
id 2 x2 y2
...
id n xn yn
x1 x’1 y1 y’1
x2 x’2 y2 y’2
...
xn x’n yn y’n
x1 y1
x2 y2
...
xn yn
Comment Code