01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2003-2006, Geotools Project Managment Committee (PMC)
05: * (C) 2003 Refractions Research Inc.
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation; either
10: * version 2.1 of the License, or (at your option) any later version.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * Refractions Research Inc. Can be found on the web at:
18: * http://www.refractions.net/
19: *
20: * Created on Oct 31, 2003
21: */
22: package org.geotools.data.oracle.sdo;
23:
24: import java.util.Collections;
25: import java.util.HashMap;
26: import java.util.Map;
27:
28: import com.vividsolutions.jts.geom.Geometry;
29: import com.vividsolutions.jts.geom.LineString;
30: import com.vividsolutions.jts.geom.MultiLineString;
31: import com.vividsolutions.jts.geom.MultiPoint;
32: import com.vividsolutions.jts.geom.MultiPolygon;
33: import com.vividsolutions.jts.geom.Point;
34: import com.vividsolutions.jts.geom.Polygon;
35:
36: /**
37: * @author bowens
38: *
39: * To change the template for this generated type comment go to
40: * Window>Preferences>Java>Code Generation>Code and Comments
41: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/unsupported/oracle-spatial/src/main/java/org/geotools/data/oracle/sdo/TT.java $
42: */
43: public interface TT {
44: /** <code>TT</code> code representing unknown geometies (like splines) */
45: public static final int UNKNOWN = 00;
46:
47: /** <code>TT</code> code representing Point */
48: public static final int POINT = 01;
49:
50: /** <code>TT</code> code representing Line (or Curve) */
51: public static final int LINE = 02;
52:
53: /** <code>TT</code> code representing Curve (or Line) */
54: public static final int CURVE = 02;
55:
56: /** <code>TT</code> code representing Polygon */
57: public static final int POLYGON = 03;
58:
59: /** <code>TT</code> code representing Collection */
60: public static final int COLLECTION = 04;
61:
62: /** <code>TT</code> code representing Multpoint */
63: public static final int MULTIPOINT = 05;
64:
65: /** <code>TT</code> code representing Multiline (or Multicurve) */
66: public static final int MULTILINE = 06;
67:
68: /** <code>TT</code> code representing Multicurve (or Multiline) */
69: public static final int MULTICURVE = 06;
70:
71: /** <code>TT</code> code representing MULTIPOLYGON */
72: public static final int MULTIPOLYGON = 07;
73:
74: /**
75: * A map from geomery type, as a string, to JTS Geometry. See Oracle Spatial documentation,
76: * Table 2-1, Valid SDO_GTYPE values.
77: */
78: public static final Map GEOM_CLASSES = Collections
79: .unmodifiableMap(new GeomClasses());
80:
81: static final class GeomClasses extends HashMap {
82: private static final long serialVersionUID = -3359664692996608331L;
83:
84: public GeomClasses() {
85: super ();
86: put("UNKNOWN", Geometry.class);
87: put("POINT", Point.class);
88: put("LINE", LineString.class);
89: put("CURVE", LineString.class);
90: put("POLYGON", Polygon.class);
91: put("COLLECTION", Geometry.class);
92: put("MULTIPOINT", MultiPoint.class);
93: put("MULTILINE", MultiLineString.class);
94: put("MULTICURVE", MultiLineString.class);
95: put("MULTIPOLYGON", MultiPolygon.class);
96: }
97: }
98:
99: }
|