Revision 45593
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 | ||
---|---|---|
22 | 22 |
*/ |
23 | 23 |
package org.gvsig.fmap.mapcontext.layers.vectorial; |
24 | 24 |
|
25 |
import java.util.Objects; |
|
25 | 26 |
import org.cresques.cts.IProjection; |
26 | 27 |
import org.gvsig.expressionevaluator.ExpressionBuilder; |
27 | 28 |
import org.gvsig.expressionevaluator.GeometryExpressionBuilder; |
... | ... | |
34 | 35 |
import org.gvsig.tools.evaluator.AbstractEvaluator; |
35 | 36 |
import org.gvsig.tools.evaluator.EvaluatorData; |
36 | 37 |
import org.gvsig.tools.evaluator.EvaluatorException; |
38 |
import org.slf4j.Logger; |
|
39 |
import org.slf4j.LoggerFactory; |
|
37 | 40 |
|
38 | 41 |
public class IntersectsEnvelopeEvaluator extends AbstractEvaluator { |
39 | 42 |
|
43 |
private static final Logger LOGGER = LoggerFactory.getLogger(IntersectsEnvelopeEvaluator.class); |
|
44 |
|
|
40 | 45 |
private final Envelope envelope; |
41 | 46 |
private final String geomName; |
42 | 47 |
private final boolean isDefault; |
... | ... | |
91 | 96 |
public String getSQL() { |
92 | 97 |
ExpressionBuilder.Variable column = builder.column(fad.getName()); |
93 | 98 |
IProjection theProjection = this.projection; |
99 |
LOGGER.debug("Envelope projection = '"+Objects.toString(theProjection)+"'"); |
|
94 | 100 |
if( this.fad.getSRS()==null ) { |
101 |
LOGGER.debug("fad SRS NULL use NULL projection'"); |
|
95 | 102 |
theProjection = null; |
96 | 103 |
} |
97 |
return builder.set(
|
|
104 |
String s = builder.set(
|
|
98 | 105 |
builder.and( |
99 | 106 |
builder.not_is_null(column) , |
100 | 107 |
builder.ST_Intersects( |
... | ... | |
103 | 110 |
) |
104 | 111 |
) |
105 | 112 |
).toString(); |
113 |
LOGGER.debug("Intersects SQL = '"+s+"'"); |
|
114 |
return s; |
|
106 | 115 |
} |
107 | 116 |
} |
Also available in: Unified diff