Revision 44043 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/vectorial/IntersectsEnvelopeEvaluator.java
IntersectsEnvelopeEvaluator.java | ||
---|---|---|
23 | 23 |
package org.gvsig.fmap.mapcontext.layers.vectorial; |
24 | 24 |
|
25 | 25 |
import org.cresques.cts.IProjection; |
26 |
import org.gvsig.fmap.dal.ExpressionBuilder;
|
|
26 |
import org.gvsig.expressionevaluator.ExpressionBuilder;
|
|
27 | 27 |
|
28 | 28 |
import org.gvsig.fmap.dal.feature.Feature; |
29 | 29 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
... | ... | |
43 | 43 |
private final IProjection projection; |
44 | 44 |
private final ExpressionBuilder builder; |
45 | 45 |
FeatureAttributeDescriptor fad; |
46 |
|
|
47 |
/** |
|
48 |
* @param envelope |
|
49 |
* @param envelopeProjection |
|
50 |
* @param featureType |
|
51 |
* @param geomName |
|
52 |
* @deprecated use @{link org.gvsig.fmap.mapcontext.layers.vectorial.SpatialEvaluatorsFactory} |
|
53 |
*/ |
|
54 |
public IntersectsEnvelopeEvaluator( |
|
55 |
Envelope envelope, |
|
56 |
IProjection envelopeProjection, |
|
57 |
FeatureType featureType, |
|
58 |
String geomName |
|
59 |
) { |
|
60 |
this( |
|
61 |
envelope, |
|
62 |
envelopeProjection, |
|
63 |
featureType, |
|
64 |
geomName, |
|
65 |
SpatialEvaluatorsFactory.getInstance().createBuilder() |
|
66 |
); |
|
67 |
} |
|
68 |
|
|
46 |
|
|
69 | 47 |
IntersectsEnvelopeEvaluator( |
70 | 48 |
Envelope envelope, |
71 | 49 |
IProjection envelopeProjection, |
... | ... | |
110 | 88 |
|
111 | 89 |
@Override |
112 | 90 |
public String getSQL() { |
113 |
// Los gestores de BBDD no usan indices si se envuelve la columna |
|
114 |
// geometria con la funcion ST_envelope. |
|
115 |
|
|
116 | 91 |
return builder.set( |
117 | 92 |
builder.ST_Intersects( |
118 |
builder.geometry(envelope.getGeometry(), this.projection), |
|
119 |
// builder.ST_Envelope(builder.column(geomName)) |
|
120 |
builder.column(fad) |
|
93 |
builder.ST_Envelope(builder.column(fad.getName())), |
|
94 |
builder.geometry(envelope.getGeometry(), this.projection) |
|
121 | 95 |
) |
122 | 96 |
).toString(); |
123 | 97 |
} |
Also available in: Unified diff