Revision 42267 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/DefaultGeometryLibrary.java
DefaultGeometryLibrary.java | ||
---|---|---|
30 | 30 |
import org.gvsig.fmap.geom.GeometryLibrary; |
31 | 31 |
import org.gvsig.fmap.geom.GeometryLocator; |
32 | 32 |
import org.gvsig.fmap.geom.GeometryManager; |
33 |
import org.gvsig.fmap.geom.jts.aggregate.MultiPoint2D; |
|
34 |
import org.gvsig.fmap.geom.jts.aggregate.MultiPoint2DM; |
|
35 |
import org.gvsig.fmap.geom.jts.aggregate.MultiPoint3DM; |
|
33 | 36 |
import org.gvsig.fmap.geom.jts.coerce.CoerceToByteArray; |
34 | 37 |
import org.gvsig.fmap.geom.jts.coerce.CoerceToEnvelope; |
35 | 38 |
import org.gvsig.fmap.geom.jts.coerce.CoerceToGeometry; |
... | ... | |
37 | 40 |
import org.gvsig.fmap.geom.jts.primitive.DefaultEnvelope; |
38 | 41 |
import org.gvsig.fmap.geom.jts.primitive.Envelope2D; |
39 | 42 |
import org.gvsig.fmap.geom.jts.primitive.Envelope3D; |
43 |
import org.gvsig.fmap.geom.jts.primitive.curve.arc.Arc2D; |
|
44 |
import org.gvsig.fmap.geom.jts.primitive.curve.arc.Arc2DZ; |
|
40 | 45 |
import org.gvsig.fmap.geom.jts.primitive.curve.line.Line2D; |
41 | 46 |
import org.gvsig.fmap.geom.jts.primitive.curve.line.Line2DM; |
42 | 47 |
import org.gvsig.fmap.geom.jts.primitive.curve.line.Line3D; |
43 | 48 |
import org.gvsig.fmap.geom.jts.primitive.curve.line.Line3DM; |
49 |
import org.gvsig.fmap.geom.jts.primitive.curve.spline.Spline2D; |
|
50 |
import org.gvsig.fmap.geom.jts.primitive.curve.spline.Spline2DM; |
|
51 |
import org.gvsig.fmap.geom.jts.primitive.curve.spline.Spline3D; |
|
52 |
import org.gvsig.fmap.geom.jts.primitive.curve.spline.Spline3DM; |
|
44 | 53 |
import org.gvsig.fmap.geom.jts.primitive.point.Point2D; |
45 | 54 |
import org.gvsig.fmap.geom.jts.primitive.point.Point2DM; |
46 | 55 |
import org.gvsig.fmap.geom.jts.primitive.point.Point3D; |
... | ... | |
98 | 107 |
// geometryManager.registerGeometryType(new Point2DGeometryType()); |
99 | 108 |
geometryManager.registerGeometryType(Point2D.class, "Point2D", TYPES.POINT, SUBTYPES.GEOM2D); |
100 | 109 |
geometryManager.registerGeometryType(Point2DM.class, "Point2DM", TYPES.POINT, SUBTYPES.GEOM2DM); |
101 |
geometryManager.registerGeometryType(Point3D.class, "Point3D", TYPES.POINT, SUBTYPES.GEOM3D); |
|
102 |
geometryManager.registerGeometryType(Point3DM.class, "Point3DM", TYPES.POINT, SUBTYPES.GEOM3DM); |
|
103 | 110 |
|
104 | 111 |
// Register curves in 2D |
105 | 112 |
geometryManager.registerGeometryType(Line2D.class, "Line2D", TYPES.LINE, SUBTYPES.GEOM2D); |
113 |
geometryManager.registerGeometryType(Arc2D.class, "Arc2D", TYPES.ARC, SUBTYPES.GEOM2D, TYPES.CURVE); |
|
114 |
geometryManager.registerGeometryType(Spline2D.class, "Spline2D", TYPES.SPLINE, SUBTYPES.GEOM2D, TYPES.CURVE); |
|
115 |
|
|
116 |
// Register curves in 2DM |
|
106 | 117 |
geometryManager.registerGeometryType(Line2DM.class, "Line2DM", TYPES.LINE, SUBTYPES.GEOM2DM); |
107 |
geometryManager.registerGeometryType(Line3D.class, "Line3D", TYPES.LINE, SUBTYPES.GEOM3D); |
|
108 |
geometryManager.registerGeometryType(Line3DM.class, "Line3DM", TYPES.LINE, SUBTYPES.GEOM3DM); |
|
109 |
// geometryManager.registerGeometryType(Arc2D.class, "Arc2D", TYPES.ARC, SUBTYPES.GEOM2D, TYPES.CURVE); |
|
110 |
// geometryManager.registerGeometryType(Spline2D.class, "Spline2D", TYPES.SPLINE, SUBTYPES.GEOM2D, TYPES.CURVE); |
|
118 |
geometryManager.registerGeometryType(Spline2DM.class, "Spline2DM", TYPES.SPLINE, SUBTYPES.GEOM2DM, TYPES.CURVE); |
|
111 | 119 |
|
112 | 120 |
// Register surfaces in 2D |
113 | 121 |
geometryManager.registerGeometryType(Polygon2D.class, "Polygon2D", TYPES.POLYGON, SUBTYPES.GEOM2D, |
... | ... | |
121 | 129 |
// Register multigeometries in 2D |
122 | 130 |
// geometryManager.registerGeometryType(BaseMultiPrimitive2D.class, "MultiPrimitive2D", TYPES.AGGREGATE, |
123 | 131 |
// SUBTYPES.GEOM2D); |
124 |
// geometryManager.registerGeometryType(MultiPoint2D.class, "MultiPoint2D", TYPES.MULTIPOINT, SUBTYPES.GEOM2D,
|
|
125 |
// TYPES.AGGREGATE);
|
|
132 |
geometryManager.registerGeometryType(MultiPoint2D.class, "MultiPoint2D", TYPES.MULTIPOINT, SUBTYPES.GEOM2D, |
|
133 |
TYPES.AGGREGATE); |
|
126 | 134 |
// geometryManager.registerGeometryType(MultiCurve2D.class, "MultiCurve2D", TYPES.MULTICURVE, SUBTYPES.GEOM2D, |
127 | 135 |
// TYPES.AGGREGATE); |
128 | 136 |
// geometryManager.registerGeometryType(MultiSurface2D.class, "MultiSurface2D", TYPES.MULTISURFACE, |
129 | 137 |
// SUBTYPES.GEOM2D, TYPES.AGGREGATE); |
130 | 138 |
|
139 |
// Register multigeometries in 2DM |
|
140 |
geometryManager.registerGeometryType(MultiPoint2DM.class, "MultiPoint2DM", TYPES.MULTIPOINT, SUBTYPES.GEOM2DM, |
|
141 |
TYPES.AGGREGATE); |
|
142 |
|
|
131 | 143 |
// Register the geometries in 3D |
132 | 144 |
// geometryManager.registerGeometryType(DefaultNullGeometry.class, TYPES.NULL, SUBTYPES.GEOM3D); |
133 | 145 |
|
134 | 146 |
// Register points in 3D |
135 | 147 |
// geometryManager.registerGeometryType(new Point3DGeometryType()); |
148 |
geometryManager.registerGeometryType(Point3D.class, "Point3D", TYPES.POINT, SUBTYPES.GEOM3D); |
|
149 |
geometryManager.registerGeometryType(Point3DM.class, "Point3DM", TYPES.POINT, SUBTYPES.GEOM3DM); |
|
136 | 150 |
|
137 | 151 |
// Register curves in 3D |
138 | 152 |
// geometryManager.registerGeometryType(Line2DZ.class, "Curve3D", TYPES.CURVE, SUBTYPES.GEOM3D, new int[0], |
139 | 153 |
// new int[] { SUBTYPES.GEOM2D }); |
140 |
// geometryManager.registerGeometryType(Arc2DZ.class, "Arc3D", TYPES.ARC, SUBTYPES.GEOM3D, TYPES.CURVE, |
|
141 |
// SUBTYPES.GEOM2D); |
|
142 |
// geometryManager.registerGeometryType(Spline2DZ.class, "Spline3D", TYPES.SPLINE, SUBTYPES.GEOM3D, TYPES.CURVE, |
|
143 |
// SUBTYPES.GEOM2D); |
|
154 |
geometryManager.registerGeometryType(Line3D.class, "Line3D", TYPES.LINE, SUBTYPES.GEOM3D); |
|
155 |
geometryManager.registerGeometryType(Arc2DZ.class, "Arc3D", TYPES.ARC, SUBTYPES.GEOM3D, TYPES.CURVE, |
|
156 |
SUBTYPES.GEOM2D); |
|
157 |
geometryManager.registerGeometryType(Spline3D.class, "Spline3D", TYPES.SPLINE, SUBTYPES.GEOM3D, TYPES.CURVE, |
|
158 |
SUBTYPES.GEOM2D); |
|
144 | 159 |
|
160 |
// Register curves in 3DM |
|
161 |
geometryManager.registerGeometryType(Line3DM.class, "Line3DM", TYPES.LINE, SUBTYPES.GEOM3DM); |
|
162 |
geometryManager.registerGeometryType(Spline3DM.class, "Spline3DM", TYPES.SPLINE, SUBTYPES.GEOM3DM, TYPES.CURVE, |
|
163 |
SUBTYPES.GEOM2DM); |
|
164 |
|
|
145 | 165 |
// Register surfaces in 3D |
146 | 166 |
geometryManager.registerGeometryType(Polygon3D.class, "Polygon3D", TYPES.POLYGON, SUBTYPES.GEOM3D, new int[0], |
147 | 167 |
new int[] { SUBTYPES.GEOM3D }); |
... | ... | |
160 | 180 |
// geometryManager.registerGeometryType(MultiSurface3D.class, "MultiSurface3D", TYPES.MULTISURFACE, |
161 | 181 |
// SUBTYPES.GEOM3D, TYPES.AGGREGATE, SUBTYPES.GEOM2D); |
162 | 182 |
|
183 |
// Register multigeometries in 3DM |
|
184 |
geometryManager.registerGeometryType(MultiPoint3DM.class, "MultiPoint3DM", TYPES.MULTIPOINT, SUBTYPES.GEOM2DM, |
|
185 |
TYPES.AGGREGATE); |
|
186 |
|
|
163 | 187 |
// Register solids |
164 | 188 |
// geometryManager.registerGeometryType(Solid2DZ.class, "Solid3D", TYPES.SOLID, SUBTYPES.GEOM3D); |
165 | 189 |
// geometryManager.registerGeometryType(MultiSolid2DZ.class, "MultiSolid3D", TYPES.MULTISOLID, SUBTYPES.GEOM3D, |
Also available in: Unified diff