Revision 335 org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.merge/src/main/java/org/gvsig/geoprocess/algorithm/merge/MergeAlgorithm.java
MergeAlgorithm.java | ||
---|---|---|
91 | 91 |
*/ |
92 | 92 |
@SuppressWarnings("unchecked") |
93 | 93 |
public boolean processAlgorithm() throws GeoAlgorithmExecutionException { |
94 |
if(existsOutPutFile(MergeAlgorithm.RESULT_POL, 0) ||
|
|
95 |
existsOutPutFile(MergeAlgorithm.RESULT_LINE, 0) ||
|
|
96 |
existsOutPutFile(MergeAlgorithm.RESULT_POINT, 0)) {
|
|
94 |
if(existsOutPutFile(RESULT_POL, 0) || |
|
95 |
existsOutPutFile(RESULT_LINE, 0) || |
|
96 |
existsOutPutFile(RESULT_POINT, 0)) { |
|
97 | 97 |
throw new GeoAlgorithmExecutionException(getTranslation("file_exists")); |
98 | 98 |
} |
99 | 99 |
IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(FIELDLAYER); |
... | ... | |
142 | 142 |
buildOutPutStore(featureType, IVectorLayer.SHAPE_TYPE_POLYGON, |
143 | 143 |
getTranslation("Merge_polygon"), RESULT_POL); |
144 | 144 |
|
145 |
operation.computesGeometryOperationInAList(featureStoreList, outFeatStore, attrNames, false, true); |
|
145 |
operation.computesGeometryOperationInAList(featureStoreList, outFeatStore, attrNames, |
|
146 |
false, false, true); |
|
146 | 147 |
} else { |
147 | 148 |
buildOutPutStore(featureType, IVectorLayer.SHAPE_TYPE_POLYGON, |
148 | 149 |
getTranslation("Null_polygon"), RESULT_POL); |
... | ... | |
153 | 154 |
buildOutPutStore(featureType, IVectorLayer.SHAPE_TYPE_LINE, |
154 | 155 |
getTranslation("Merge_line"), RESULT_LINE); |
155 | 156 |
|
156 |
operation.computesGeometryOperationInAList(featureStoreList, outFeatStore, attrNames, false, true); |
|
157 |
operation.computesGeometryOperationInAList(featureStoreList, outFeatStore, attrNames, |
|
158 |
false, false, true); |
|
157 | 159 |
} else { |
158 | 160 |
buildOutPutStore(featureType.getCopy(), IVectorLayer.SHAPE_TYPE_LINE, |
159 | 161 |
getTranslation("Null_line"), RESULT_LINE); |
... | ... | |
164 | 166 |
buildOutPutStore(featureType.getCopy(), IVectorLayer.SHAPE_TYPE_POINT, |
165 | 167 |
getTranslation("Merge_point"), RESULT_POINT); |
166 | 168 |
|
167 |
operation.computesGeometryOperationInAList(featureStoreList, outFeatStore, attrNames, false, true); |
|
169 |
operation.computesGeometryOperationInAList(featureStoreList, outFeatStore, attrNames, |
|
170 |
false, false, true); |
|
168 | 171 |
} else { |
169 | 172 |
buildOutPutStore(featureType.getCopy(), IVectorLayer.SHAPE_TYPE_POINT, |
170 | 173 |
getTranslation("Null_point"), RESULT_POINT); |
Also available in: Unified diff