[GRASS-user] Re: Constrain the output of v.random

Hamish hamish_b at yahoo.com
Thu Nov 4 12:49:00 EDT 2010


Rainer wrote:
> Just another idea - an iterative approach in a script,
> which is using v.random and to discard all points outside
> the polygon and to repeat it until you have the number of
> random points you need. This could be made faster, by using a
> MASK based on the polygon which has been grown to
> encapsulate the whole polygon, and to use on this setup
> r.random, also iterative.


see the v.random.cover script already in grass-Addons for this.
:-)

r.random points would be not-as-random, as results will all be
aligned to the raster grid, possibly introducing aliasing
problems.


Hamish



      


More information about the grass-user mailing list