---
name: "pkstat"
section: "1"
platform: "linux"
package: "pktools"
version: "2.6.7.6+ds-6+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pkstat"
---

# pkstat(1)

calculate basic statistics from raster dataset

## NAME

pkstat - calculate basic statistics from raster dataset

## SYNOPSIS

FC**pkstat**F\[0\]  \[*options*\]

## DESCRIPTION

**pkstat** is utility to calculate basic statistics from a raster dataset.

## OPTIONS

- FC**-i**F\[0\] *filename*, FC**--input**F\[0\] *filename*

  name of the input raster dataset

- FC**-b**F\[0\] *band*, FC**--band**F\[0\] *band*

  band(s) on which to calculate statistics

- FC**-f**F\[0\], FC**--filename**F\[0\]

  Shows image filename

- FC**-stats**F\[0\], FC**--statistics**F\[0\]

  Shows basic statistics (calculate in memory) (min,max, mean and stdDev of the raster datasets)

- FC**-fstats**F\[0\], FC**--fstatistics**F\[0\]

  Shows basic statistics using GDAL computeStatistics (min,max, mean and stdDev of the raster datasets)

- FC**-ulx**F\[0\] *value*, FC**--ulx**F\[0\] *value*

  Upper left x value bounding box

- FC**-uly**F\[0\] *value*, FC**--uly**F\[0\] *value*

  Upper left y value bounding box

- FC**-lrx**F\[0\] *value*, FC**--lrx**F\[0\] *value*

  Lower right x value bounding box

- FC**-lry**F\[0\] *value*, FC**--lry**F\[0\] *value*

  Lower right y value bounding box

- FC**-nodata**F\[0\] *value*, FC**--nodata**F\[0\] *value*

  Set nodata value(s)

- FC**-down**F\[0\] *value*, FC**--down**F\[0\] *value*

  Down sampling factor (for raster sample datasets only). Can be used to create grid points.

- FC**-rnd**F\[0\] *number*, FC**--rnd**F\[0\] *number*

  generate random numbers

- FC**-mean**F\[0\], FC**--mean**F\[0\]

  calculate mean

- FC**-median**F\[0\], FC**--median**F\[0\]

  calculate median

- FC**-var**F\[0\], FC**--var**F\[0\]

  calculate variance

- FC**-skew**F\[0\], FC**--skewness**F\[0\]

  calculate skewness

- FC**-kurt**F\[0\], FC**--kurtosis**F\[0\]

  calculate kurtosis

- FC**-stdev**F\[0\], FC**--stdev**F\[0\]

  calculate standard deviation

- FC**-sum**F\[0\], FC**--sum**F\[0\]

  calculate sum of column

- FC**-mm**F\[0\], FC**--minmax**F\[0\]

  calculate minimum and maximum value

- FC**-min**F\[0\], FC**--min**F\[0\]

  calculate minimum value

- FC**-max**F\[0\], FC**--max**F\[0\]

  calculate maximum value

- FC**-src\_min**F\[0\] *value*, FC**--src\_min**F\[0\] *value*

  start reading source from this minimum value

- FC**-src\_max**F\[0\] *value*, FC**--src\_max**F\[0\] *value*

  stop reading source from this maximum value

- FC**-hist**F\[0\], FC**--hist**F\[0\]

  calculate histogram

- FC**-hist2d**F\[0\], FC**--hist2d**F\[0\]

  - FC**-nbin**F\[0\] *value*, FC**--nbin**F\[0\] *value*

  number of bins to calculate histogram

- FC**-rel**F\[0\], FC**--relative**F\[0\]

  use percentiles for histogram to calculate histogram

- FC**-kde**F\[0\], FC**--kde**F\[0\]

  Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb.

- FC**-cor**F\[0\], FC**--correlation**F\[0\]

  calculate Pearson produc-moment correlation coefficient between two raster datasets (defined by FC**-c**F\[0\] *col1* FC**-c**F\[0\] *col2*)

- FC**-rmse**F\[0\], FC**--rmse**F\[0\]

  calculate root mean square error between two raster datasets

- FC**-reg**F\[0\], FC**--regression**F\[0\]

  calculate linear regression between two raster datasets and get correlation coefficient

- FC**-regerr**F\[0\], FC**--regerr**F\[0\]

  calculate linear regression between two raster datasets and get root mean square error

- FC**-preg**F\[0\], FC**--preg**F\[0\]

  calculate perpendicular regression between two raster datasets and get correlation coefficient

- FC**-pregerr**F\[0\], FC**--pregerr**F\[0\]

  calculate perpendicular regression between two raster datasets and get root mean square error

- FC**-v**F\[0\] *level*, FC**--verbose**F\[0\] *level*

  verbose mode when positive
