Revision 5757 trunk/extensions/extGeoProcessing/src/com/iver/cit/gvsig/geoprocess/intersection/fmap/IntersectVisitor.java
IntersectVisitor.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.2 2006-06-02 18:21:28 azabala |
|
48 |
* Revision 1.3 2006-06-08 18:25:20 azabala |
|
49 |
* modificaciones para admitir capas de shapeType MULTI |
|
50 |
* |
|
51 |
* Revision 1.2 2006/06/02 18:21:28 azabala |
|
49 | 52 |
* *** empty log message *** |
50 | 53 |
* |
51 | 54 |
* Revision 1.1 2006/05/24 21:10:40 azabala |
... | ... | |
96 | 99 |
import com.iver.cit.gvsig.fmap.operations.strategies.VisitException; |
97 | 100 |
import com.iver.cit.gvsig.geoprocess.core.fmap.FeatureFactory; |
98 | 101 |
import com.iver.cit.gvsig.geoprocess.core.fmap.FeatureProcessor; |
102 |
import com.iver.cit.gvsig.geoprocess.core.fmap.XTypes; |
|
99 | 103 |
import com.vividsolutions.jts.geom.Geometry; |
100 | 104 |
import com.vividsolutions.jts.geom.MultiPolygon; |
101 | 105 |
import com.vividsolutions.jts.geom.Polygon; |
... | ... | |
184 | 188 |
public void visit(IGeometry g, final int index) throws VisitException { |
185 | 189 |
if(g == null) |
186 | 190 |
return; |
191 |
if(g.getGeometryType() != XTypes.POLYGON && |
|
192 |
g.getGeometryType() != XTypes.MULTI) |
|
193 |
return; |
|
187 | 194 |
final Geometry firstJts = g.toJTSGeometry(); |
188 | 195 |
final boolean onlyOverlay = onlyOverlaySelection; |
189 | 196 |
try { |
... | ... | |
197 | 204 |
throw new VisitException( |
198 | 205 |
"Error en interseccion: verificando si un posible overlay esta seleccionado", e); |
199 | 206 |
}//geometry g is not selected |
200 |
} |
|
207 |
} |
|
208 |
if(g.getGeometryType() != XTypes.POLYGON && |
|
209 |
g.getGeometryType() != XTypes.MULTI) |
|
210 |
return; |
|
201 | 211 |
Geometry overlayJts = g.toJTSGeometry(); |
202 | 212 |
if (firstJts.intersects(overlayJts)) { |
203 | 213 |
Geometry newGeoJts = EnhancedPrecisionOp.intersection(firstJts, overlayJts); |
Also available in: Unified diff