[GRASS-dev] [bug #1470] (grass) full floats support for r.colors, please

guest wrote (Thu, Dec 5 2002 12:34:54):

Wouldn't it be awfully nice to have r.colors color=grey.eq|grey.log|random etc
working for rasters of floats?

Glynn added flags -e and -g to to r.colors few weeks ago, which allow to
equalize any color table now, and floating point rasters are supported too.

An outstanding issue is 'random' colortable for floating point rasters. I
don't if this is possible. Still only integer rasters are supported.

Maciek

-------------------------------------------- Managed by Request Tracker

Maciek Sieczka wrote:

An outstanding issue is 'random' colortable for floating point rasters. I
don't if this is possible. Still only integer rasters are supported.

you could do it by splitting into ranges first, e.g. like r.stats or
d.histogram's nsteps= option.

Hamish

____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow

Hamish wrote:

> An outstanding issue is 'random' colortable for floating point rasters. I
> don't if this is possible. Still only integer rasters are supported.

you could do it by splitting into ranges first, e.g. like r.stats or
d.histogram's nsteps= option.

You can even use the map's quantisation rules.

But the main issue is whether it's sensible to assign a random colour
table to an FP map. IMHO, a random colour table only makes sense if
the number of categories is small.

If there are many categories (e.g. an integer DEM), it's likely that
the "clusters" of adjacent, same-valued cells will actually be
individual cells. In that situation, a random colour table will just
give you "snow".

A secondary consideration is that a random colour table requires one
rule for each category, which can result in very large colour tables,
which can be slow to create (IIRC, the time taken to create a colour
table is proportional to the square of the number of entries).

IOW a random colour table only makes sense if the data consists of
discrete categories rather than a scalar value. Integer maps can be
either categories or scalars, but FP maps are always scalars.

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