[GRASSLIST:5083] Re: surface roughness scale and colortable

1 - a few days ago, I posted a question about how to calculate the
surface roughness of an area. After a little brainstorm I did it. thanks
to all who answer, special to Thorsten Behrens and Eric Miller.

May I ask what worked?

Now I have a new problem with my recently-created roughness map: When I compare it with other similar map made with Arcview, I see that there's
a little difference in the scale of the roughness. In the arcview's map,
the scale goes from 1 (planar area) to 1.23, but in the GRASS's map, it goes
from 0 (planar area) to 67. I guess I have o normalise the values, but I

don't know how. Any ideas?

If you want 67 to be 1.23, and 0 to be 1, try something like:
r.mapcalc newmap='1+(oldmap*(0.23/67))'

2 - About the colortables (i guess this one is easy...): how can I set
my own colortable? I mean, it's not about changing the colortable using
the predefined ones (rainbow, red thru yellow, etc)?

have a look at the files in $mapset/colr after setting different colors=, and read the r.colors man page. I found it easiest to edit those files by hand.

> Now I have a new problem with my recently-created roughness map: When I
> compare it with other similar map made with Arcview, I see that there's
> a little difference in the scale of the roughness. In the arcview's map,
> the scale goes from 1 (planar area) to 1.23, but in the GRASS's map, it
> goes from 0 (planar area) to 67. I guess I have o normalise the values,
> but I don't know how. Any ideas?

If you want 67 to be 1.23, and 0 to be 1, try something like:
r.mapcalc newmap='1+(oldmap*(0.23/67))'

Another approach is

r.rescale input=my_oldmap from=0,67 output=my_newmap to=1,1.23

(In fact, I would guess that r.rescale does not work with
decimal values. r.rescale appears intended to generate
integer color scales, e.g., 0 to 255; so the r.mapcalc
approach would be appropriate for this example, but you
might want to know about r.rescale for future use.)

Best,

Michael