RTree Partition Code