considerPathXRegion((GeoPath) extent, r);
for (GeoPath.SegmentIterator pit = ((GeoPath)extent).segmentIterator(); pit.hasNext();) { GeoSegment seg = pit.nextSegment(); if (filter.preConsider(seg, r) && considerSegmentXRegion(seg, r)) { collector.collect(seg.getSegId(), extent); } }
    public void considerRegionXRegions(GeoRegion r, Collection regions) {        /*         * since the path is closed we'll check the region index for         * the whole thing instead of segment-by-segment         */        Iterator possibles;        if (regions instanceof ExtentIndex) {            // if we've got an index, narrow the set down            possibles = ((ExtentIndex) regions).iterator(r);        } else {            possibles = regions.iterator();        }        while (possibles.hasNext()) {            GeoExtent extent = (GeoExtent) possibles.next();            if (extent instanceof GeoRegion) {                considerRegionXRegion(r, (GeoRegion) extent);            } else if (extent instanceof GeoPath) {                considerPathXRegion((GeoPath) extent, r);            } else {                BoundingCircle bc = extent.getBoundingCircle();                BoundingCircle rbc = r.getBoundingCircle();                if (rbc.intersects(bc.getCenter(), bc.getRadius()                        + filter.getHRange())) {                    collector.collect(r.getRegionId(), extent);                }            }        }    }