Implementation and application of R-TREE