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/AbstractMultiLine.java
AbstractMultiLine.java | ||
---|---|---|
66 | 66 |
other.setProjection(this.getProjection()); |
67 | 67 |
other.ensureCapacity(primitives.size()); |
68 | 68 |
for (Primitive primitive : primitives) { |
69 |
other.addPrimitive((Primitive)primitive.force2D());
|
|
69 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM2D));
|
|
70 | 70 |
} |
71 | 71 |
return other; |
72 | 72 |
} |
73 | 73 |
|
74 | 74 |
@Override |
75 |
public Geometry force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException { |
|
76 |
MultiLine2DM other = new MultiLine2DM(); |
|
77 |
other.setProjection(this.getProjection()); |
|
78 |
other.ensureCapacity(primitives.size()); |
|
79 |
for (Primitive primitive : primitives) { |
|
80 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM2DM)); |
|
81 |
} |
|
82 |
return other; |
|
83 |
} |
|
84 |
|
|
85 |
@Override |
|
86 |
public Geometry force3D() throws GeometryOperationNotSupportedException, GeometryOperationException { |
|
87 |
MultiLine3D other = new MultiLine3D(); |
|
88 |
other.setProjection(this.getProjection()); |
|
89 |
other.ensureCapacity(primitives.size()); |
|
90 |
for (Primitive primitive : primitives) { |
|
91 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM3D)); |
|
92 |
} |
|
93 |
return other; |
|
94 |
} |
|
95 |
|
|
96 |
@Override |
|
97 |
public Geometry force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException { |
|
98 |
MultiLine3DM other = new MultiLine3DM(); |
|
99 |
other.setProjection(this.getProjection()); |
|
100 |
other.ensureCapacity(primitives.size()); |
|
101 |
for (Primitive primitive : primitives) { |
|
102 |
other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM3DM)); |
|
103 |
} |
|
104 |
return other; |
|
105 |
} |
|
106 |
|
|
107 |
@Override |
|
75 | 108 |
public void flip() throws GeometryOperationNotSupportedException, GeometryOperationException { |
76 | 109 |
for (Iterator iterator = primitives.iterator(); iterator.hasNext();) { |
77 | 110 |
((GeometryJTS)iterator.next()).flip(); |
Also available in: Unified diff