<br><br>Marcello:<div class="gmail_quote"><div> </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">
> My problem is that I also need to find the *second largest* value and the<br>
> corresponding raster number which contains the second largest value.<br>
><br>
> I am doing that by iterating over all classes through a shell script, but it<br>
> obviously takes much more time than using a simple r.series command.<br>
><br>
> Can anyone share any idea on how to accomplish that using r.series or<br>
> something similar?<br>
<br></div></blockquote><div><br>Glynn:<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>There isn't an efficient way to do this using existing tools. If you<br>
need the efficiency, I suggest adding a "second largest" aggregate to<br>
lib/stats (based upon c_max.c and c_maxx.c), and updating r.series to<br>
use it.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><span class="HOEnZb"><font color="#888888"></font></span><br>Thanks for pointing me the way. I think it is a little beyond my skills, but I might give it a try.<br>
<br>Cheers,<br>Marcello.<br></div>