GeoProc.com
GeoProc.com

Colour Scale Bar for One-Band Rasters    
V0.12.2 - 10 February 2019

This QGIS plugin creates a colour scale bar image file (png) for a coloured 1-band raster. Also works for QGIS native colour schemes thanks to Thomas Wahlmüller.Use the created colour scale bar as legend in print composer.

Distributed under the GPL licence
 

This plugin works on QGIS version 2.x, and is backward compatible with .qml's
generated with QGIS versions 1.x.
 

Once installed the bccscbar plugin can be found in the 'Raster/Raster Colours' menu.

 


Main window

--- How to use this app ---

  1. Select a QGIS .qml file containing a saved colour palette OR select a colour palette file (as generated by '1-band raster colour table' OR use the currently selected one-band raster layer from the Layers panel (by selecting the "Use current raster" button).
    The colour palette can be of type: DISCRETE, INTERPOLATED or EXACT.
     
  2. Fill in the relevant info:
    At minimum you have to define the aspect of the final colour scale bar: either vertical or horizontal.
     
  3. From V0.4.0, you can click on the 'Sel out dir...' button to select an output folder to save the colour scale bar image file to. By default, the image is saved in the same folder as the palette file. Take care that when "Use current raster" is selected, the default folder for the saved image of the colour scale bar is your system temporary folder.
     
  4. Click 'Create' to create the colour scale bar image file. The file is located in the same folder as the input file.
     
  5. Open your favorite image viewer and point it to the file returned by the plugin.
     
  6. Tweak the parameters and run again until the time you are satisfied with your colour scale bar.
     
  7. Use the created colour scale bar as legend in print composer.

Guided tour:
 
Main window

On completion, the plugin returns the name of the created colour scale bar:

name of the created colour scale bar

NOTES

Examples:

Example: vertical scale bar     A vertical scale bar.
 
Parameters:
 
Title = SRTM
Units = m [AMSL]
 
Enforce decimals = False
Number of decimals = N/A
 
Font size = 10
 
Automatic tick = True
  number of Ticks = N/A
 
box Width = 50
box Height = 2
 
Annotate Extrema = False
minimum value = N/A

A horizontal scale bar (click for full scale version)

Example: horizontal scale bar

Parameters:

Title = SRTM
Units = m [AMSL]
 
Enforce decimals = True
Number of decimals = 1
 
Font size = 10
 
Automatic tick = True
  number of Ticks = N/A
 
box Width = 5
box Height = 20
 
Annotate Extrema = False
minimum value = N/A

Download plugin zip file here.

Please report any bug/problem/wish at the bug tracker.


History

 

Published date: 10 Feb 2019.