Revision 44369 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

View differences:

IntersectsEnvelopeEvaluator.java
89 89
    @Override
90 90
    public String getSQL() {
91 91
        ExpressionBuilder.Variable column = builder.column(fad.getName());
92
        IProjection theProjection = this.projection;
93
        if( this.fad.getSRS()==null ) {
94
            theProjection = null;
95
        }
92 96
        return builder.set(
93 97
                builder.and(
94 98
                    builder.not_is_null(column)    ,
95 99
                    builder.ST_Intersects(
96
                            builder.ST_Envelope(column),
97
                            builder.geometry(envelope.getGeometry(), this.projection)
100
                            column,
101
                            builder.geometry(envelope.getGeometry(), theProjection)
98 102
                    )
99 103
                )
100 104
        ).toString();

Also available in: Unified diff