Revision 29097 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Curve2DZ.java
Curve2DZ.java | ||
---|---|---|
41 | 41 |
package org.gvsig.fmap.geom.primitive.impl; |
42 | 42 |
|
43 | 43 |
import org.cresques.cts.IProjection; |
44 |
import org.gvsig.fmap.geom.GeometryLocator;
|
|
44 |
import org.gvsig.fmap.geom.Geometry; |
|
45 | 45 |
import org.gvsig.fmap.geom.primitive.Curve; |
46 | 46 |
import org.gvsig.fmap.geom.primitive.FShape; |
47 | 47 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
... | ... | |
54 | 54 |
*/ |
55 | 55 |
public class Curve2DZ extends Curve2D implements Curve { |
56 | 56 |
private static final long serialVersionUID = 3431077088722464314L; |
57 |
|
|
58 |
private static GeometryType geomType = GeometryLocator.getGeometryManager() |
|
59 |
.registerGeometryType(Curve2DZ.class, "Curve2DZ", TYPES.CURVE, SUBTYPES.GEOM2DZ); |
|
60 |
|
|
61 | 57 |
double[] pZ = null; |
62 | 58 |
|
63 | 59 |
/** |
64 |
* Constructor without arguments. It is necessary to create |
|
65 |
* geometries using the {@link GeometryType}{@link #create()} |
|
66 |
* 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 |
|
67 | 65 |
*/ |
68 |
public Curve2DZ() { |
|
69 |
super(); |
|
66 |
public Curve2DZ(GeometryType geometryType) {
|
|
67 |
super(geometryType);
|
|
70 | 68 |
} |
71 | 69 |
|
72 | 70 |
/** |
73 |
* Crea un nuevo Polyline3D. |
|
74 |
* |
|
71 |
* Constructor used in the {@link Geometry#cloneGeometry()} method |
|
72 |
* @param id |
|
73 |
* @param projection |
|
75 | 74 |
* @param gpx |
76 |
* GeneralPathX |
|
77 | 75 |
* @param pZ |
78 |
* Vector con la Z. |
|
79 | 76 |
*/ |
80 |
public Curve2DZ(String id, IProjection projection, GeneralPathX gpx,
|
|
77 |
Curve2DZ(GeometryType geometryType, String id, IProjection projection, GeneralPathX gpx,
|
|
81 | 78 |
double[] pZ) { |
82 |
super(id, projection, gpx); |
|
79 |
super(geometryType, id, projection, gpx);
|
|
83 | 80 |
this.pZ = pZ; |
84 |
} |
|
81 |
}
|
|
85 | 82 |
|
86 |
public Curve2DZ(GeneralPathX gpx, double[] pZ) { |
|
87 |
this(null, null, gpx, pZ); |
|
88 |
} |
|
89 |
|
|
90 | 83 |
/* |
91 | 84 |
* (non-Javadoc) |
92 | 85 |
* @see org.gvsig.fmap.geom.primitive.impl.Curve2D#setGeneralPath(org.gvsig.fmap.geom.primitive.GeneralPathX) |
... | ... | |
109 | 102 |
* @see org.gvsig.fmap.geom.primitive.impl.Curve2D#cloneFShape() |
110 | 103 |
*/ |
111 | 104 |
public FShape cloneFShape() { |
112 |
return new Curve2DZ(id, projection, (GeneralPathX) gp.clone(), |
|
105 |
return new Curve2DZ(getGeometryType(), id, projection, (GeneralPathX) gp.clone(),
|
|
113 | 106 |
(double[]) pZ); |
114 | 107 |
} |
115 | 108 |
|
Also available in: Unified diff