Hi,
today I've been trying to fix http://jira.codehaus.org/browse/GEOT-1736
The thing is, there is code building bbox filters like:

GeometryFilter filter = ff.createGeometryFilter(FilterType.GEOMETRY_BBOX);
filter.addLeftGeometry((Expression) ff.property("geom"));
filter.addRightGeometry(ff.createBBoxExpression(new Envelope(0,10,0,10)));

and this code does not initializes the minx,miny,maxx,maxy fields
of BBOXImpl at all, making it impossible to clone or encode the
filter (at least when the filter encoder uses the BBOX interface,
which is somthing only the DB2 module and the ArcSDE ones do afaik).

That is, by using the old filter API and setting the expressions
directly. Since it is still possible to use those code paths,
I've tried to fix the code by getting minx/miny/maxx/maxy
when the expression is set. This code requires that the first
expression is a property name, and the second a literal that can
be converted into an envelope.

So far so good, the fix works in geoserver, but there are various
tests in gt2 that do silly things, like:
* build a bbox filter with two literals
* build a bbox filter with the expressions exchanged, that is, first
   the bbox and then the property name

These are both invalid, and my take would be to just fix the tests
doing so by recoding them to use a proper bbox building code.

Any objections to that?
Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to