Sorry about that. Maybe I shouldn't write emails Monday morning... Both bugs I reported are in the branch 2.4.x. I just created for both a jira-issue.
http://jira.codehaus.org/browse/GEOT-1549 http://jira.codehaus.org/browse/GEOT-1550 If you are happy with my solutions of the problems, of course I can commit my changes to the repository. cheers, stefan ps. And please ignore the debug-output in the code snippets. Cameron Shorter wrote: > Stefan, > For these 2 issues you have found, I suggest you create an issue in > the Geoserver issue tracker. > I understand that you have fixed these issues in your branch. I > suggest you reference the svn version you committed which makes it > easier to review. > Be specific about what you would like, and how you can help. In this > case, ask if it is ok if you can commit this patch back to the trunk, > or if someone else can do it for you. > > Geotools, > I suggest requesting codehaus track geotools with > http://fisheye.codehaus.org/ > It provides lots of useful metics and web based svn diffs. > > Stefan Hansen wrote: >> Dear list! >> >> I discovered a small problem in the function visit(GeometryFilter >> filter) of >> org.geotools.filter.visitor.PostPreProcessFilterSplittingVisitor.java. >> >> If the given filter is a FilterType.GEOMETRY_BBOX containing a BBOX >> that lies completely outside the maxbox, the BBOX in the filter gets >> altered. Because of this, sometimes features are returned, that are >> not in the requested BBOX. >> >> Here is the code snippet of which I think causes the problem: >> >> if(bbox!=null){ >> boolean changed = false; >> double minx,miny,maxx,maxy; >> minx = bbox.getMinX(); >> miny = bbox.getMinY(); >> maxx = bbox.getMaxX(); >> maxy = bbox.getMaxY(); >> if(minx < maxbbox.getMinX()){ >> minx = maxbbox.getMinX(); >> changed = true; >> } >> if(maxx > maxbbox.getMaxX()){ >> maxx = maxbbox.getMaxX(); >> changed = true; >> } >> if(miny < maxbbox.getMinY()){ >> miny = maxbbox.getMinY(); >> changed = true; >> } >> if(maxy > maxbbox.getMaxY()){ >> maxy = maxbbox.getMaxY(); >> changed = true; >> } >> if(changed){ >> Envelope tmp = new >> Envelope(minx,maxx,miny,maxy); >> try { >> le.setLiteral((new >> GeometryFactory()).toGeometry(tmp)); >> } catch >> (IllegalFilterException e) { >> >> logger.warning(e.toString()); >> } >> } >> >> And here is my solution, which is supposed to alter the BBOX only if >> it overlaps the maxbox: >> >> if(bbox!=null){ >> logger.warning("sh: >> GeometryFilter: BBOX!=null"); >> boolean changed = false; >> double minx,miny,maxx,maxy; >> minx = bbox.getMinX(); >> miny = bbox.getMinY(); >> maxx = bbox.getMaxX(); >> maxy = bbox.getMaxY(); >> if(minx < maxbbox.getMinX() && >> maxx > maxbbox.getMinX()){ >> minx = maxbbox.getMinX(); >> changed = true; >> } >> if(maxx > maxbbox.getMaxX() && >> minx < maxbbox.getMaxX()){ >> maxx = maxbbox.getMaxX(); >> changed = true; >> } >> if(miny < maxbbox.getMinY() && >> maxy > maxbbox.getMinY()){ >> miny = maxbbox.getMinY(); >> changed = true; >> } >> if(maxy > maxbbox.getMaxY() && >> miny > maxbbox.getMaxY()){ >> maxy = maxbbox.getMaxY(); >> changed = true; >> } >> if(changed){ >> logger.warning("sh: >> GeometryFilter: Changed true"); >> Envelope tmp = new >> Envelope(minx,maxx,miny,maxy); >> try { >> le.setLiteral((new >> GeometryFactory()).toGeometry(tmp)); >> } catch >> (IllegalFilterException e) { >> >> logger.warning(e.toString()); >> } >> } >> >> cheers, >> stefan >> >> ------------------------------------------------------------------------- >> >> 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 >> >> > > ------------------------------------------------------------------------- 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
