collector.collect(r, extent);
Geo[] pts = r.toPointArray(); if (isPointInPolygon(bc.getCenter(), pts) || isPointNearPoly(bc.getCenter(), pts, bc.getRadius()+filter.getHRange())) { collector.collect(r, 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) {              // This body used to be the following:              //   considerPathXRegion((GeoPath) extent, r);              // but this reverses the match order and leads to "r" getting collected              // instead of extent.  I've inlined the essential body and left it here              for (GeoPath.SegmentIterator pit = ((GeoPath)extent).segmentIterator(); pit.hasNext();) {                GeoSegment seg = pit.nextSegment();                if (filter.preConsider(seg, r)                    && considerSegmentXRegion(seg, r)) {                  collector.collect(seg, extent);                }              }            } else {                BoundingCircle bc = extent.getBoundingCircle();                BoundingCircle rbc = r.getBoundingCircle();                if (rbc.intersects(bc.getCenter(), bc.getRadius()                        + filter.getHRange())) {                    collector.collect(r, extent);                }            }        }    }