r.mapcalc

  What's the deal with r.mapcalc? I want to create
a map with category labels that are a multiple of the
category labels in another map. According to the manual
I should do the following:

r.mapcalc> result=@original_map*mult_factor

What I get from doing this is a map whose category NUMBERS
(not labels) are multiples of the original cat. labels --
i.e. I end up with a zillion categories, instead of the
original number of categories whose values (labels) are changed.

  Thanks for any enlightenment!

Sharyl Walker
Agricultural Engineering
University of Illinois

Ah, an interesting problem. Mapcalc can't, as for as I know, write out
any attribute information (`labels'). So getting a map with zillions of
categories is the only way. Of course, once you know that labels of a map
are stored in the directory $LOCATION/cats, it shouldn't be too difficult
to write a script that multiplies the attribute field. The resultant
changed cats file can then be attached to a copy of the original cell file.

P. Martijn van Leusen

Institute of Prehistory, University of Amsterdam
martijn@scanner.frw.uva.nl

On Fri, 18 Mar 1994, S. E. Walker wrote:

  What's the deal with r.mapcalc? I want to create
a map with category labels that are a multiple of the
category labels in another map. According to the manual
I should do the following:

r.mapcalc> result=@original_map*mult_factor

What I get from doing this is a map whose category NUMBERS
(not labels) are multiples of the original cat. labels --
i.e. I end up with a zillion categories, instead of the
original number of categories whose values (labels) are changed.

  Thanks for any enlightenment!

Sharyl Walker
Agricultural Engineering
University of Illinois