Revision 37776
branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/gui/cad/tools/SplitGeometryCADTool.java | ||
---|---|---|
147 | 147 |
while (selected.hasNext()) { |
148 | 148 |
Feature feature = (Feature) selected.next(); |
149 | 149 |
org.gvsig.fmap.geom.Geometry ig = feature.getDefaultGeometry(); |
150 |
Geometry jtsGeo = Converter.geometryToJts(ig);
|
|
150 |
Geometry jtsGeo = (Geometry)ig.invokeOperation("toJTS", null);
|
|
151 | 151 |
if (jtsGeo == null) |
152 | 152 |
return; |
153 | 153 |
Geometry splitGeo = SplitStrategy.splitOp(jtsGeo, splittingLs); |
... | ... | |
166 | 166 |
|
167 | 167 |
for (int j = 0; j < gc.getNumGeometries(); j++) { |
168 | 168 |
Geometry g = gc.getGeometryN(j); |
169 |
if (splitGroups[0].contains(g)) { |
|
170 |
geoms0.add(g); |
|
171 |
} else { |
|
172 |
geoms1.add(g); |
|
169 |
for (int k=0 ; k<=splitGroups.length ; k++){ |
|
170 |
if (splitGroups[k].contains(g)) { |
|
171 |
geoms0.add(g); |
|
172 |
} else { |
|
173 |
geoms1.add(g); |
|
174 |
} |
|
173 | 175 |
} |
174 | 176 |
} |
175 | 177 |
} else |
... | ... | |
352 | 354 |
while (selected.hasNext()) { |
353 | 355 |
Feature feature = (Feature) selected.next(); |
354 | 356 |
org.gvsig.fmap.geom.Geometry ig = feature.getDefaultGeometry(); |
355 |
Geometry jtsG = Converter.geometryToJts(ig);
|
|
357 |
Geometry jtsG = (Geometry)ig.invokeOperation("toJTS", null);
|
|
356 | 358 |
if (jtsG != null && jtsG instanceof GeometryCollection |
357 | 359 |
&& jtsG.getNumGeometries() > 1) { |
358 | 360 |
org.gvsig.fmap.geom.Geometry r = |
Also available in: Unified diff