[GRASS-user] [off-topic] spoke too soon

Glynn Clements glynn at gclements.plus.com
Thu Oct 4 06:49:16 EDT 2007


Dylan Beaudette wrote:

> > All the palettes are available in GMT color format, which is just plain
> > ASCII and very similar to GRASS' own colour rule files in the 'cols'
> > database elements. The only major difference seems to be three
> > additional lines at the end of the file specifying colours for
> > foreground, background and no data areas which could simply be
> > discarded.
> 
> Indeed. Will have to poke around in the r.colors source -- anyone an expert on 
> how the rules file is parsed?

See lib/gis/color_rules.c.

Note that those functions are used by r.colors to parse its input (-i,
rules=, color=rules), which differs from the internal format of GRASS
colour tables (r.colors files can have values specified as a
percentage, the internal format requires absolute values).

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




More information about the grass-user mailing list