<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
<div>Use raster calculator (Mapcalc) "if statements". Takes a bit to understand but works very well<br>
<br>
Sent from my iPhone</div>
<div><br>
On Feb 19, 2017, at 1:56 PM, Luiz Andrade <<a href="mailto:lcoandrade@gmail.com">lcoandrade@gmail.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div class="">Hi there,</div>
<div class="">How can I make a raster classification using decision tree in GRASS (like ENVI’s decision tree)?</div>
<div class="">I have two bands and a set os rules and I wanna make a classification with those rules. Something like this:</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">B1=0 (using band 1)</div>
<div class="">yes->water</div>
<div class="">no-> 0<=B1<=4 (using band 1)</div>
<div class="">        yes-> B2=1(using band 2)</div>
<div class="">                  yes -> vegetation 1</div>
<div class="">                  no -> vegetation 2</div>
<div class="">        no-> everything else</div>
<div class=""><br class="">
</div>
<div class="">Can I do this with r.mapcalc?</div>
<div class=""><br class="">
</div>
<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">
<div class="">
<div style="orphans: 2; widows: 2;" class="">Regards,</div>
<div style="orphans: 2; widows: 2;" class="">Luiz Claudio</div>
</div>
<div class=""><br class="">
</div>
</div>
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>grass-user mailing list</span><br>
<span><a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a></span><br>
<span><a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a></span></div>
</blockquote>
</body>
</html>