BoundsExtractor returns wrong envelope
--------------------------------------
Key: GEOT-1422
URL: http://jira.codehaus.org/browse/GEOT-1422
Project: GeoTools
Issue Type: Bug
Components: core render
Affects Versions: 2.3.2
Environment: All environments
Reporter: Erik Lovlie
Assignee: Jesse Eichar
Fix For: 2.3.2
Attachments: BoundsExtractorTest.java
org.geotools.renderer.lite.BoundsExtractor returns wrong envelope for certain
input filters. Three cases have been identified so far (I list just the
expressions which fail):
1. geometryFilter AND (orFilter1 OR orFilter2)
2. geometryFilter OR (orFilter1 OR orFilter2)
Using the filters (respectively) which returns the following from the
toString() method:
[[ POLYGON ((-10 -11, 10 -11, 10 11, -10 11, -10 -11)) contains geom ] AND [[
attr = 1 ] OR [ attr = 2 ]]]
[[ POLYGON ((-10 -11, 10 -11, 10 11, -10 11, -10 -11)) contains geom ] OR [[
attr = 1 ] OR [ attr = 2 ]]]
and then calling BoundsExtractor.getBBox() returns the following envelope (in
both case 1 and 2):
Env[-10.0 : -10.0, -11.0 : -11.0]
This is clearly wrong, the correct result is Env[-10.0 : 10.0, -11.0 : 11.0].
3. geometryFilter1 OR (NOT geometryFilter2)
Using the filter which returns the following from the toString() method:
[[ POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)) contains geom ] OR NOT [ POLYGON ((2 0,
3 0, 3 1, 2 1, 2 0)) contains geom ]]
and then calling BoundsExtractor.getBBox() returns the following envelope:
Env[0.0 : 1.0, 0.0 : 1.0]
which is wrong. The correct result is Env[NEG_INF : POS_INF, NEG_INF : POS_INF].
In the supplied unit test the following tests fail:
- test_Poly_OR_NOT_Poly
- test_Polygon_AND_ORLogic
- test_Polygon_OR_ORLogic
The test was developed using java 1.5 features, so minor tweaking may be
necessary.
--
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