[R-sig-Geo] Generating random points
White.Denis at epamail.epa.gov
White.Denis at epamail.epa.gov
Wed Sep 14 00:53:12 CEST 2005
csr package:splancs R Documentation
Generate completely spatially random points on a polygon
Description:
Generate completely spatially random points on a polygon.
Usage:
csr(poly,npoints)
Arguments:
poly: A polygon data set.
npoints: The number of points to generate.
Details:
'csr' generates points randomly in the bounding box of 'poly,'
then uses 'pip' to extract those in the polygon. If the number of
points remaining is less than that required, 'csr' generates some
more points in the bounding box until at least 'npoints' remain
inside the polygon. If too many points are generated then the list
of points is truncated.
Uses 'runif()' to generate random numbers and so updates
'.Random.seed', the standard S random number generator seed.
... etc.
r-sig-geo-bounces at stat.math.ethz.ch wrote on 2005-09-13 15:34:27:
> Hi,
>
> I need to generate (randomly) n points inside the boundary of a
polygon,
>
> is there any function that can handle this?
>
> Sincerely,
>
> Alí M. Santacruz
> Corporación Centro de Investigación en Ecosistemas y Cambio Global
(C&B)
> http://www.carbonoybosques.org
> Tel: (574) 230 08 76
> Calle 51 72-07 Int. 708
> Medellín (Colombia)
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list