/** * Finds all {@link PreparedGeometry}s which might interact with a query {@link Geometry}. * * @param g the geometry to query by * @return a list of candidate PreparedGeometrys */ public List query(Geometry g) { return index.query(g.getEnvelopeInternal()); }
/** * Inserts a collection of Geometrys into the index. * * @param geoms a collection of Geometrys to insert */ public void insert(Collection geoms) { for (Iterator i = geoms.iterator(); i.hasNext(); ) { Geometry geom = (Geometry) i.next(); index.insert(geom.getEnvelopeInternal(), PreparedGeometryFactory.prepare(geom)); } }