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/DefaultMultiCurve.java
DefaultMultiCurve.java | ||
---|---|---|
79 | 79 |
other.setProjection(this.getProjection()); |
80 | 80 |
other.ensureCapacity(primitives.size()); |
81 | 81 |
for (Primitive primitive : primitives) { |
82 |
other.addPrimitive((Primitive)primitive.force2D());
|
|
82 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM2D));
|
|
83 | 83 |
} |
84 | 84 |
return other; |
85 | 85 |
} |
86 | 86 |
|
87 | 87 |
@Override |
88 |
public Geometry force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException { |
|
89 |
DefaultMultiCurve other = new DefaultMultiCurve(getGeometryType()); |
|
90 |
other.setProjection(this.getProjection()); |
|
91 |
other.ensureCapacity(primitives.size()); |
|
92 |
for (Primitive primitive : primitives) { |
|
93 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM2DM)); |
|
94 |
} |
|
95 |
return other; |
|
96 |
} |
|
97 |
|
|
98 |
@Override |
|
99 |
public Geometry force3D() throws GeometryOperationNotSupportedException, GeometryOperationException { |
|
100 |
DefaultMultiCurve other = new DefaultMultiCurve(getGeometryType()); |
|
101 |
other.setProjection(this.getProjection()); |
|
102 |
other.ensureCapacity(primitives.size()); |
|
103 |
for (Primitive primitive : primitives) { |
|
104 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM3D)); |
|
105 |
} |
|
106 |
return other; |
|
107 |
} |
|
108 |
|
|
109 |
@Override |
|
110 |
public Geometry force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException { |
|
111 |
DefaultMultiCurve other = new DefaultMultiCurve(getGeometryType()); |
|
112 |
other.setProjection(this.getProjection()); |
|
113 |
other.ensureCapacity(primitives.size()); |
|
114 |
for (Primitive primitive : primitives) { |
|
115 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM3DM)); |
|
116 |
} |
|
117 |
return other; |
|
118 |
} |
|
119 |
|
|
120 |
@Override |
|
88 | 121 |
public int getDimension() { |
89 | 122 |
switch (getGeometryType().getSubType()) { |
90 | 123 |
case Geometry.SUBTYPES.GEOM2D: |
Also available in: Unified diff