I am new to this part, so I hope someone who has experienced this could give some advices.
I have a shape file document, which contains many shapes. The data needed to be processed is large number of points. I try to generate a quadtree index for the shapefile and then locate these points. And I find a class which is suitable for it.
Below is my code
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);
The problem is that, how do I need to do next? Do I need to insert all polygons manually? And how could I search points with this tree?