pkstat(1)

πŸ’– pkstat(1) πŸ’–

okay bestie, welcome to pkstat β€” it's the Unix utility that pulls basic statistics out of a raster dataset, and yes it's giving calculator energy but make it spatial ✨


✨ NAME ✨

pkstat β€” calculate basic statistics from raster dataset πŸ¦‹


🌸 SYNOPSIS 🌸

pkstat [options]

πŸ’… DESCRIPTION πŸ’…

so basically, pkstat is a utility to calculate basic statistics from a raster dataset. that's it, that's the whole vibe. it reads your raster, it does math, it hands you numbers. iconic behavior honestly πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • -i filename, --input filename β€” name of the input raster dataset πŸ’–
  • -b band, --band band β€” band(s) on which to calculate statistics
  • -f, --filename β€” shows image filename
  • -stats, --statistics β€” shows basic statistics (calculate in memory) β€” that's min, max, mean and stdDev of the raster datasets ✨
  • -fstats, --fstatistics β€” shows basic statistics using GDAL computeStatistics (min, max, mean and stdDev of the raster datasets)
  • -ulx value, --ulx value β€” Upper left x value bounding box
  • -uly value, --uly value β€” Upper left y value bounding box
  • -lrx value, --lrx value β€” Lower right x value bounding box
  • -lry value, --lry value β€” Lower right y value bounding box
  • -nodata value, --nodata value β€” Set nodata value(s)
  • -down value, --down value β€” Down sampling factor (for raster sample datasets only). Can be used to create grid points.
  • -rnd number, --rnd number β€” generate random numbers 🎲
  • -mean, --mean β€” calculate mean
  • -median, --median β€” calculate median
  • -var, --var β€” calculate variance
  • -skew, --skewness β€” calculate skewness
  • -kurt, --kurtosis β€” calculate kurtosis
  • -stdev, --stdev β€” calculate standard deviation
  • -sum, --sum β€” calculate sum of column
  • -mm, --minmax β€” calculate minimum and maximum value
  • -min, --min β€” calculate minimum value
  • -max, --max β€” calculate maximum value
  • -src_min value, --src_min value β€” start reading source from this minimum value
  • -src_max value, --src_max value β€” stop reading source from this maximum value
  • -hist, --hist β€” calculate histogram πŸ“Š
  • -hist2d, --hist2d β€” (the original page literally gives no description here, so we're all just living in mystery together πŸ™ˆ)
  • -nbin value, --nbin value β€” number of bins to calculate histogram
  • -rel, --relative β€” use percentiles for histogram to calculate histogram
  • -kde, --kde β€” Use Kernel density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb.
  • -cor, --correlation β€” calculate Pearson produc-moment correlation coefficient between two raster datasets (defined by -c col1 -c col2)
  • -rmse, --rmse β€” calculate root mean square error between two raster datasets
  • -reg, --regression β€” calculate linear regression between two raster datasets and get correlation coefficient
  • -regerr, --regerr β€” calculate linear regression between two raster datasets and get root mean square error
  • -preg, --preg β€” calculate perpendicular regression between two raster datasets and get correlation coefficient
  • -pregerr, --pregerr β€” calculate perpendicular regression between two raster datasets and get root mean square error
  • -v level, --verbose level β€” verbose mode when positive πŸ—£οΈ

and that's the whole page bestie, no cap, every single flag accounted for 🫢

so this lil manual is dated 01 January 2025 and it lives in the pkstat(1) section of the manual β€” that's the source/version and date situation, folded into this cute lil sign-off so you never forget where it came from πŸ’œ

go forth and compute those stats, you absolute main character πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from