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

Glynn Clements glynn at gclements.plus.com
Thu Jan 18 15:54:57 EST 2007


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()?

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

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list