Revision 10109
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/gml/FMAPGeometryFactory.java | ||
---|---|---|
16 | 16 |
import com.hardcode.gdbms.engine.values.Value; |
17 | 17 |
import com.hardcode.gdbms.engine.values.ValueFactory; |
18 | 18 |
import com.iver.cit.gvsig.fmap.core.DefaultFeature; |
19 |
import com.iver.cit.gvsig.fmap.core.FPolygon2D; |
|
20 |
import com.iver.cit.gvsig.fmap.core.GeneralPathX; |
|
19 | 21 |
import com.iver.cit.gvsig.fmap.core.IFeature; |
20 | 22 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
21 | 23 |
import com.iver.cit.gvsig.fmap.core.ShapeFactory; |
... | ... | |
68 | 70 |
* |
69 | 71 |
* $Id$ |
70 | 72 |
* $Log$ |
71 |
* Revision 1.4 2007-01-08 12:12:03 csanchez |
|
73 |
* Revision 1.5 2007-02-05 13:20:21 jorpiell |
|
74 |
* A?adidos nuevos m?todos en la factoria. |
|
75 |
* |
|
76 |
* Revision 1.4 2007/01/08 12:12:03 csanchez |
|
72 | 77 |
* Corregida visualizaciĆ³n de Tablas simples |
73 | 78 |
* |
74 | 79 |
* Revision 1.3 2006/12/29 17:12:10 jorpiell |
... | ... | |
88 | 93 |
public class FMAPGeometryFactory implements IGeometriesFactory{ |
89 | 94 |
private static Logger logger = Logger.getLogger(FMAPGeometryFactory.class); |
90 | 95 |
|
96 |
/* |
|
97 |
* (non-Javadoc) |
|
98 |
* @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createPoint2D(double, double) |
|
99 |
*/ |
|
91 | 100 |
public Object createPoint2D(double x, double y){ |
92 | 101 |
return ShapeFactory.createPoint2D(x,y); |
93 | 102 |
} |
94 | 103 |
|
104 |
/* |
|
105 |
* (non-Javadoc) |
|
106 |
* @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createPoint2D(java.awt.geom.Point2D) |
|
107 |
*/ |
|
95 | 108 |
public Object createPoint2D(Point2D point2D) { |
96 | 109 |
return createPoint2D(point2D.getX(),point2D.getY()); |
97 | 110 |
} |
98 | 111 |
|
112 |
/* |
|
113 |
* (non-Javadoc) |
|
114 |
* @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createMultipoint2D(double[], double[]) |
|
115 |
*/ |
|
99 | 116 |
public Object createMultipoint2D(double[] x, double[] y){ |
100 | 117 |
return ShapeFactory.createMultipoint2D(x,y); |
101 | 118 |
} |
119 |
|
|
120 |
/* |
|
121 |
* (non-Javadoc) |
|
122 |
* @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createPolygon2D(double[], double[]) |
|
123 |
*/ |
|
124 |
public Object createPolygon2D(double[] x, double[] y) { |
|
125 |
GeneralPathX path = new GeneralPathX(); |
|
126 |
if ((x.length > 0) && (y.length > 0)){ |
|
127 |
path.moveTo(x[0],y[0]); |
|
128 |
for (int i=0 ; i<x.length ; i++){ |
|
129 |
path.lineTo(x[i],y[i]); |
|
130 |
} |
|
131 |
} |
|
132 |
return ShapeFactory.createPolygon2D(path); |
|
133 |
} |
|
102 | 134 |
|
103 |
|
|
135 |
/* |
|
136 |
* (non-Javadoc) |
|
137 |
* @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createSimpleFeature(java.lang.String, org.gvsig.remoteClient.gml.types.IXMLType, java.util.Map, java.lang.Object) |
|
138 |
*/ |
|
104 | 139 |
public Object createSimpleFeature(String element, IXMLType type,Map values,Object geometry) { |
105 | 140 |
Object[] fmapParams = values.keySet().toArray(); |
106 | 141 |
Value[] fmapValues = getValues(values); |
... | ... | |
263 | 298 |
} |
264 | 299 |
|
265 | 300 |
} |
266 |
|
|
267 |
|
|
268 | 301 |
} |
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/gml/factories/IGeometriesFactory.java | ||
---|---|---|
50 | 50 |
* |
51 | 51 |
* $Id$ |
52 | 52 |
* $Log$ |
53 |
* Revision 1.3 2006-12-29 17:15:48 jorpiell |
|
53 |
* Revision 1.4 2007-02-05 13:20:13 jorpiell |
|
54 |
* A?adidos nuevos m?todos en la factoria. |
|
55 |
* |
|
56 |
* Revision 1.3 2006/12/29 17:15:48 jorpiell |
|
54 | 57 |
* Se tienen en cuenta los simpleTypes y los choices, adem?s de los atributos multiples |
55 | 58 |
* |
56 | 59 |
* Revision 1.2 2006/12/22 11:25:44 csanchez |
... | ... | |
105 | 108 |
public Object createMultipoint2D(double[] x, double[] y); |
106 | 109 |
|
107 | 110 |
/** |
111 |
* Creates a polygon in 2D |
|
112 |
* @param x |
|
113 |
* Array of points with the X coordinate |
|
114 |
* @param y |
|
115 |
* Array of points with the Y coordinate |
|
116 |
* @return |
|
117 |
* Geometry that represents a polygon in 2D |
|
118 |
*/ |
|
119 |
public Object createPolygon2D(double[] x,double[] y); |
|
120 |
|
|
121 |
|
|
122 |
/** |
|
108 | 123 |
* Creates a geometry using a GML string |
109 | 124 |
* @param gmlString |
110 | 125 |
* GML geometry |
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/gml/factories/GeometriesFactory.java | ||
---|---|---|
51 | 51 |
* |
52 | 52 |
* $Id$ |
53 | 53 |
* $Log$ |
54 |
* Revision 1.3 2006-12-29 17:15:48 jorpiell |
|
54 |
* Revision 1.4 2007-02-05 13:20:13 jorpiell |
|
55 |
* A?adidos nuevos m?todos en la factoria. |
|
56 |
* |
|
57 |
* Revision 1.3 2006/12/29 17:15:48 jorpiell |
|
55 | 58 |
* Se tienen en cuenta los simpleTypes y los choices, adem?s de los atributos multiples |
56 | 59 |
* |
57 | 60 |
* Revision 1.2 2006/12/22 11:25:44 csanchez |
... | ... | |
92 | 95 |
*/ |
93 | 96 |
public Object createMultipoint2D(double[] x, double[] y) { |
94 | 97 |
// TODO Auto-generated method stub |
95 |
return null;
|
|
98 |
return "Multipoint";
|
|
96 | 99 |
} |
97 | 100 |
|
98 | 101 |
/* |
... | ... | |
112 | 115 |
return gmlString; |
113 | 116 |
} |
114 | 117 |
|
118 |
/* |
|
119 |
* (non-Javadoc) |
|
120 |
* @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createPolygon2D(double[], double[]) |
|
121 |
*/ |
|
122 |
public Object createPolygon2D(double[] x, double[] y) { |
|
123 |
return "Polygon"; |
|
124 |
} |
|
115 | 125 |
|
116 | 126 |
} |
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/gml/factories/XMLTypesFactory.java | ||
---|---|---|
53 | 53 |
* |
54 | 54 |
* $Id$ |
55 | 55 |
* $Log$ |
56 |
* Revision 1.8 2006-12-29 17:15:48 jorpiell |
|
56 |
* Revision 1.9 2007-02-05 13:20:13 jorpiell |
|
57 |
* A?adidos nuevos m?todos en la factoria. |
|
58 |
* |
|
59 |
* Revision 1.8 2006/12/29 17:15:48 jorpiell |
|
57 | 60 |
* Se tienen en cuenta los simpleTypes y los choices, adem?s de los atributos multiples |
58 | 61 |
* |
59 | 62 |
* Revision 1.7 2006/12/22 11:25:44 csanchez |
... | ... | |
102 | 105 |
types.put(GMLGeometryType.MULTIPOINT.toUpperCase(),new GMLGeometryType(GMLGeometryType.MULTIPOINT)); |
103 | 106 |
types.put(GMLGeometryType.LINE.toUpperCase(),new GMLGeometryType(GMLGeometryType.LINE)); |
104 | 107 |
types.put(GMLGeometryType.POLYGON.toUpperCase(),new GMLGeometryType(GMLGeometryType.POLYGON)); |
108 |
types.put(GMLGeometryType.MULTIPOLYGON.toUpperCase(),new GMLGeometryType(GMLGeometryType.MULTIPOLYGON)); |
|
105 | 109 |
types.put(GMLGeometryType.GEOMETRY.toUpperCase(),new GMLGeometryType(GMLGeometryType.GEOMETRY)); |
106 | 110 |
} |
107 | 111 |
|
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/gml/types/GMLGeometryType.java | ||
---|---|---|
46 | 46 |
* |
47 | 47 |
* $Id$ |
48 | 48 |
* $Log$ |
49 |
* Revision 1.1 2006-12-22 11:25:04 csanchez |
|
49 |
* Revision 1.2 2007-02-05 13:20:13 jorpiell |
|
50 |
* A?adidos nuevos m?todos en la factoria. |
|
51 |
* |
|
52 |
* Revision 1.1 2006/12/22 11:25:04 csanchez |
|
50 | 53 |
* Nuevo parser GML 2.x para gml's sin esquema |
51 | 54 |
* |
52 | 55 |
* Revision 1.2 2006/10/11 11:21:00 jorpiell |
... | ... | |
70 | 73 |
public static final String POINT = "gml:PointPropertyType"; |
71 | 74 |
public static final String LINE = "gml:MultiLineStringPropertyType"; |
72 | 75 |
public static final String MULTIPOINT = "gml:MultiPointPropertyType"; |
73 |
public static final String POLYGON = "gml:MultiPolygonPropertyType"; |
|
76 |
public static final String MULTIPOLYGON = "gml:MultiPolygonPropertyType";
|
|
74 | 77 |
public static final String GEOMETRY = "gml:GeometryPropertyType"; |
78 |
public static final String POLYGON = "gml:PolygonPropertyType"; |
|
79 |
|
|
75 | 80 |
|
76 | 81 |
public GMLGeometryType(String type) { |
77 | 82 |
super(); |
Also available in: Unified diff