[Qgis-user] Psuedo-color raster legends

Robin Wilson robin at rtwilson.com
Tue Nov 3 13:59:54 PST 2015


Hi,

I do a lot of visualisation of raster layers using the pseudo-color symbology, but I don't like how the legends are produced: they just show the individual colors for each of the specific values you've selected in the symbology dialog box (see https://www.dropbox.com/s/29yhsofvnrp8ey7/QGISLegend.png?dl=0 <https://www.dropbox.com/s/29yhsofvnrp8ey7/QGISLegend.png?dl=0>).

I've been using the Color Scale Bar for One-Band Rasters plugin available at http://www.bc-consult.com/free/bccscbar.html <http://www.bc-consult.com/free/bccscbar.html> for a while now - albeit in a version that I've modified to run from the command-line. This produces nice 'colorbar-style' legends like this: https://www.dropbox.com/s/2lsh7wx1ygzykuy/QGISLegend_Colorbar.png?dl=0 <https://www.dropbox.com/s/2lsh7wx1ygzykuy/QGISLegend_Colorbar.png?dl=0>, but it takes a bit of work (you have to export the color ramp used, and then run this command to load in the file and produce the color bar).

I'm keen to work to integrate this further into QGIS. Is this something which would be encouraged?

I can see a number of different levels of integration:

1. A plugin that works in a similar way to the current plugin - but that allows you to select a layer directly, and skip the stage of having to save the color ramp out to a file. This should be fairly easy, and just requires finding a way to grab the data that would be saved out to file through the QGIS API. Can anyone point me in the right direction?

2. A plugin to the Print Composer (can this be done?) which creates a new 'composer object' which will automatically contain a nice colorbar for the specified layer.

3. A new feature for QGIS itself to allow legends for pseudo-color rasters to be either the current style, or this 'colorbar' style. This would be the hardest to do, and I'm not entirely sure whether my programming skills are up to it (I gather the majority of QGIS is written in C++).

Any thoughts on the idea itself, or any of these potential levels of integration?

Best regards,

Robin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151103/91f028b0/attachment.html>


More information about the Qgis-user mailing list