Revision 335 org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.base/src/main/java/org/gvsig/geoprocess/algorithm/base/core/ScalableUnionOperation.java
ScalableUnionOperation.java | ||
---|---|---|
157 | 157 |
* @throws VisitorException |
158 | 158 |
* @throws ExpansionFileReadException |
159 | 159 |
*/ |
160 |
public static org.gvsig.fmap.geom.Geometry joinLayerGeometries(IVectorLayer input) throws WrongParameterTypeException, WrongParameterIDException, NullParameterValueException { |
|
160 |
public static org.gvsig.fmap.geom.Geometry joinLayerGeometries(IVectorLayer input, boolean selectedGeom) throws WrongParameterTypeException, WrongParameterIDException, NullParameterValueException {
|
|
161 | 161 |
FeatureStore store = null; |
162 | 162 |
|
163 | 163 |
if(input instanceof FlyrVectIVectorLayer) |
... | ... | |
165 | 165 |
else |
166 | 166 |
return null; |
167 | 167 |
|
168 |
return joinLayerGeometries(store); |
|
168 |
return joinLayerGeometries(store, selectedGeom);
|
|
169 | 169 |
} |
170 | 170 |
|
171 | 171 |
/** |
... | ... | |
182 | 182 |
* @throws ExpansionFileReadException |
183 | 183 |
*/ |
184 | 184 |
@SuppressWarnings({ "unchecked", "deprecation" }) |
185 |
public static org.gvsig.fmap.geom.Geometry joinLayerGeometries(FeatureStore store) throws WrongParameterTypeException, WrongParameterIDException, NullParameterValueException { |
|
185 |
public static org.gvsig.fmap.geom.Geometry joinLayerGeometries(FeatureStore store, boolean selectedGeom) throws WrongParameterTypeException, WrongParameterIDException, NullParameterValueException {
|
|
186 | 186 |
ScalableUnionOperation operation = new ScalableUnionOperation(); |
187 | 187 |
|
188 | 188 |
FeatureSet features = null; |
189 | 189 |
try { |
190 |
features = store.getFeatureSet(); |
|
190 |
if(selectedGeom) { |
|
191 |
features = (FeatureSet)store.getSelection(); |
|
192 |
} else { |
|
193 |
features = store.getFeatureSet(); |
|
194 |
} |
|
191 | 195 |
DisposableIterator it = features.iterator(); |
192 | 196 |
while( it.hasNext() ) { |
193 | 197 |
Feature feature = (Feature)it.next(); |
Also available in: Unified diff