jonathan: thuban/test test_baserenderer.py, 1.10, 1.11 test_layer.py, 1.34, 1.35

Jonathan Coles jonathan at jpcoles.com
Fri Feb 18 16:04:05 CET 2005


Am Freitag, den 18.02.2005, 11:50 +0100 schrieb Bernhard Herzog:
> > baserenderer will have to get those
> > values before it calls ProjectRasterFile and then the tests that use
> > baserenderer will fail because the call chain will use wxPython.
> 
> There are at least two solutions:
> 
>       - BaseRenderer's draw_raster_layer method calls ProjectRasterFile
>         through a new method that can be overwritten by a derived class

i went with this solution as i thought it would give the most
flexibility. i was able to remove the wxPython dependencies from
baserenderer.py and also the dependency on gdal. the new method
projected_raster_layer() is overridden in MapRenderer. If a deriving
class doesn't support raster projection (or gdal isn't present) the
method may return None. The result (if not None) is passed to
draw_raster_data. 

i added a new option bit to the options parameter in ProjectRasterFile
which selects to invert the mask or not so the wxPython dependency was
removed from gdalwarp as well. there are appropriate tests for the
different options.

--jonathan

-- 
=====================================================================
 Jonathan Coles                               http://www.jpcoles.com
 jonathan at jpcoles.com                    GnuPG Key: /gpg_pub_key.asc
=====================================================================




More information about the Thuban-devel mailing list

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