kdtree to linear bbh