[Qgis-user] Greyscale raster to category (classified) raster

Otto Dassau otto.dassau at gmx.de
Fri Oct 10 01:07:15 PDT 2008


Hi Agustin,

On Fri, 10 Oct 2008 07:27:42 +0200
Agustin Lobo <aloboaleu at gmail.com> wrote:

> Folks,
> 
> Given a classified image, in which the value of each pixel is
> an integer, QGIS assumes, by default, that the image is a greyscale 
> image and
> cannot find the way of applying a color LUT.
> Is there any way of converting it from type Greyscale raster to category 
> (classified) raster ?
> 
> Example:
> download the GlobCover Land Cover (300m) product from: 
> ftp://uranus.esrin.esa.int/pub/globcover_v2/
> how to represent it as a landcover map?
> 
> (BTW, this is a very interesting product)

this is working for current 1.0.0 preview.

1) open the map in QGIS
2) double click the map in the legend to start the raster properties dialog
3) In Symbology tab change Color Map from Grayscale to Colormap
4) Change to the Colormap tab in the raster properties dialog
5) Change Color interpolation from discret to exact
6) Change number of entries to 68? according to existing classes in the
   globcover legend xls file and click on classify.
7) No you can double click the values and colors and adapt them.
8) And you can export the result to a color map file....

Or you create a color map file extern and load it with the "load color map from
file" button. The file has to look like this, I guess:

# QGIS Generated Color Map Export File
INTERPOLATION:EXACT
10,0,0,0,255,Color entry 1
11,255,85,0,255,Color entry 2
12,85,170,0,255,Color entry 3
13,255,85,0,255,Color entry 4
14,85,255,255,255,Color entry 5
15,0,170,127,255,Color entry 6
16,255,170,0,255,Color entry 7

regards,
 Otto

> Agus



More information about the Qgis-user mailing list