[Qgis-developer] Custom raster drawing
Marco Hugentobler
marco.hugentobler at karto.baug.ethz.ch
Tue Jun 12 10:19:10 EDT 2007
Hi Barry and Tim,
I agree with Tim that the raster code in QGIS needs a complete redesign. The
IRC meeting on Friday would be fine for me.
> I want to display some rasters with a very specific colour scheme:
> values from 0 to 0.9: gray (or maybe green. Something neutral)
> from 0.90 to 0.95 : gray to yellow
> from 0.95 to 0.99 : yellow to orange
> from 0.99 to 1.00 : orange to red
> ...
> I think this is outside my timeframe though - I'd like to get this done in
>a matter of weeks.
But can't you just use the raster transparency branch to do this? The solution
there is not nice from a design point of view, as it adds just a new drawing
mode. But it should do for the short time.
Load a raster, open the properties dialog, set 'Color Map' combo box
to 'Custom Colormap' and go to tab 'Colormap'. Then set number of entries to
5, set 'Color interpolation' to 'Linearly' and press 'Classify'. Then double
click on the values to enter 0, 0.9, 0.95, 0.99, 1. Then double click on the
color boxes to set 0 to gray, 0.9 to gray, 0.95 to yellow, etc. and
press 'Apply'.
cheers,
Marco
--
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
marco.hugentobler at karto.baug.ethz.ch
More information about the Qgis-developer
mailing list