[GRASS-dev] new r.out.gdal fails to preserve 8bit color

Markus Neteler neteler at itc.it
Fri Jan 19 04:29:13 EST 2007


Glynn Clements wrote on 01/18/2007 09:54 PM:
> Markus Neteler wrote:
>
>   
>>>>> Right now I have submitted related code based on the GRASS-GDAL plugin.
>>>>> It now creates color rules, but the color interpretation is still 
>>>>> wrong (gray instead of RGB).
>>>>>
>>>>> Please someone may revisit it.
>>>>>           
>>>> It appears that G_get_f_color_rule() doesn't return what it should. No 
>>>> clue how to fix it.
>>>>         
>>> I've only tested it briefly, but it seems fine to me. Can you explain
>>> what you think is wrong?
>>>       
>> For example,
>>
>> GRASS 6.3.cvs (spearfish60):~ > r.out.gdal roads out=roads.tif
>>
>> returns a grey scale map. It should be in colors.
>>
>> gdalinfo roads.tif | grep Color
>> Band 1 Block=636x3 Type=Int32, ColorInterp=Gray
>>
>> Also QGIS shows it in grey scale.
>>     
>
> Why do you think that this is an issue with G_get_f_color_rule()?
>   
Maybe that's a wrong assumption.

> With a simple test program, I get results which exactly match the
> contents of the colr file.
>   

I tried on two machines. The exported file does not contains colors. I 
wonder
if you get a colored output file (did you try a Spearfish raster map?).

Markus




More information about the grass-dev mailing list