BBox-capablities is not recognized
----------------------------------

                 Key: GEOT-1550
                 URL: http://jira.codehaus.org/browse/GEOT-1550
             Project: GeoTools
          Issue Type: Bug
          Components: core filter
    Affects Versions: 2.4-RC0
            Reporter: Stefan Hansen


There is a small problem in 
org.geotools.filter.visitor.PostPreProcessFilterSplittingVisitor.java. This 
time in the function Object visit(BBOX filter, Object notUsed).

Whenever I used a BBOX-filter with WFS-datastore, it got treated as a 
postfilter, because the the data store always returned false for 
supports(BBOX.class). Even though the cascaded WFS does support BBOX-filters. 
However, when the capabilites of the cascaded WFS are parsed the ability to 
support BBOX-filters is set as FilterCapabilities.SPATIAL_BBOX. And 
supports(FilterCapabilities.SPATIAL_BBOX) returns true, even if 
supports(BBOX.class) is false.

Here is the code snippet that causes the problem:

       public Object visit(BBOX filter, Object notUsed) {
            if (!fcs.supports(BBOX.class)) {
                postStack.push(filter);
            } else {
                preStack.push(filter);
            }
            return null;
        }

And my suggestion to solve this issue is:

       public Object visit(BBOX filter, Object notUsed) {
            if (fcs.supports(FilterCapabilities.SPATIAL_BBOX) || 
fcs.supports(BBOX.class)) {
                preStack.push(filter);
            } else {
                postStack.push(filter);
            }
            return null;
        }
 
Maybe fcs.supports(BBOX.class) could be removed, but maybe it is used by 
another data store. So far it doesn't hurt...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to