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/ContainsEnvelopeEvaluator.java
ContainsEnvelopeEvaluator.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 ExpressionBuilder builder; |
44 | 44 |
private final IProjection projection; |
45 | 45 |
private final FeatureAttributeDescriptor fad; |
46 |
|
|
47 |
/** |
|
48 |
* @deprecated use @{link org.gvsig.fmap.mapcontext.layers.vectorial.SpatialEvaluatorsFactory} |
|
49 |
* @param envelope |
|
50 |
* @param envelopeProjection |
|
51 |
* @param featureType |
|
52 |
* @param geomName |
|
53 |
*/ |
|
54 |
public ContainsEnvelopeEvaluator( |
|
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 |
ContainsEnvelopeEvaluator( |
70 | 48 |
Envelope envelope, |
71 | 49 |
IProjection envelopeProjection, |
... | ... | |
78 | 56 |
this.projection = envelopeProjection; |
79 | 57 |
this.builder = builder; |
80 | 58 |
this.envelope = envelope; |
81 |
// this.srs = envelopeProjection.getAbrev(); |
|
82 |
// this.projection=CRSFactory.getCRS(fad.getSRS()); |
|
83 |
// this.envelopeProjection=envelopeProjection; |
|
84 |
// ICoordTrans ct = null; |
|
85 |
// if (!this.srs.equals(fad.getSRS())) { // FIXME comparaci�n |
|
86 |
// ct = envelopeProjection.getCT(fad.getSRS()); |
|
87 |
// } |
|
88 |
// if (ct != null) { |
|
89 |
// this.envelopeTrans = envelope.convert(ct); |
|
90 |
// } else { |
|
91 | 59 |
this.envelopeTrans = envelope; |
92 |
// } |
|
93 | 60 |
this.geomName = geomName; |
94 | 61 |
this.getFieldsInfo().addMatchFieldValue(geomName, envelopeTrans); |
95 |
|
|
96 | 62 |
} |
97 | 63 |
|
98 | 64 |
@Override |
... | ... | |
122 | 88 |
return this.builder.set( |
123 | 89 |
builder.ST_Contains( |
124 | 90 |
builder.envelope(envelope, projection), |
125 |
builder.column(fad) |
|
91 |
builder.column(fad.getName())
|
|
126 | 92 |
) |
127 | 93 |
).toString(); |
128 | 94 |
} |
Also available in: Unified diff