ExtractBoundsFilterVisitor does not handle intersect queries correctly
----------------------------------------------------------------------

                 Key: GEOT-2609
                 URL: http://jira.codehaus.org/browse/GEOT-2609
             Project: GeoTools
          Issue Type: Bug
          Components: data shapefile
    Affects Versions: 2.6-M1
            Reporter: Jesse Eichar
            Assignee: Andrea Aime


I have the following filter:  

[[ POLYGON (( ... )) intersects the_geom ] OR [ POLYGON (( ... )) intersects 
the_geom ]]

The "the_geom" part is a PropertyName expression.  In 
ExtractBoundsFilterVisitor it returns null for this type of expression.  
Problem is that when OR and AND try to combine the geometries a 
NullPointerException is thrown because of the null.  

I am thinking that we should simply return the envelope that is contained in 
data parameter should be returned.  Reason is that in this case the bbox that 
we care about is the polygon.  But if you look at the code for intersects (and 
others) it is:

        data = filter.getExpression1().accept(this, data);
        data = filter.getExpression2().accept(this, data);

So we get the bbox we care about for the first assignment to data, then we get 
null for the second.  If I construct my in the other order (geometry first) the 
expected behaviour occurs.  

Hope that makes sense :)

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

        

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to