[GRASS-user] Assign random cell values (integers)

Johannes Radinger johannesradinger at gmail.com
Tue Oct 1 04:11:51 PDT 2013


Hi,

what is the most effective way to assign randomly
the values -1,0 and 1 to a raster map, where each of
the three values should occur in one third of the map.

Furthermore I'd like to assign to 10 % of the cell
the values -1 and 10% the value 1 and to the remaining
80% the value 0 (or any other arbitrary combination of
the three values). Is there any fast way in G7 or do I need
to play with r.random, r.mask and r.mapcalc and r.patch.

Maybe someone has already had such a task...
so any suggestion is welcome.

cheers,
Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20131001/e4ca4755/attachment.html>


More information about the grass-user mailing list