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/CrossEnvelopeEvaluator.java
CrossEnvelopeEvaluator.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 |
* @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 CrossEnvelopeEvaluator( |
|
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 |
CrossEnvelopeEvaluator( |
70 | 48 |
Envelope envelope, |
... | ... | |
79 | 57 |
this.envelope = envelope; |
80 | 58 |
this.projection = envelopeProjection; |
81 | 59 |
this.builder = builder; |
82 |
// this.srs = envelopeProjection.getAbrev(); |
|
83 |
// this.projection=CRSFactory.getCRS(fad.getSRS()); |
|
84 |
// this.envelopeProjection=envelopeProjection; |
|
85 |
// ICoordTrans ct = null; |
|
86 |
// if (!this.srs.equals(fad.getSRS())) { // FIXME comparaci�n |
|
87 |
// ct = envelopeProjection.getCT(fad.getSRS()); |
|
88 |
// } |
|
89 |
// if (ct != null) { |
|
90 |
// this.envelopeTrans = envelope.convert(ct); |
|
91 |
// } else { |
|
92 | 60 |
this.envelopeTrans = envelope; |
93 |
// } |
|
94 | 61 |
this.geomName = geomName; |
95 | 62 |
|
96 | 63 |
this.getFieldsInfo().addMatchFieldValue(geomName, envelopeTrans); |
97 |
|
|
98 | 64 |
} |
99 | 65 |
|
100 | 66 |
@Override |
... | ... | |
128 | 94 |
return this.builder.set( |
129 | 95 |
builder.ST_Intersects( |
130 | 96 |
builder.envelope(envelope, projection), |
131 |
builder.ST_Envelope(builder.column(fad)) |
|
97 |
builder.ST_Envelope(builder.column(fad.getName()))
|
|
132 | 98 |
) |
133 | 99 |
).toString(); |
134 | 100 |
} |
Also available in: Unified diff