svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.expressionevaluator / org.gvsig.expressionevaluator.geometry / org.gvsig.expressionevaluator.geometry.lib / org.gvsig.expressionevaluator.geometry.lib.impl / src / main / java / org / gvsig / expressionevaluator / impl / DefaultGeometryExpressionBuilder.java @ 47598
History | View | Annotate | Download (8.47 KB)
1 |
package org.gvsig.expressionevaluator.impl; |
---|---|
2 |
|
3 |
import org.cresques.cts.IProjection; |
4 |
import org.gvsig.expressionevaluator.ExpressionBuilder; |
5 |
import org.gvsig.expressionevaluator.ExpressionEvaluatorManager; |
6 |
import org.gvsig.expressionevaluator.GeometryExpressionBuilder; |
7 |
import org.gvsig.expressionevaluator.GeometryExpressionBuilderHelper; |
8 |
import org.gvsig.fmap.geom.Geometry; |
9 |
import org.gvsig.fmap.geom.primitive.Envelope; |
10 |
|
11 |
/**
|
12 |
*
|
13 |
* @author jjdelcerro
|
14 |
*/
|
15 |
public class DefaultGeometryExpressionBuilder |
16 |
extends DefaultExpressionBuilder
|
17 |
implements GeometryExpressionBuilder {
|
18 |
|
19 |
private final DefaultGeometryExpressionBuilderHelper helper; |
20 |
|
21 |
public DefaultGeometryExpressionBuilder(ExpressionEvaluatorManager manager) {
|
22 |
super(manager);
|
23 |
this.helper = new DefaultGeometryExpressionBuilderHelper(this); |
24 |
} |
25 |
|
26 |
@Override
|
27 |
public ExpressionBuilder builder() {
|
28 |
return this; |
29 |
} |
30 |
|
31 |
@Override
|
32 |
public GeometrySupportType geometry_support_type() {
|
33 |
return this.helper.geometry_support_type(); |
34 |
} |
35 |
|
36 |
@Override
|
37 |
public GeometryExpressionBuilderHelper geometry_support_type(GeometrySupportType geometrySupportType) {
|
38 |
return this.helper.geometry_support_type(geometrySupportType); |
39 |
} |
40 |
|
41 |
@Override
|
42 |
public Object srs_id(IProjection projection) { |
43 |
return this.helper.srs_id(projection); |
44 |
} |
45 |
|
46 |
@Override
|
47 |
public GeometryParameter parameter(String name) { |
48 |
return this.helper.parameter(name); |
49 |
} |
50 |
|
51 |
@Override
|
52 |
public GeometryParameter parameter(Object value) { |
53 |
return this.helper.parameter(value); |
54 |
} |
55 |
|
56 |
@Override
|
57 |
public GeometryParameter parameter() {
|
58 |
return this.helper.parameter(); |
59 |
} |
60 |
|
61 |
@Override
|
62 |
public Constant constant(Object value) { |
63 |
if( value instanceof Geometry ) { |
64 |
return this.helper.geometry((Geometry) value); |
65 |
} |
66 |
return super.constant(value); |
67 |
} |
68 |
|
69 |
@Override
|
70 |
public Constant geometry(Geometry geom, IProjection srs) {
|
71 |
return this.helper.geometry(geom, srs); |
72 |
} |
73 |
|
74 |
@Override
|
75 |
public Constant geometry(Geometry geom) {
|
76 |
return this.helper.geometry(geom); |
77 |
} |
78 |
|
79 |
@Override
|
80 |
public Constant envelope(Envelope envelope, IProjection srs) {
|
81 |
return this.helper.envelope(envelope, srs); |
82 |
} |
83 |
|
84 |
@Override
|
85 |
public Constant envelope(Envelope envelope) {
|
86 |
return this.helper.envelope(envelope); |
87 |
} |
88 |
|
89 |
@Override
|
90 |
public Constant srs(IProjection srs) {
|
91 |
return this.helper.srs(srs); |
92 |
} |
93 |
|
94 |
@Override
|
95 |
public Function as_geometry(Value value) {
|
96 |
return this.helper.as_geometry(value); |
97 |
} |
98 |
|
99 |
@Override
|
100 |
public Function ST_Area(Value geom) {
|
101 |
return this.helper.ST_Area(geom); |
102 |
} |
103 |
|
104 |
@Override
|
105 |
public Function ST_AsBinary(Value geom) {
|
106 |
return this.helper.ST_AsBinary(geom); |
107 |
} |
108 |
|
109 |
@Override
|
110 |
public Function ST_AsEWKB(Value geom) {
|
111 |
return this.helper.ST_AsEWKB(geom); |
112 |
} |
113 |
|
114 |
@Override
|
115 |
public Function ST_AsText(Value geom) {
|
116 |
return this.helper.ST_AsText(geom); |
117 |
} |
118 |
|
119 |
@Override
|
120 |
public Function ST_Buffer(Value geom) {
|
121 |
return this.helper.ST_Buffer(geom); |
122 |
} |
123 |
|
124 |
@Override
|
125 |
public Function ST_Buffer(Value geom, Value dist) {
|
126 |
return this.helper.ST_Buffer(geom, dist); |
127 |
} |
128 |
|
129 |
@Override
|
130 |
public Function ST_Centroid(Value geom) {
|
131 |
return this.helper.ST_Centroid(geom); |
132 |
} |
133 |
|
134 |
@Override
|
135 |
public Function ST_Contains(Value geom1, Value geom2) {
|
136 |
return this.helper.ST_Contains(geom1, geom2); |
137 |
} |
138 |
|
139 |
@Override
|
140 |
public Function ST_CoveredBy(Value geom1, Value geom2) {
|
141 |
return this.helper.ST_CoveredBy(geom1, geom2); |
142 |
} |
143 |
|
144 |
@Override
|
145 |
public Function ST_Covers(Value geom1, Value geom2) {
|
146 |
return this.helper.ST_Covers(geom1, geom2); |
147 |
} |
148 |
|
149 |
@Override
|
150 |
public Function ST_Crosses(Value geom1, Value geom2) {
|
151 |
return this.helper.ST_Crosses(geom1, geom2); |
152 |
} |
153 |
|
154 |
@Override
|
155 |
public Function ST_Diference(Value geom1, Value geom2) {
|
156 |
return this.helper.ST_Diference(geom1, geom2); |
157 |
} |
158 |
|
159 |
@Override
|
160 |
public Function ST_Dimension(Value geom) {
|
161 |
return this.helper.ST_Dimension(geom); |
162 |
} |
163 |
|
164 |
@Override
|
165 |
public Function ST_Disjoint(Value geom1, Value geom2) {
|
166 |
return this.helper.ST_Disjoint(geom1, geom2); |
167 |
} |
168 |
|
169 |
@Override
|
170 |
public Function ST_Distance(Value geom1, Value geom2) {
|
171 |
return this.helper.ST_Distance(geom1, geom2); |
172 |
} |
173 |
|
174 |
@Override
|
175 |
public Function ST_EndPoint(Value geom) {
|
176 |
return this.helper.ST_EndPoint(geom); |
177 |
} |
178 |
|
179 |
@Override
|
180 |
public Function ST_Envelope(Value geom) {
|
181 |
return this.helper.ST_Envelope(geom); |
182 |
} |
183 |
|
184 |
@Override
|
185 |
public Function ST_Equals(Value geom1, Value geom2) {
|
186 |
return this.helper.ST_Equals(geom1, geom2); |
187 |
} |
188 |
|
189 |
@Override
|
190 |
public Function ST_GeomFromText(Value geom, Value crs) {
|
191 |
return this.helper.ST_GeomFromText(geom, crs); |
192 |
} |
193 |
|
194 |
@Override
|
195 |
public Function ST_GeomFromWKB(Value geom, Value crs) {
|
196 |
return this.helper.ST_GeomFromWKB(geom, crs); |
197 |
} |
198 |
|
199 |
@Override
|
200 |
public Function ST_GeomFromEWKB(Value geom, Value crs) {
|
201 |
return this.helper.ST_GeomFromEWKB(geom, crs); |
202 |
} |
203 |
|
204 |
@Override
|
205 |
public Function ST_Intersection(Value geom1, Value geom2) {
|
206 |
return this.helper.ST_Intersection(geom1, geom2); |
207 |
} |
208 |
|
209 |
@Override
|
210 |
public Function ST_Intersects(Value geom1, Value geom2) {
|
211 |
return this.helper.ST_Intersects(geom1, geom2); |
212 |
} |
213 |
|
214 |
@Override
|
215 |
public Function andand(Value geom1, Value geom2) {
|
216 |
return this.helper.andand(geom1, geom2); |
217 |
} |
218 |
|
219 |
@Override
|
220 |
public Function ST_IsClosed(Value geom) {
|
221 |
return this.helper.ST_IsClosed(geom); |
222 |
} |
223 |
|
224 |
@Override
|
225 |
public Function ST_IsSimple(Value geom) {
|
226 |
return this.helper.ST_IsSimple(geom); |
227 |
} |
228 |
|
229 |
@Override
|
230 |
public Function ST_IsValid(Value geom) {
|
231 |
return this.helper.ST_IsValid(geom); |
232 |
} |
233 |
|
234 |
@Override
|
235 |
public Function ST_Force2D(Value geom) {
|
236 |
return this.helper.ST_Force2D(geom); |
237 |
} |
238 |
|
239 |
@Override
|
240 |
public Function ST_NumGeometries(Value geom) {
|
241 |
return this.helper.ST_NumGeometries(geom); |
242 |
} |
243 |
|
244 |
@Override
|
245 |
public Function ST_NumPoints(Value geom) {
|
246 |
return this.helper.ST_NumPoints(geom); |
247 |
} |
248 |
|
249 |
@Override
|
250 |
public Function ST_Overlaps(Value geom1, Value geom2) {
|
251 |
return this.helper.ST_Overlaps(geom1, geom2); |
252 |
} |
253 |
|
254 |
@Override
|
255 |
public Function ST_Perimeter(Value geom) {
|
256 |
return this.helper.ST_Perimeter(geom); |
257 |
} |
258 |
|
259 |
@Override
|
260 |
public Function ST_Point(Value x, Value y) {
|
261 |
return this.helper.ST_Point(x,y); |
262 |
} |
263 |
|
264 |
@Override
|
265 |
public Function ST_MakePoint(Value x, Value y) {
|
266 |
return this.helper.ST_MakePoint(x, y); |
267 |
} |
268 |
|
269 |
@Override
|
270 |
public Function ST_MakePoint(Value x, Value y, Value z) {
|
271 |
return this.helper.ST_MakePoint(x, y, z); |
272 |
} |
273 |
|
274 |
@Override
|
275 |
public Function ST_MakePoint(Value x, Value y, Value z, Value m) {
|
276 |
return this.helper.ST_MakePoint(x, y , z); |
277 |
} |
278 |
|
279 |
@Override
|
280 |
public Function ST_PointN(Value geom, Value n) {
|
281 |
return this.helper.ST_PointN(geom, n); |
282 |
} |
283 |
|
284 |
@Override
|
285 |
public Function ST_SRID(Value geom) {
|
286 |
return this.helper.ST_SRID(geom); |
287 |
} |
288 |
|
289 |
@Override
|
290 |
public Function ST_SetSRID(Value geom, Value srid) {
|
291 |
return this.helper.ST_SetSRID(geom, srid); |
292 |
} |
293 |
|
294 |
@Override
|
295 |
public Function ST_StartPoint(Value geom) {
|
296 |
return this.helper.ST_StartPoint(geom); |
297 |
} |
298 |
|
299 |
@Override
|
300 |
public Function ST_Simplify(Value geom, Value tolerance) {
|
301 |
return this.helper.ST_Simplify(geom, tolerance); |
302 |
} |
303 |
|
304 |
@Override
|
305 |
public Function ST_Touches(Value geom1, Value geom2) {
|
306 |
return this.helper.ST_Touches(geom1, geom2); |
307 |
} |
308 |
|
309 |
@Override
|
310 |
public Function ST_Union(Value geom1, Value geom2) {
|
311 |
return this.helper.ST_Union(geom1, geom2); |
312 |
} |
313 |
|
314 |
@Override
|
315 |
public Function ST_Within(Value geom1, Value geom2) {
|
316 |
return this.helper.ST_Within(geom1, geom2); |
317 |
} |
318 |
|
319 |
@Override
|
320 |
public Function ST_X(Value geom) {
|
321 |
return this.helper.ST_X(geom); |
322 |
} |
323 |
|
324 |
@Override
|
325 |
public Function ST_Y(Value geom) {
|
326 |
return this.helper.ST_Y(geom); |
327 |
} |
328 |
|
329 |
@Override
|
330 |
public Function ST_Z(Value geom) {
|
331 |
return this.helper.ST_Z(geom); |
332 |
} |
333 |
|
334 |
@Override
|
335 |
public Function ST_UnionAggregate(Value geom) {
|
336 |
return this.helper.ST_UnionAggregate(geom); |
337 |
} |
338 |
|
339 |
@Override
|
340 |
public Function ST_ExtentAggregate(Value geom) {
|
341 |
return this.helper.ST_ExtentAggregate(geom); |
342 |
} |
343 |
|
344 |
} |