[GRASS-user] Random points within a polygon?
Dylan Beaudette
debeaudette at ucdavis.edu
Fri Mar 19 16:48:57 EDT 2010
On Thursday 18 March 2010, Hamish wrote:
> Gary wrote:
> > I want to use v.random but I noticed it puts random points
> > within the region, can I limit this to a polygon?
>
> Yes, see the v.random.cover addon script from wiki addons.
>
> Also there are many options available from the R statistics "sp"
> library. (see the R page in the grass wiki, once loaded do
> library(sp); demo(gallery).
>
> And of course the "spgrass6" R-GRASS interface to transfer data.
>
Here is an example of exactly what Hamish suggested:
http://casoilresource.lawr.ucdavis.edu/drupal/node/644
Note that you can substitute readOGR() with readVECT6() to read in a grass
vector file.
Cheers,
Dylan
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
More information about the grass-user
mailing list