1v.rast.stats(1)               Grass User's Manual              v.rast.stats(1)
2
3
4

NAME

6       v.rast.stats   -  Calculates  univariate statistics from a GRASS raster
7       map based on vector polygons and uploads statistics  to  new  attribute
8       columns
9

KEYWORDS

11       vector, raster, statistics
12

SYNOPSIS

14       v.rast.stats
15       v.rast.stats help
16       v.rast.stats [-c] vector=name raster=name colprefix=string
17
18   Flags:
19       -c  continue if upload column(s) already exist
20
21   Parameters:
22       vector=name
23           Name of vector polygon map
24
25       raster=name
26           Name of raster map to calculate statistics from
27
28       colprefix=string
29           Column prefix for new attribute columns
30

DESCRIPTION

32       v.rast.stats   -  Calculates  basic univariate statistics from a raster
33       map only for the parts covered by the specified vector map.  The vector
34       map  will  be  rasterized according to the raster map resolution.  Then
35       univariate statistics are calculated per vector category (cat) from the
36       raster  map and the results uploaded to the vector map attribute table.
37       New columns are  generated  in  the  attribute  table  if  not  already
38       present.
39
40       Six  columns are generated (n, min, max, range, mean, stddev, variance,
41       coeff_var, sum) according to the output of r.univar.
42

NOTES

44       Unless not specified, the script stops if a (prefixed) upload column is
45       already present in the vector map attribute table.
46
47       If  a  MASK  is present, it will be restored after the script finished.
48       The scripts changes temporarily to the resolution of the  given  raster
49       map.
50

EXAMPLES

52       Example to upload DEM statistics to vector field patches:
53       # work on copy of original map:
54       g.copy vect=fields,myfields
55       # if needed, zoom to raster map:
56       g.region rast=elevation.dem -p
57       # calculate DEM statistics, upload to vector map table:
58       v.rast.stats myfields raster=elevation.dem colprefix=dem
59       # verify results:
60       v.info -c myfields
61       v.db.select myfields
62
63

SEE ALSO

65        r.univar, v.univar
66

AUTHOR

68       Markus Neteler
69
70       Last changed: $Date: 2005/11/10 11:29:49 $
71
72       Full index
73
74
75
76GRASS 6.2.2                                                    v.rast.stats(1)
Impressum