Update rtree.c

partial update
Merge pull request #19 from ShengtianM/patch-3

Update rtree.c