Revision 47432 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.jts/src/main/java/org/gvsig/fmap/geom/jts/aggregate/DefaultMultiSurface.java
DefaultMultiSurface.java | ||
---|---|---|
74 | 74 |
other.setProjection(this.getProjection()); |
75 | 75 |
other.ensureCapacity(primitives.size()); |
76 | 76 |
for (Primitive primitive : primitives) { |
77 |
other.addPrimitive((Primitive)primitive.force2D());
|
|
77 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM2D));
|
|
78 | 78 |
} |
79 | 79 |
return other; |
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
@Override |
83 |
public Geometry force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException { |
|
84 |
DefaultMultiSurface other = new DefaultMultiSurface(getGeometryType()); |
|
85 |
other.setProjection(this.getProjection()); |
|
86 |
other.ensureCapacity(primitives.size()); |
|
87 |
for (Primitive primitive : primitives) { |
|
88 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM2DM)); |
|
89 |
} |
|
90 |
return other; |
|
91 |
} |
|
92 |
|
|
93 |
@Override |
|
94 |
public Geometry force3D() throws GeometryOperationNotSupportedException, GeometryOperationException { |
|
95 |
DefaultMultiSurface other = new DefaultMultiSurface(getGeometryType()); |
|
96 |
other.setProjection(this.getProjection()); |
|
97 |
other.ensureCapacity(primitives.size()); |
|
98 |
for (Primitive primitive : primitives) { |
|
99 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM3D)); |
|
100 |
} |
|
101 |
return other; |
|
102 |
} |
|
103 |
|
|
104 |
@Override |
|
105 |
public Geometry force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException { |
|
106 |
DefaultMultiSurface other = new DefaultMultiSurface(getGeometryType()); |
|
107 |
other.setProjection(this.getProjection()); |
|
108 |
other.ensureCapacity(primitives.size()); |
|
109 |
for (Primitive primitive : primitives) { |
|
110 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM3DM)); |
|
111 |
} |
|
112 |
return other; |
|
113 |
} |
|
114 |
|
|
115 |
@Override |
|
83 | 116 |
public void addSurface(Surface surface) { |
84 | 117 |
GeometryType geometryType = surface.getGeometryType(); |
85 | 118 |
if(geometryType.getSubType() == getGeometryType().getSubType()){ |
Also available in: Unified diff