[Qgis-user] Psuedo-color raster legends

Benoit de Cabissole benoit-3 at bc-consult.com
Wed Nov 4 05:23:53 PST 2015


 

Hi Robin, 

Regarding your point 1 below, please see the latest version (0.9.0) of
"Color Scale Bar for One-Band Rasters" (bccscbar) at
http://www.bc-consult.com/free/bccscbar.html [3]. It is now possible to
use the currently selected raster from the Layers panel. 

You can then use the logic in your command line version... 

Regards,
Benoit 

---
Benoit de Cabissole, Ph.D.
BC Consulting
benoit-3 at bc-consult.com
Mobile: +27 84 435 9868
Tel: +27 11 794 6064

On 03/11/2015 23:59, Robin Wilson wrote: 

> 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 [2]). 
> 
> I've been using the Color Scale Bar for One-Band Rasters plugin available at http://www.bc-consult.com/free/bccscbar.html [3] 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 [4], 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 
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user [1]
 

Links:
------
[1] http://lists.osgeo.org/mailman/listinfo/qgis-user
[2] https://www.dropbox.com/s/29yhsofvnrp8ey7/QGISLegend.png?dl=0
[3] http://www.bc-consult.com/free/bccscbar.html
[4]
https://www.dropbox.com/s/2lsh7wx1ygzykuy/QGISLegend_Colorbar.png?dl=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151104/7cb6c196/attachment.html>


More information about the Qgis-user mailing list