GRASS logo

NAME

v.vect.stats - Count points in areas, calculate statistics from point attributes.

KEYWORDS

vector, attribute table, database, univariate statistics, zonal statistics

SYNOPSIS

v.vect.stats
v.vect.stats --help
v.vect.stats [-p] points=name areas=name [type=string[,string,...]] [points_layer=string] [areas_layer=string] [method=string] [points_column=name] [count_column=string] [stats_column=string] [separator=character] [--help] [--verbose] [--quiet] [--ui]

Flags:

-p
Print output to stdout, do not update attribute table
First column is always area category
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

points=name [required]
Name of input vector map
Name of existing vector map with points
areas=name [required]
Name of input vector map
Name of existing vector map with areas
type=string[,string,...]
Feature type
Input feature type
Options: point, centroid
Default: point
points_layer=string
Layer number for points map
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
Default: 1
areas_layer=string
Layer number for area map
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
Default: 1
method=string
Method for aggregate statistics
Options: sum, average, median, mode, minimum, min_cat, maximum, max_cat, range, stddev, variance, diversity
points_column=name
Column name of points map to use for statistics
Column of points map must be numeric
count_column=string
Column name to upload points count
Column to hold points count, must be of type integer, will be created if not existing
stats_column=string
Column name to upload statistics
Column to hold statistics, must be of type double, will be created if not existing
separator=character
Field separator
Special characters: pipe, comma, space, tab, newline
Default: pipe

Table of contents

DESCRIPTION

v.vect.stats counts the number of points in vector map points falling into each area in vector map areas. Optionally statistics on point attributes in points are calculated for each area. The results are either uploaded to the attribute table of the vector map areas or printed to stdout.

OPTIONS

Statistical Methods: Using numeric attribute values of all points falling into a given area, a new value is detmined with the selected method. v.vect.stats can perform the following operations:

sum
The sum of values.
average
The average value of all point attributes (sum / count).
median
The value found half-way through a list of the attribute values, when these are ranged in numerical order.
mode
The most frequently occurring value.
minimum
The minimum observed value.
min_cat
The point category corresponding to the minimum observed value.
maximum
The maximum observed value.
max_cat
The point category corresponding to the maximum observed value.
range
The range of the observed values.
stddev
The statistical standard deviation of the attribute values.
variance
The statistical variance of the attribute values.
diversity
The number of different attribute values.

NOTES

Points not falling into any area are ignored. Areas without category (no centroid attached or centroid without category) are ignored. If no points are falling into a given area, the point count is set to 0 (zero) and the statistics result to "null".

The columns count_column and stats_column are created if not existing. If they do already exist, the count_column must be of type integer and the stats_column of type double precision.

SEE ALSO

v.distance, r.distance, v.rast.stats, v.what.vect

AUTHOR

Markus Metz

Last changed: $Date: 2008-08-13 21:52:37 +0200 (Wed, 13 Aug 2008) $


Main index | Vector index | Topics index | Keywords index | Full index

© 2003-2015 GRASS Development Team, GRASS GIS 7.0.0 Reference Manual