PRTree是一个实现了优先级R-Tree以及空间索引的Java开发包,代码示例:
PRTreetree=newPRTree(newRectangle2DConverter(),10);Rectangle2Drx=newRectangle2D.Double(0,0,1,1);tree.load(Collections.singletonList(rx));for(Rectangle2Dr:tree.find(0,0,1,1)){ System.out.println("foundarectangle:"+r);}
评论