【发布时间】:2017-04-26 02:23:02
【问题描述】:
我是这方面的新手,所以希望有经验的人能给点建议。
我有一个形状文件文档,其中包含许多形状。需要处理的数据是大量的点。我尝试为 shapefile 生成四叉树索引,然后定位这些点。我找到了适合它的课程。
下面是我的代码
ShpFiles shpFile = new ShpFiles(shpFileName);
IndexFile indexShapeFile = new IndexFile(shpFile,true);
int numShapes = indexShapeFile.getRecordCount();
com.vividsolutions.jts.geom.Envelope eRoot = new com.vividsolutions.jts.geom.Envelope(-85,85,-180,180);
QuadTree t1 = new QuadTree(numShapes,eRoot,indexShapeFile);
问题是,接下来我需要怎么做?我需要手动插入所有多边形吗?我怎么能用这棵树搜索点?
【问题讨论】: