Re: [GRASS-user] Set raster value for specific cell

2013-05-16 Thread Nikos Alexandris
Johannes Radinger wrote: > is there a simple way to set the value of a specific raster cell (e.g. > defined by the coordinate of its cell center). One way could be to define a > point by the coordinates (e.g. v.in.ascii) and then to convert the point to > raster (v.to.rast) and use the mapcalculato

Re: [GRASS-user] Set raster value for specific cell

2013-05-13 Thread Glynn Clements
Paulo van Breugel wrote: > You can use r.mapcalc. If mymap is your raster layer and you want to > change the raster cell at coordinates 52deg and 10deg, use > > r.mapcalc "mymap = if(x()==52.0 && y()==10.00, 1, mymap)" --replace Comparing floating-point values with == is seldom a good idea. I

Re: [GRASS-user] Set raster value for specific cell

2013-05-13 Thread Paulo van Breugel
You can use r.mapcalc. If mymap is your raster layer and you want to change the raster cell at coordinates 52deg and 10deg, use r.mapcalc "mymap = if(x()==52.0 && y()==10.00, 1, mymap)" --replace Cheers, Paulo On 05/13/2013 11:56 AM, Johannes Radinger wrote: Hi, is there a simple way to

[GRASS-user] Set raster value for specific cell

2013-05-13 Thread Johannes Radinger
Hi, is there a simple way to set the value of a specific raster cell (e.g. defined by the coordinate of its cell center). One way could be to define a point by the coordinates (e.g. v.in.ascii) and then to convert the point to raster (v.to.rast) and use the mapcalculator to modify the original ras