
Optionally the values of a raster map at the new sites can be uploaded.
# 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 )
Main index - vector index - Full index
© 2003-2016 GRASS Development Team