[GRASS-user] exploding a color table

Glynn Clements glynn at gclements.plus.com
Thu Jun 5 21:09:29 EDT 2008


Neil Best wrote:

> Has anyone come up with a way to convert a streched color table for a
> floating point map into a set of discrete colors?  I am thinking especially
> of NDVI, so I would like to generate the list of 256 colors along the NDVI
> floating point stretch to use with the result of r.recode that I used to
> convert my NDVI map to an integer map.  If I could properly set the color
> table for that new map then I could maintain the symbolization within GRASS
> rather than having to spew a list of 256 colors for a Mapserver
> configuration.  Any thoughts?

You can query the colour corresponding to specific values using
r.what.color.

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


More information about the grass-user mailing list