Implement queryKdTree.php