[GRASS-user] Exporting set of raster cells with different values as one layer

Kalindu Perera kkc199408 at gmail.com
Fri Oct 26 00:08:11 PDT 2018


Thanks a lot Moritz....!!!!!!!!

Can you just send me one example command?..I'm not sure I understood it in
the way that you explained

Thanks again for the quick reply
Best regards
Kalindu Perera

On Fri, 26 Oct 2018 at 11:46, Moritz Lennert <mlennert at club.worldonline.be>
wrote:

>
>
> Am 26. Oktober 2018 06:42:44 MESZ schrieb Kalindu Perera <
> kkc199408 at gmail.com>:
> >Dear all,
> >
> >I'm doing wildfire simulations in the Grass. I need to calculate the
> >area
> >of only the wildfire spread from the simulation. For that, I need to
> >take
> >only the wildfire spread as a separate layer. But the drawback is the
> >values of the cells in the spread is different from point to point. But
> >it
> >has a range. As an example, the values of cells inside the spread are
> >ranging from 1-90. The other cells in the map show values more than
> >that.
> >Can I write a mapcalc command for a range like this to output these
> >cells
> >as one layer?
> >
> >@Nikos has sent me this mapcalc command and from that, we can take only
> >cells with one value as a layer.
> >
> >r.mapcalc "category_3 = if(spread_time_observed == 3, 3, null())"
> >
> >instead of that one value(3) in this can we input a range as
> >above(1-90)
> >and get all those cells with different values as one layer?
>
> You can use >/< and the && (logical AND) to select all pixels within a
> range in r.mapcalc.
>
> But you could also use r.reclass or r.recode.
>
> Moritz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181026/f83bef18/attachment.html>


More information about the grass-user mailing list