use of org.locationtech.jts.index.strtree.AbstractNode in project jts by locationtech.
the class SpatialIndexFunctions method addBounds.
private static void addBounds(Boundable bnd, List bounds, GeometryFactory factory) {
// don't include bounds of leaf nodes
if (!(bnd instanceof AbstractNode))
return;
Envelope env = (Envelope) bnd.getBounds();
bounds.add(factory.toGeometry(env));
if (bnd instanceof AbstractNode) {
AbstractNode node = (AbstractNode) bnd;
List children = node.getChildBoundables();
for (Iterator i = children.iterator(); i.hasNext(); ) {
Boundable child = (Boundable) i.next();
addBounds(child, bounds, factory);
}
}
}
use of org.locationtech.jts.index.strtree.AbstractNode in project hortonmachine by TheHortonMachine.
the class BoundablePair method expand.
private void expand(Boundable bndComposite, Boundable bndOther, PriorityQueue priQ, double minDistance) {
List children = ((AbstractNode) bndComposite).getChildBoundables();
for (Iterator i = children.iterator(); i.hasNext(); ) {
Boundable child = (Boundable) i.next();
BoundablePair bp = new BoundablePair(child, bndOther, itemDistance);
// bndOther)!
if (bp.getDistance() < minDistance) {
priQ.add(bp);
}
}
}
Aggregations