Andrea Aime ha scritto:
> sfarber ha scritto:
>> No big hullabaloo about this, so I'm going to commit. Check back on the page
>> linked below to keep up on the status of the work.
>
> Saul,
> I think I've found an issue with FilterCapabilities and pre/post filter
> changes.
> The issue being that all datastores besides maybe arcsde do declare
> capabilities only the old way, using ints. This is interpreted by the
> filter splitter as not being able to encode the new filters, as a
> result, none of the new filters gets encoded.
>
> This has not been caught by current unit tests, because they still do
> use the old filters, but my versioned data store is new, and it's using
> the new filters in its unit tests.
Oh well, I went and updated (only on my PC for the moment) the postgis
capabilities to declare opengis filter capabilities as well.
The result look like the following (I added the opengis filter class
after each of the old filters code):
protected FilterCapabilities createFilterCapabilities() {
FilterCapabilities capabilities = new FilterCapabilities();
capabilities.addType(FilterCapabilities.NONE);
capabilities.addType(IncludeFilter.class);
capabilities.addType(FilterCapabilities.ALL);
capabilities.addType(ExcludeFilter.class);
capabilities.addType(FilterCapabilities.FID);
capabilities.addType(Id.class);
capabilities.addType(FilterCapabilities.NULL_CHECK);
capabilities.addType(PropertyIsNull.class);
capabilities.addType(FilterCapabilities.BETWEEN);
capabilities.addType(PropertyIsBetween.class);
capabilities.addType(FilterCapabilities.LOGICAL);
capabilities.addAll(FilterCapabilities.LOGICAL_OPENGIS);
capabilities.addType(FilterCapabilities.SIMPLE_ARITHMETIC);
capabilities.addType(Add.class);
capabilities.addType(Multiply.class);
capabilities.addType(Subtract.class);
capabilities.addType(Divide.class);
capabilities.addType(FilterCapabilities.SIMPLE_COMPARISONS);
capabilities.addAll(FilterCapabilities.SIMPLE_COMPARISONS_OPENGIS);
capabilities.addType(FilterCapabilities.SPATIAL_BBOX);
capabilities.addType(BBOX.class);
capabilities.addType(FilterCapabilities.LIKE);
capabilities.addType(PropertyIsLike.class);
if (supportsGEOS) {
capabilities.addType(FilterCapabilities.SPATIAL_CONTAINS);
capabilities.addType(Contains.class);
capabilities.addType(FilterCapabilities.SPATIAL_CROSSES);
capabilities.addType(Crosses.class);
capabilities.addType(FilterCapabilities.SPATIAL_DISJOINT);
capabilities.addType(Disjoint.class);
capabilities.addType(FilterCapabilities.SPATIAL_EQUALS);
capabilities.addType(Equals.class);
capabilities.addType(FilterCapabilities.SPATIAL_INTERSECT);
capabilities.addType(Intersects.class);
capabilities.addType(FilterCapabilities.SPATIAL_OVERLAPS);
capabilities.addType(Overlaps.class);
capabilities.addType(FilterCapabilities.SPATIAL_TOUCHES);
capabilities.addType(Touches.class);
capabilities.addType(FilterCapabilities.SPATIAL_WITHIN);
capabilities.addType(Within.class);
}
// TODO: add SPATIAL_BEYOND, DWITHIN to capabilities and support in
// visit(GeometryFilter)
return capabilities;
}
I think this may be useful as a reference for other people too.
Did I forget anything? Oh, btw, it would be nice to have a
SIMPLE_ARIGHMETIC_OPENGIS constant to mimic the original SIMPLE_ARITHMETIC.
Cheers
Andrea
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel