[Qgis-developer] Rejigging raster layer drawing

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Thu Apr 26 07:43:28 EDT 2007


I've been digging deep into the raster layer draw code, and it seems to 
have a lot of cruft lying around. Exhibit A is the unused method, 
QgsRasterLayer::drawPalettedSingleBandColor, which I guess is related to 
the unused drawing style of 'PALETTED_COLOR' - these things are defined 
but not referenced anywhere...

The pseudo-color stuff is a bit crocky too, with colouring techniques 
hard coded into the draw methods. Pseudo-color just seems to be a 
modification of the paletted drawing methods.

I think this code could all be simplified into a more unified set of 
drawing methods, using user-defined colour palettes to produce colour or 
grayscale renderings based on single or multi-layers, or using palettes 
from the layer data itself, with optional scaling/stretching/clipping.

I am prepared to put some time into this since its a feature I dearly 
want in QGis, in fact I pretty much need it for a current project, and 
attempts to bodge it into shape have failed! What I think I need is some 
help from the more competent to make sure my plans are good plans (and 
not evil plans), and to see any other ramifications they may have - for 
example it will probably imply changes to the 'properties' dialog in the 
Qgis App code...

Anyone on board with this? I'd chat on #qgis but you lot are only there 
at 3am my time!

Barry




More information about the Qgis-developer mailing list