[R-sig-Geo] random points
adrian at maths.uwa.edu.au
adrian at maths.uwa.edu.au
Wed Feb 27 02:10:42 CET 2008
Rodrigo W. Soria Auza <wilbersa at armonia-bo.org> writes:
> I'm trying to generate a surface of 'random points' over a defined area.
> By 'randon points' I mean points that are not closer than one km each
> other. I used runifpoints (from spatstat). however, this function
> generates strictly random points, with some of them much closer than I
> expected.
In the spatstat package you have several options:
rstrat: divides the region into squares and places one random point
in each square (or k random points)
rsyst: makes a square grid of points and gives it a random displacement
rSSI: places points at random, one-at-a-time,
each new point being constrained to lie at least r units away
from the previously existing points
rStrauss (with gamma=0): places points at random subject to the
condition that no two points lie closer than r units apart
If you need something more complicated that that, you could try the
package 'spsample'
Adrian Baddeley
More information about the R-sig-Geo
mailing list