[GRASS-user] new addon script: v.random.cover

Hamish hamish_b at yahoo.com
Tue Feb 5 01:14:58 EST 2008


Hi,

I just added a new script to the wiki addons page, v.random.cover.
  http://grass.gdf-hannover.de/wiki/GRASS_AddOns#Vector_add-ons

It's like v.random but points are constrained to within specified areas
in the cover vector map.

example:
 # create 40 random points to fall into areas with cat ids of 18,22,47.
 # Spearfish dataset
 v.random.cover cover=fields cat=18,47,22 out=field_rand_40pts n=40

Perhaps useful to r.le and r.li users for setting up sampling sites.

It could probably be better written into the v.random module using the
the point-in-polygon test used in v.buffer before writing the point and
i++.

Only after I put it up on the wiki did I notice r.random already had both
cover map and vector_output options. Oh well, more ways to try.


enjoy,
Hamish


ps- The add-ons page has grown very large and it is hard to find stuff. We
should figure a way to break it down into smaller sections. If anyone has
ideas can you comment in the discussion section of that wiki page?


More information about the grass-user mailing list