Skip to content

v.stats

Calculates vector statistics

v.stats [-r] vector=name [layer=integer] [rasters=name [,name,...]] [zones=name] [rprefix=string [,string,...]] [skipshape=string [,string,...]] [skipunivar=string [,string,...]] [shpcsv=string] [rstcsv=string [,string,...]] [rstpercentile=integer] [newlayer=integer] [newlayername=string] [newtabname=string] [separator=string] [nprocs=integer] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

v.stats vector=name

grass.script.run_command("v.stats", vector, layer=1, rasters=None, zones=None, rprefix=None, skipshape="area_id", skipunivar="label,all_cells,non_null_cells,null_cells,mean_of_abs,sum,sum_abs", shpcsv=None, rstcsv=None, rstpercentile=90, newlayer=2, newlayername=None, newtabname=None, separator=";", nprocs=1, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("v.stats", vector="name")

Parameters

vector=name [required]
    Name of vector map
    Name of input vector map
layer=integer
    Vector layer
    Default: 1
rasters=name [,name,...]
    Name of input raster maps
zones=name
    Name of raster zones map
rprefix=string [,string,...]
    Raster prefixes
skipshape=string [,string,...]
    Skip shape columns
    Default: area_id
skipunivar=string [,string,...]
    Skip shape columns
    Default: label,all_cells,non_null_cells,null_cells,mean_of_abs,sum,sum_abs
shpcsv=string
    CSV with the vector statistics of the shape
rstcsv=string [,string,...]
    CSV with the statistics of the raster maps
rstpercentile=integer
    Raster percentile to use
    Default: 90
newlayer=integer
    New vector layer that will be add to the vector map
    Default: 2
newlayername=string
    New vector layer that will be add to the vector map
newtabname=string
    New vector layer that will be add to the vector map
separator=string
    New vector layer that will be add to the vector map
    Default: ;
nprocs=integer
    Number of process that will be used
    Default: 1
-r
    Read from existing CSV files
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

vector : str, required
    Name of vector map
    Name of input vector map
    Used as: input, vector, name
layer : int, optional
    Vector layer
    Default: 1
rasters : str | list[str], optional
    Name of input raster maps
    Used as: input, raster, name
zones : str, optional
    Name of raster zones map
    Used as: input, raster, name
rprefix : str | list[str], optional
    Raster prefixes
skipshape : str | list[str], optional
    Skip shape columns
    Default: area_id
skipunivar : str | list[str], optional
    Skip shape columns
    Default: label,all_cells,non_null_cells,null_cells,mean_of_abs,sum,sum_abs
shpcsv : str, optional
    CSV with the vector statistics of the shape
rstcsv : str | list[str], optional
    CSV with the statistics of the raster maps
rstpercentile : int, optional
    Raster percentile to use
    Default: 90
newlayer : int, optional
    New vector layer that will be add to the vector map
    Default: 2
newlayername : str, optional
    New vector layer that will be add to the vector map
newtabname : str, optional
    New vector layer that will be add to the vector map
separator : str, optional
    New vector layer that will be add to the vector map
    Default: ;
nprocs : int, optional
    Number of process that will be used
    Default: 1
flags : str, optional
    Allowed values: r
    r
        Read from existing CSV files
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

The v.stats calculates vector statistics.

AUTHOR

Pietro Zambelli (University of Trento)

SOURCE CODE

Available at: v.stats source code (history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819