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/complex/DefaultComplex.java

View differences:

DefaultComplex.java
237 237
        other.setProjection(this.getProjection());
238 238
        other.ensureCapacity(primitives.size());
239 239
        for (Primitive primitive : primitives) {
240
            other.addPrimitive((Primitive)primitive.force2D());
240
            other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM2D));
241 241
        }
242 242
        return other;
243 243
    }
244 244

  
245 245
    @Override
246
    public Geometry force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException {
247
        DefaultComplex other = new DefaultComplex(this.getGeometryType().getSubType());
248
        other.setProjection(this.getProjection());
249
        other.ensureCapacity(primitives.size());
250
        for (Primitive primitive : primitives) {
251
            other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM2DM));
252
        }
253
        return other;
254
    }
255

  
256
    @Override
257
    public Geometry force3D() throws GeometryOperationNotSupportedException, GeometryOperationException {
258
        DefaultComplex other = new DefaultComplex(this.getGeometryType().getSubType());
259
        other.setProjection(this.getProjection());
260
        other.ensureCapacity(primitives.size());
261
        for (Primitive primitive : primitives) {
262
            other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM3D));
263
        }
264
        return other;
265
    }
266

  
267
    @Override
268
    public Geometry force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException {
269
        DefaultComplex other = new DefaultComplex(this.getGeometryType().getSubType());
270
        other.setProjection(this.getProjection());
271
        other.ensureCapacity(primitives.size());
272
        for (Primitive primitive : primitives) {
273
            other.addPrimitive((Primitive)primitive.forceSubtype(Geometry.SUBTYPES.GEOM3DM));
274
        }
275
        return other;
276
    }
277

  
278
    @Override
246 279
    public Geometry offset(double distance) throws GeometryOperationNotSupportedException, GeometryOperationException {
247 280
        DefaultComplex other = new DefaultComplex(this.getGeometryType().getSubType());
248 281
        other.setProjection(this.getProjection());

Also available in: Unified diff