[Qgis-user] Re: Grayscale raster maps an (pseudo)color raster maps

Peter Ersts ersts at amnh.org
Thu Dec 11 07:43:39 PST 2008


Agustin,

Sorry for the delayed response, been away for a while and just catching 
up on emails.

Simply disregarding the color table will not be useful in most cases. 
The color tables typically used with categorical data and most of the 
time don't necessarily represent a continuous gradient of color/shades.

Take a very simple 5 value lut, with their index value and the color
1  red
2  magenta
3 yellow
4 blue
5 white
These colors may have been selected be to be meaningful to represent the 
data. If we disregard the lut and to allow for stretching you would get 
something like
1 (0,0,0)  - black
2
3 (128, 128, 128) gray
4
5 (255,255,255) -white
Which will probably not be very informative or visually make sense. 
Yellow (index value 3) is a brighter color than blue (index value 4) but 
in a stretch index value  3 could be a darker shade then index value 4.

Your best option is to export your data without a color table if you 
don't want one, or to work with the color table and set you color the 
way you want. With a color table you can after all mimic stretching. 
Using the above example, you color table could have two entries,
1 black
5 white
Select "Linear" for the color interpretation. That effectively 
represents a linear stretch between 0 and 255.

-pete


Agustin Lobo wrote:
> I've opened and correctly visualized
> a multi-band Geotif file in QGIS 1.0 preview2 (ubuntu bianries).
> Then, I import into grass using r.in.gdal
> and export one band as geotif with r.out.gdal.
> When I open this new geotif file in QGIS, the image
> is considered a color map and cannot use the
> stretching tools.
>
> Not sure if the error is in QGIS, grass or gdal, but in any case, I 
> think that the Properties tab should offer the option of disregarding
> the colortable and treating the file as grayscale (i mean, even if
> the raster really were a pseudocolor image, the user should have the
> option of treating it otherwise).
>
> ...or am I misinterpreting something?
>
> Agus


-- 
====================================
Peter J. Ersts, Project Specialist
American Museum of Natural History
Center for Biodiversity and Conservation
Central Park West at 79th Street
New York, New York 10024
Tel: Home Office (518)-632-4745 or NYC Office (212)-496-3488
Web: http://biodiversityinformatics.amnh.org
Web: http://cbc.amnh.org

Quantum GIS Raster Development Team. Visit http://www.qgis.org
to learn more about QGIS, a free and open source desktop GIS

Open Source,
...evolving through community cooperation to change the world bit by bit




More information about the Qgis-user mailing list