<div dir="ltr">Thanks a lot Moritz....!!!!!!!!<div><br></div><div>Can you just send me one example command?..I'm not sure I understood it in the way that you explained</div><div><br></div><div>Thanks again for the quick reply</div><div>Best regards</div><div>Kalindu Perera</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 26 Oct 2018 at 11:46, Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Am 26. Oktober 2018 06:42:44 MESZ schrieb Kalindu Perera <<a href="mailto:kkc199408@gmail.com" target="_blank">kkc199408@gmail.com</a>>:<br>
>Dear all,<br>
><br>
>I'm doing wildfire simulations in the Grass. I need to calculate the<br>
>area<br>
>of only the wildfire spread from the simulation. For that, I need to<br>
>take<br>
>only the wildfire spread as a separate layer. But the drawback is the<br>
>values of the cells in the spread is different from point to point. But<br>
>it<br>
>has a range. As an example, the values of cells inside the spread are<br>
>ranging from 1-90. The other cells in the map show values more than<br>
>that.<br>
>Can I write a mapcalc command for a range like this to output these<br>
>cells<br>
>as one layer?<br>
><br>
>@Nikos has sent me this mapcalc command and from that, we can take only<br>
>cells with one value as a layer.<br>
><br>
>r.mapcalc "category_3 = if(spread_time_observed == 3, 3, null())"<br>
><br>
>instead of that one value(3) in this can we input a range as<br>
>above(1-90)<br>
>and get all those cells with different values as one layer?<br>
<br>
You can use >/< and the && (logical AND) to select all pixels within a range in r.mapcalc.<br>
<br>
But you could also use r.reclass or r.recode.<br>
<br>
Moritz<br>
</blockquote></div>