Revision 29097 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/aggregate/impl/MultiPoint2DZ.java

View differences:

MultiPoint2DZ.java
44 44

  
45 45
import org.cresques.cts.IProjection;
46 46
import org.gvsig.fmap.geom.Geometry;
47
import org.gvsig.fmap.geom.GeometryLocator;
48
import org.gvsig.fmap.geom.Geometry.SUBTYPES;
49 47
import org.gvsig.fmap.geom.aggregate.MultiPoint;
50
import org.gvsig.fmap.geom.primitive.FShape;
51 48
import org.gvsig.fmap.geom.type.GeometryType;
52 49

  
53 50
/**
......
56 53
 * @author Vicente Caballero Navarro
57 54
 */
58 55
public class MultiPoint2DZ extends MultiPoint2D implements MultiPoint {
59

  
60
	private static final long serialVersionUID = 1L;
61

  
62
	// Registramos el tipo de geometria
63
	private static GeometryType geomType = GeometryLocator.getGeometryManager()
64
			.registerGeometryType(MultiPoint2DZ.class, null, TYPES.MULTIPOINT, SUBTYPES.GEOM2DZ);
65
	
66
	public static int CODE = geomType.getId();
67

  
56
	private static final long serialVersionUID = -2905029760276555041L;
68 57
	double[] z = null;
69 58

  
70 59
	/**
71
	 * Constructor without arguments. It is necessary to create
72
	 * geometries using the {@link GeometryType}{@link #create()}
73
	 * method
60
	 * The constructor with the GeometryType like and argument 
61
	 * is used by the {@link GeometryType}{@link #create()}
62
	 * to create the geometry
63
	 * @param type
64
	 * The geometry type
74 65
	 */
75
	public MultiPoint2DZ() {
76
		super();		
66
	public MultiPoint2DZ(GeometryType geometryType) {
67
		super(geometryType);		
77 68
	}
78 69
	
79 70
	/**
80
	 * Crea un nuevo Multipoint3D.
81 71
	 * 
72
	 * @param id
73
	 * @param projection
82 74
	 * @param x
83
	 *            Array de Xs.
84 75
	 * @param y
85
	 *            Array de Ys.
86 76
	 * @param z
87
	 *            Array de Zs.
88 77
	 */
89
	public MultiPoint2DZ(String id, IProjection projection, double[] x,
78
	MultiPoint2DZ(GeometryType geometryType, String id, IProjection projection, double[] x,
90 79
			double[] y, double[] z) {
91
		super(id, projection, x, y);
80
		super(geometryType, id, projection, x, y);
92 81
		this.z = z;
93 82
	}
94 83

  
......
107 96
			x[i] = p.getX();
108 97
			y[i] = p.getY();
109 98
		}
110
		return new MultiPoint2DZ(id, projection, x, y, (double[]) z.clone());
99
		return new MultiPoint2DZ(geometryType, id, projection, x, y, (double[]) z.clone());
111 100
	}
112 101

  
113 102
	/**

Also available in: Unified diff