2
# -*- coding: utf-8 -*-
3
############################################################################
5
# MODULE: t.vect.univar
6
# AUTHOR(S): Soeren Gebbert
8
# PURPOSE: Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset
9
# COPYRIGHT: (C) 2011-2014 by the GRASS Development Team
11
# This program is free software under the GNU General Public
12
# License (version 2). Read the file COPYING that comes with GRASS
15
#############################################################################
18
#% description: Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset
20
#% keyword: statistics
24
#%option G_OPT_STVDS_INPUT
27
#%option G_OPT_V_FIELD
30
#%option G_OPT_DB_COLUMN
34
#%option G_OPT_T_WHERE
35
#% guisection: Selection
39
#%option G_OPT_DB_WHERE
40
#% guisection: Selection
44
#% options: point,line,boundary,centroid,area
50
#% description: Field separator character between the output columns
51
#% guisection: Formatting
56
#% description: Calculate extended statistics
61
#% description: Suppress printing of column names
62
#% guisection: Formatting
65
import grass.script as grass
66
import grass.temporal as tgis
68
############################################################################
73
input = options["input"]
74
twhere = options["twhere"]
75
layer = options["layer"]
76
type = options["type"]
77
column = options["column"]
78
where = options["where"]
81
separator = grass.separator(options["separator"])
83
# Make sure the temporal database exists
86
tgis.print_vector_dataset_univar_statistics(
87
input, twhere, layer, type, column, where, extended, header, separator)
89
if __name__ == "__main__":
90
options, flags = grass.parser()