'\" -*- coding: UTF-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH pkstatogr 1 "02 March 2024" "" "" .SH NAME pkstatogr \- program to calculate basic statistics from vector file .SH SYNOPSIS 'nh .fi .ad l \*(T<\fBpkstatogr\fR\*(T> \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \*(T<\fB\-i\fR\*(T> \fIinput\fR [\fIoptions\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBpkstatogr\fR calculates basic statistics on attributes of a vector file. Examples of the basic statistics include: minimum, maximum, median, mean and standard deviation. Histograms (in percentage or absolute values) can also be calculated. The attribute of interest can be selected using the option \*(T<\fB\-n\fR\*(T>|\*(T<\fB\-\-fname\fR\*(T>. Values defined by the \*(T<\fB\-nodata\fR\*(T> option, or not within the limits set by the options \*(T<\fB\-src_min\fR\*(T> and \*(T<\fB\-src_max\fR\*(T> are ignored for the statistics. .SH OPTIONS .TP \*(T<\fB\-i\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-input\fR\*(T> \fIfilename\fR Input image file(s). If input contains multiple images, a multi-band output is created .TP \*(T<\fB\-ln\fR\*(T> \fIlayer\fR, \*(T<\fB\-\-lname\fR\*(T> \fIlayer\fR Layer name(s) in sample (leave empty to select all) .TP \*(T<\fB\-n\fR\*(T> \fIattribute\fR, \*(T<\fB\-\-fname\fR\*(T> \fIattribute\fR Fields on which to calculate statistics .TP \*(T<\fB\-nodata\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-nodata\fR\*(T> \fIvalue\fR Set nodata value(s) .TP \*(T<\fB\-src_min\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-src_min\fR\*(T> \fIvalue\fR Set minimum value for histogram .TP \*(T<\fB\-src_max\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-src_max\fR\*(T> \fIvalue\fR Set maximum value for histogram .TP \*(T<\fB\-s\fR\*(T>, \*(T<\fB\-\-size\fR\*(T> Sample size (number of points) .TP \*(T<\fB\-mm\fR\*(T>, \*(T<\fB\-\-minmax\fR\*(T> Calculate minimum and maximum value .TP \*(T<\fB\-min\fR\*(T>, \*(T<\fB\-\-min\fR\*(T> Calculate minimum value .TP \*(T<\fB\-max\fR\*(T>, \*(T<\fB\-\-max\fR\*(T> Calculate maximum value .TP \*(T<\fB\-mean\fR\*(T>, \*(T<\fB\-\-mean\fR\*(T> Calculate mean .TP \*(T<\fB\-median\fR\*(T>, \*(T<\fB\-\-median\fR\*(T> Calculate median .TP \*(T<\fB\-stdev\fR\*(T>, \*(T<\fB\-\-stdev\fR\*(T> Calculate standard deviation .TP \*(T<\fB\-hist\fR\*(T>, \*(T<\fB\-\-hist\fR\*(T> Calculate histogram .TP \*(T<\fB\-nbin\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-nbin\fR\*(T> \fIvalue\fR Number of bins to calculate histogram .TP \*(T<\fB\-rel\fR\*(T>, \*(T<\fB\-\-relative\fR\*(T> Use percentiles for histogram to calculate histogram .TP \*(T<\fB\-kde\fR\*(T>, \*(T<\fB\-\-kde\fR\*(T> Use .URL http://pktools.nongnu.org/html/classKernel.html Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb .TP \*(T<\fB\-v\fR\*(T> \fIlevel\fR, \*(T<\fB\-\-verbose\fR\*(T> \fIlevel\fR Verbose level .SH EXAMPLE report histogram of values in FIELDID (to standard output) .PP .nf \*(T< \fBpkstatogr\fR \fB\-i\fR \fIinput.shp\fR \fB\-f\fR \fIFIELDID\fR \fB\-n\fR \fI100\fR \*(T> .fi .PP report min, max, mean and standard deviation of values in FIELDID (to standard output) .PP .nf \*(T< \fBpkstatogr\fR \fB\-i\fR \fIinput.shp\fR \fB\-f\fR \fIFIELDID\fR \fB\-min\fR \fB\-max\fR \fB\-mean\fR \fB\-stdev\fR \*(T> .fi