<br><br>On Friday, May 24, 2013, Glynn Clements  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Rainer M. Krug wrote:<br>
<br>
> >> Hmm - sounds interesting, but also for other purposes. But as the result<br>
> >> will be a raster map, I don't think this approach is usable here (unless<br>
> >> I can feed the numbers back into a raster map, i.e. the inverse of<br>
> >> r.stats -c)<br>
> ><br>
> > r.cross + r.reclass ?<br>
><br>
> There is one aspect in r.cross which makes this approach quite<br>
> difficult to implement: the value of the result map layer can not easily<br>
> be traced back to the values of the two input layers:<br>
<br>
If you only have a small number of classes, you can just create the<br>
cross-product manually, e.g.:<br>
<br>
        r.mapcalc 'result = ageClass * 10 + dc'</blockquote><div><br></div><div>Yes - This is effectively what I am doing now.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
So a category of 15 would be ageClass=1, dc=5.<br>
<br>
r.cross is more useful when the total number of pairs which actually<br>
occur is much fewer than the product of the numbers of categories, as<br>
it only creates a category for each combination which actually occurs,<br>
not for each potential combination.</blockquote><div><br></div><div>True. The problem I have with r.cross is that I have to manually decode afterwords what combination the value refers to. I could use a she'll script to translate the category values, but this sounds a little tedious, especially as the format is not that easily parsable.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>Rainer<span></span></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--<br>
Glynn Clements <<a href="javascript:;" onclick="_e(event, 'cvml', 'glynn@gclements.plus.com')">glynn@gclements.plus.com</a>><br>
</blockquote><br><br>-- <br>NEW GERMAN FAX NUMBER!!!<br><br>Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)<br><br>Centre of Excellence for Invasion Biology<br>Natural Sciences Building<br>
Office Suite 2039<br>Stellenbosch University<br>Main Campus, Merriman Avenue<br>Stellenbosch<br>South Africa<br><br>Cell:           +27 - (0)83 9479 042<br>Fax:            +27 - (0)86 516 2782<br>Fax:            +49 - (0)321 2125 2244<br>
email:          <a href="mailto:Rainer@krugs.de" target="_blank">Rainer@krugs.de</a><br><br>Skype:          RMkrug<br>Google:         <a href="mailto:R.M.Krug@gmail.com" target="_blank">R.M.Krug@gmail.com</a><br><br>