[bug #2845] (thuban) Fix Layer.ClipBoundingBox

Request Tracker thuban-bugs at intevation.de
Tue Dec 14 18:23:23 CET 2004


this bug's URL: http://intevation.de/rt/webrt?serial_num=2845
-------------------------------------------------------------------------

Subject: Fix Layer.ClipBoundingBox

The method ClipBoundingBox of the class Layer doesn't make much sense as it
stands now.  If it is supposed to do clipping it shouldn't return the
parameter unchanged when it lies completely outside of the bounding box.  It
would be better to return None and return an empty list in ShapesInRegion in
that case.

Furthermore, it's only called in one place in Layer.  I don't think the method
should be public (especially as it is implemented now).  Therefore, it
shouldn't be called directly in the test cases.  Instead a test case should be
written that would fail if ShapesInRegion did call ClipBoundingBox.  Of course
the test should be written so that it would trigger the bug that was fixed by
introducing  
ClipBoundingBox (IIRC the bug had something todo with projections and bounding
boxes containing NaN or INF when the parameter to ShapesInRegion covered the
entire earth or something similarly large).



-------------------------------------------- Managed by Request Tracker




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)