[GRASS-dev] Test suite for GRASS - proposal, discussion welcome

Moritz Lennert mlennert at club.worldonline.be
Fri Jun 10 04:03:45 EDT 2011


On 10/06/11 02:29, Glynn Clements wrote:
>
> Moritz Lennert wrote:
>
>>>> v.random output=random_points n=100 v.info -t random_points>
>>>> result
>>>
>>> If the framework understands vector maps, it shouldn't be
>>> necessary to use v.info; it should be able to compare the
>>> random_points map to random_points.ref.
>>
>> But how to compare two randomly generated maps ? Unless the system
>> is not really random, the maps _should_ be different.
>
> Ugh; v.random should have a seed= option (or something) to allow
> repeatability. Or at least an option to disable seeding with the
> PID.
>
> For comparison, r.mapcalc's rand() is seeded from the GRASS_RND_SEED
> environment variable. If that isn't set, it isn't explicitly seeded
> (i.e. the default seed is used). If you want different results for
> each run, you need to explicitly change GRASS_RND_SEED each time.

So which of the two option (a seed= parameter / disabling seeding by PID
vs GRASS_RND_SEED) is preferrable ? I would think that we should try to
be consistent across modules, but r.mapcalc uses GRASS_RND_SEED and
v.perturb uses 'seed=' (but also doesn't use rand()). Maybe the occasion 
to unify all this ?

Moritz


More information about the grass-dev mailing list