Changed rtree to 3-D version