Bug report #5837

No renderer for palettedSingleBandGray

Added by Marco Hugentobler over 7 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:Marco Hugentobler
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:15310

Description

In the new raster symbology, there is no renderer to replace the old QgsRasterLayer::drawPalettedSingleBandGray() method.

From the mailing list:

There is a sample of this data at:

http://www.ordnancesurvey.co.uk/docs/sample-data/10k-raster-colour-sample-data.zip

If you turn this grayscale in 1.9 it just turns grey (rgb 127,127,127)
all over. In 1.8 if you choose grayscale it displays it with the rgb
values displayed below.

So I created a colormap if anyone is interested. I took the values from
what QGIS 1.8 did automatically to turn the data grayscale.

Value - r ,g ,b
0 = 255,255,255
1 = 0,0,0
2 = 226,226,226
3 = 150,150,150
4 = 218,218,218
5 = 232,232,232
6 = 232,232,232
7 = 230,230,230
8 = 249,249,249
9 = 252,252,252

I have created a qml file if anyone would like it you can download it
from here:

https://docs.google.com/open?id=0B6r5nAOdEBZrRFpjVlBLZm1BSkE

This was quite easy as there were only 10 values defined in the data.

The OS 25000 and 50000 rasters have 255 different colours in them.

Associated revisions

Revision 3d02fbed
Added by Nyall Dawson over 6 years ago

[FEATURE] Option to convert a raster to grayscale with choice of desaturation mode (lightness, luminosity, average) (fix #5837)

History

#1 Updated by Paolo Cavallini about 7 years ago

  • Target version set to Version 2.0.0

#2 Updated by Nyall Dawson over 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF