Revision 47362 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchPostProcess/distinctOn/STConvexHullAggregateOperation.java
STConvexHullAggregateOperation.java | ||
---|---|---|
12 | 12 |
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor; |
13 | 13 |
import org.gvsig.fmap.geom.Geometry; |
14 | 14 |
import org.gvsig.fmap.geom.GeometryUtils; |
15 |
import org.gvsig.fmap.geom.aggregate.Aggregate; |
|
15 | 16 |
import org.gvsig.fmap.geom.aggregate.MultiPolygon; |
16 | 17 |
import org.gvsig.fmap.geom.primitive.Primitive; |
17 | 18 |
import static org.gvsig.tools.dynobject.DynField.RELATION_TYPE_NONE; |
... | ... | |
19 | 20 |
|
20 | 21 |
public class STConvexHullAggregateOperation extends AbstractAggregateOperation { |
21 | 22 |
|
22 |
public static class SumAggregateOperationFactory implements AggregateOperationFactory{
|
|
23 |
public static class STConvexHullAggregateOperationFactory implements AggregateOperationFactory{
|
|
23 | 24 |
|
24 |
public static final String NAME = "ST_ConvexHull";
|
|
25 |
public static final String NAME = "ConvexHull"; |
|
25 | 26 |
|
26 | 27 |
@Override |
27 | 28 |
public String getName() { |
... | ... | |
67 | 68 |
return; |
68 | 69 |
} |
69 | 70 |
MultiPolygon mp = GeometryUtils.createMultiPolygon(geom.getGeometryType().getSubType()); |
70 |
mp.addPrimitive((Primitive) geom);
|
|
71 |
mp.addPrimitive((Primitive) value);
|
|
71 |
mp.addPrimitives(geom);
|
|
72 |
mp.addPrimitives((Geometry)value);
|
|
72 | 73 |
geom = mp.convexHull(); |
73 | 74 |
} catch (Exception ex) { |
74 | 75 |
throw new RuntimeException("",ex); |
Also available in: Unified diff