public void considerRegionXRegion(GeoRegion r,GeoRegion region){
  GeoArray rBoundary=r.getPoints();
  Geo rPoint=rBoundary.get(0,new Geo());
  GeoArray regionBoundary=region.getPoints();
  Geo regionPoint=regionBoundary.get(0,new Geo());
  if (Intersection.isPointInPolygon(rPoint,regionBoundary) || Intersection.isPointInPolygon(regionPoint,rBoundary)) {
    collector.collect(r,region);
  }
 else {
    for (GeoPath.SegmentIterator pit=r.segmentIterator(); pit.hasNext(); ) {
      GeoSegment seg=pit.nextSegment();
      if (filter.preConsider(seg,region) && considerSegmentXRegion(seg,region)) {
        collector.collect(seg,region);
        return;
      }
    }
  }
}

public void considerRegionXRegion ( GeoRegion r , GeoRegion region ) { GeoArray rBoundary = r . getPoints ( ) ; Geo rPoint = rBoundary . get ( 0 , new Geo ( ) ) ; GeoArray regionBoundary = region . getPoints ( ) ; Geo regionPoint = regionBoundary . get ( 0 , new Geo ( ) ) ; if ( Intersection . isPointInPolygon ( rPoint , regionBoundary ) || Intersection . isPointInPolygon ( regionPoint , rBoundary ) ) { collector . collect ( r , region ) ; } else { for ( GeoPath . SegmentIterator pit = r . segmentIterator ( ) ; pit . hasNext ( ) ; ) { GeoSegment seg = pit . nextSegment ( ) ; if ( filter . preConsider ( seg , region ) && considerSegmentXRegion ( seg , region ) ) { collector . collect ( seg , region ) ; return ; } } } }
puts the region in the collector if r intersects with it .
