Revision 10627 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/FilterRectVisitor.java

View differences:

FilterRectVisitor.java
45 45
*
46 46
* $Id$
47 47
* $Log$
48
* Revision 1.3  2006-06-20 18:15:19  azabala
48
* Revision 1.4  2007-03-06 17:08:55  caballero
49
* Exceptions
50
*
51
* Revision 1.3  2006/06/20 18:15:19  azabala
49 52
* a?adida comprobaci?n de geometria nula en la construcci?n del indice espacial
50 53
*
51 54
* Revision 1.2  2006/03/07 20:59:28  azabala
......
60 63

  
61 64
import java.awt.geom.Rectangle2D;
62 65

  
66
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
67
import com.iver.cit.gvsig.exceptions.visitors.ProcessVisitorException;
68
import com.iver.cit.gvsig.exceptions.visitors.StartVisitorException;
69
import com.iver.cit.gvsig.exceptions.visitors.VisitorException;
63 70
import com.iver.cit.gvsig.fmap.core.IGeometry;
64 71
import com.iver.cit.gvsig.fmap.layers.FLayer;
65 72
/**
......
72 79
public class FilterRectVisitor implements FeatureVisitor {
73 80
	private Rectangle2D rect;
74 81
	private FeatureVisitor wrappedVisitor;
75
	
82

  
76 83
	public void setRectangle(Rectangle2D rect){
77 84
		this.rect = rect;
78 85
	}
79
	public void visit(IGeometry g, int index) throws VisitException {
86
	public void visit(IGeometry g, int index) throws ReadDriverException, VisitorException, ProcessVisitorException {
80 87
		if ((g != null) && (g.intersects(rect))) {
81 88
			wrappedVisitor.visit(g, index);
82
		} 
89
		}
83 90
	}
84
	public void stop(FLayer layer) {
91
	public void stop(FLayer layer) throws VisitorException {
85 92
		wrappedVisitor.stop(layer);
86 93
	}
87 94

  
88
	public boolean start(FLayer layer) {
95
	public boolean start(FLayer layer) throws StartVisitorException {
89 96
		return wrappedVisitor.start(layer);
90 97
	}
91 98
	public FeatureVisitor getWrappedVisitor() {
......
97 104
	public String getProcessDescription() {
98 105
		return "Filters visit calls to a visitor by spatial criteria";
99 106
	}
100
	
101
	
107

  
108

  
102 109
}
103 110

  

Also available in: Unified diff