<br>Marcello:<br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
&gt; I have to find the maximum value for each cell in a series<br>
&gt; of rasters and generate both a maximum value map and a<br>
&gt; categorical map with the raster number which contains the<br>
&gt; maximum value.<br>
<br></div></blockquote><div><br>Hamish:<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
</div>see also:<br>
<br>
<a href="http://grass.osgeo.org/wiki/Time_series#Common_legends_for_many_raster_maps" target="_blank">http://grass.osgeo.org/wiki/Time_series#Common_legends_for_many_raster_maps</a><br>
<br>
it sounds like you have done something similar already, but<br>
maybe you could adapt it somehow, or it is faster.<br>
<br>
I think you&#39;ll have to use g.copy + r.null (or better r.reclass)<br>
to hide the highest values.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br>Thanks for the ideas. I still haven&#39;t quite figured out how to do it without a loop, but I will keep trying.<br><br>Anyway, I found very useful this kind of expression:<br>
<br><pre class="de1"> <span class="kw1">for</span> MAP <span class="kw1">in</span> <span class="sy0">`</span>g.mlist rast <span class="re2">pattern</span>=<span class="re1">$MAP_PATTERN</span><span class="sy0">`</span> ; <span class="kw1">do</span><br>
   <span class="kw3">eval</span> <span class="sy0">`</span><a href="http://r.info">r.info</a> <span class="re5">-r</span> <span class="re1">$MAP</span><span class="sy0">`</span><br></pre></div></div>I didn&#39;t know it was possible. Thanks.<br>
<br>Cheers,<br>Marcello.<br>