[GRASS-dev] using rand(x,y) in r.mapcalc (grass7)

Paulo van Breugel p.vanbreugel at gmail.com
Wed Jul 2 12:03:09 PDT 2014


When I run several times e.g., r.mapcalc "a = rand(0,100)"

I am always getting exactly the same layer. In the help file it reads:

"The environment variable GRASS_RND_SEED is read to initialize the random
number generator"

But what does it mean. Shouldn't the seed not be generated on e.g, OS time,
which would ensure that each run would give a different result?

On a related note, it would be nice to be able to set the seed (I think
there has been such a request before, but not sure about the answer at that
time).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140702/ca1b314f/attachment.html>


More information about the grass-dev mailing list