[R-sig-Geo] random locations within a SpatialPolygonsDataFrame

lancelot renaud.lancelot at cirad.fr
Sat Jun 18 23:24:02 CEST 2011


Thank you very much! I had completely overlooked this simple and obvious 
solution!

All the best,

Renaud

Le 18/06/2011 23:08, António M. Rodrigues a écrit :
> Hi Renaud,
>
> Try spsample {sp}.
>
> Something like:
>
> ppp <- spsample(SPDF, type="random", n=100)
>
> will randomly create 100 points within the borders of
> the SpatialPolygonsDataFrame SPDF.
>
> Hope it helps.
> Antóno
>
> 2011/6/18 lancelot <renaud.lancelot at cirad.fr
> <mailto:renaud.lancelot at cirad.fr>>
>
>     Dear all,
>
>     How can I draw a random set of locations within the borders of a
>     SpatialPolygonsDataFrame? I'd like something similar to function
>     runifpoint in package spatstat.
>
>     All the best,
>
>     Renaud
>     --
>     Renaud Lancelot
>     EDENext Project, coordinator: http://www.edenext.eu/
>
>     CIRAD, UMR15, Campus International de Baillarguet TA A-DIR / B
>     F34398 Montpellier
>
>     Tel.  +33 4 67 59 37 17  -  Fax  +33 4 67 59 37 95
>     Secr. +33 4 67 59 37 37  - Cell. +33 6 77 52 08 69
>
>     _________________________________________________
>     R-sig-Geo mailing list
>     R-sig-Geo at r-project.org <mailto:R-sig-Geo at r-project.org>
>     https://stat.ethz.ch/mailman/__listinfo/r-sig-geo
>     <https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>
>

-- 
Renaud Lancelot
EDENext Project, coordinator: http://www.edenext.eu/

CIRAD, UMR15, Campus International de Baillarguet TA A-DIR / B
F34398 Montpellier

Tel.  +33 4 67 59 37 17  -  Fax  +33 4 67 59 37 95
Secr. +33 4 67 59 37 37  - Cell. +33 6 77 52 08 69



More information about the R-sig-Geo mailing list