PRTree是一个实现了优先级R-Tree以及空间索引的Java开发包,代码示例:
PRTree tree = new PRTree (new Rectangle2DConverter (), 10); Rectangle2D rx = new Rectangle2D.Double (0, 0, 1, 1); tree.load (Collections.singletonList (rx)); for (Rectangle2D r : tree.find (0, 0, 1, 1)) { System.out.println (“found a rectangle: ” + r); }