[GRASS-dev] Re: [GRASS-SVN] r42277 - grass/trunk/lib/raster

Glynn Clements glynn at gclements.plus.com
Tue May 18 10:29:31 EDT 2010

Markus Neteler wrote:

> should this go into GRASS 6? Looks like a potential speedup for large
> color tables, say, to avoid them.


It does change the behaviour slightly, but situations where the
difference would be visible are unlikely to occur in practice.

Specifically, if previously you had:

	value	10	11	12	13	14
	colour	 0	 5	 5	 5	10

now it would elminate some values to give:

	value	10	11	14
	colour	 0	 5	10

effectively stretching the transition.

This can occur either if the source colour table has discontinuities
(which seems an odd choice for use with equalisation), or the the
histogram is extremely spikey i.e. specific category values constitute
a significant proportion of the data, with adjacent values having
negligible counts.

Making it preserve the colour table exactly would take some more work. 
It would need to consider three values at a time, eliminating the
middle value whenever its colour is identical to the first and last

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list