R-tree NN query added to search for point inside a ball