Hello GRASS mapcalc gurus:  I have a problem that I have been unable 
to solve on my own and was wondering if anyone out there could help me.

I want to "patch" together buffered raster files using r.mapcalc.  
I need to assign each of these files a different category value 
and description.  Buffered files are automatically assigned just 
two categories: 1 = actual location of area to be buffered and 2 
= buffered area.   

For example, lets say I have 3 buffered files that look like this:

file1    cat 1 = the site    cat 2 = buffered area around site
file2    cat 1 = the site    cat 2 = buffered area around site
file3    cat 1 = the site    cat 2 = buffered area around site


I want to put them together in one file 'fileall' and have the data 
read like this when I do a d.what.rast on the file 'fileall': 


area from file1   category 1 = roads
area from file2   category 2 = wells
area from file3   category 3 = houses


Right now I can accomplish this by doing a reclass on the 3 files, 
making the site and buffered areas the appropriate category (file1 
= category1, file2 = category 2, etc.).  I then add the 3 files in 
r.mapcalc to produce a file containing all three files (fileall).  
I then have to do a r.reclass on the 'fileall' file to add the 
description information because the r.mapcalc does not carry this 
information over, at least using the formula : 

r.mapcalc> fileall=file1+file2+file3.

Although the above method does accomplish what I want it is not the 
most efficient way of doing things.  Since this procedure will be 
used repeatedly for various analyses (and by users who may not 
understand GRASS very well, our client, the ever brilliant army :-), 
for example)  I would rather have a formula that can be run using 
r.mapcalc.  An interface will be designed allowing the user to 
enter a few variables then  press a button which will run a 
program that will execute the r.mapcalc equation.  

Does anyone have a suggestion as to how I might accomplish this 
in r.mapcalc (i.e. know of an equation) without doing all the 
separate reclasses ?  

Thanks in advance.

Bonnie

ps.  instead of having category 1 = "roads", it could equal "file1" 
if this makes the equation simpler.

***PLEASE NOTE:*****

I do not subscribe to this group so please do not post solutions, but rather
send comments to:

weller@zorro.cecer.army.mil

