DESCRIPTION

v.random.cover is a shell script for creating random points constrained within an irregularly shaped vector area. (v.random places points only in the current region rectangle)

Optionally the values of a raster map at the new sites can be uploaded.

EXAMPLE

(Spearfish dataset)
Query vegitation cover at 500 random points in the Black Hills Natl. Forest.
  # identify category number of the forest in the fields map
  v.db.select fields where="label = 'Black Hills Natl. Forest'"
  # shows that the forest is category 63

  g.region rast=landcover.30m
  v.random.cover cover=fields cat=63 out=random_NP_cover n=500 \
     raster=landcover.30m

  # upload category legend from the raster file
  v.db.addcol random_NP_cover column='landcover varchar(50)'
  r.category landcover.30m | \
    ( while read LINE ; do
        CAT=`echo "$LINE" | cut -f1`
        LABEL=`echo "$LINE" | cut -f2`
        v.db.update map=random_NP_cover column=landcover \
           value="$LABEL" where="sampled = $CAT"
      done )

SEE ALSO

r.random (cover= vector_output=)
v.db.addtable
v.db.select
v.random
v.rast.stats
v.what.rast

AUTHOR

Hamish Bowman
Dunedin, New Zealand