add stream function to the RTree classes