[GRASS-dev] [bug #1470] (grass) full floats support for r.colors,
glynn at gclements.plus.com
Sun Oct 7 10:42:28 EDT 2007
> > 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 at gclements.plus.com>
More information about the grass-dev