[GRASS-dev] r.colors -a rule sorting

Glynn Clements glynn at gclements.plus.com
Tue Dec 2 04:27:09 EST 2008


Hamish wrote:

> I am just trying out the new 'r.colors -a'. Results look good, visually
> matches 'r.mapcalc abs($MAP)' + 'r.colors -g' exactly.

In general, it won't be an exact match, as -a uses "log(abs(x)+1)" so
that values close to zero don't "hog" the colour table. If your range
is small, you will probably notice the difference (if your range
includes values very close to zero, you would definitely notice).

> One thing I notice in the colr/ file, the positive/negative rules are interleaved: 
> 
> ====
> nv:255
> *:255
> 1:0:0:255 1.1457610996:0:7:255
> -1.1457610996:0:7:255 -1:0:0:255
> 1.1457610996:0:7:255 1.3127684973:0:15:255
> -1.3127684973:0:15:255 -1.1457610996:0:7:255
> 1.3127684973:0:15:255 1.5041190769:0:22:255
> ...
> -618328.3661061861:255:16:0 -539666.049353256:255:23:0
> 618328.3661061861:255:16:0 708456.5886435417:255:8:0
> -708456.5886435417:255:8:0 -618328.3661061861:255:16:0
> 708456.5886435417:255:8:0 811721:255:0:0
> -811721:255:0:0 -708456.5886435417:255:8:0
> ====
> 
> (this is r.watershed accumulation map for spearfish's elevation.10m)
> 
> 
> is it any problem that they are not sorted min to max, or is it just
> cosmetic?

Just cosmetic.

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


More information about the grass-dev mailing list