[GRASS-user] Change value of cells in raster map

Laurent C. lrntct at gmail.com
Thu Jun 8 17:21:01 PDT 2017


Hi Rich,

When I want to modify a raster, I usually draw a vector and use
v.to.rast, then r.mapcalc if necessary.

Regards,
Laurent

2017-06-08 18:57 GMT-05:00 Rich Shepard <rshepard at appl-ecosys.com>:
> On Thu, 8 Jun 2017, Mark Seibel wrote:
>
>> Maybe if-then statements with mapcalc are applicable to the situation.
>> outputRaster=if(EXPRESSION,true,false)
>
>
> Mark,
>
>   I'll try writing an expression that tests for a map name. I can use any
> output map name because if it contains the appropriate cell values a simple
> g.rename will work.
>
>   Perhaps this will work:
>
>   r.mapcalc 'output1 = if (mapname at mapset,value=0.0)'
>
> I'll try it tomorrow morning and post the results.
>
> Thanks,
>
>
> Rich
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list