pkstatprofile(1)

πŸ’– pkstatprofile β€” the manual, but make it make sense πŸ’–

okay so bestie, welcome to pkstatprofile, a lil program from the pkstatprofile(1) manual that calculates statistics for you. no cap, it's giving "I do math on your rasters while you sip your iced coffee" energy. ✨


🌸 SYNOPSIS 🌸

pkstatprofile -i input -o output [-f function] [options]

that's the whole vibe. -i in, -o out, and then you sprinkle your stats on top like glitter. πŸ¦‹


✨ DESCRIPTION ✨

pkstatprofile calculates statistics for a temporal (time series) or spectral profile. literally what it says on the tin. πŸ’…

here's the whole menu of function values, fr fr:

  • mean β€” calculate mean in window
  • median β€” perform a median filter in spatial (dx, dy) or spectral/temporal (dz) domain
  • var β€” calculate variance in window
  • stdev β€” calculate standard deviation in window
  • min β€” calculate minimum in window
  • max β€” calculate maximum in window
  • sum β€” calculate sum in window
  • mode β€” calculate mode of all values
  • ismin β€” 1 if value is minimum, else 0
  • ismax β€” 1 if value is maximum, else 0
  • per β€” calculate percentile in time series (provide percentage value as argument)
  • prop β€” calculate proportion
  • nvalid β€” report number of valid observations
heads up bestie: a couple of these need extra info from you β€” mode wants classes, proportion wants classes, and percentile wants a percentage value. iykyk. πŸŽ€

🌈 example: min and max NDVI in a time series

pkstatprofile -i modis_ndvi_2010.tif -o modis_stats_2010.tif -f min -f max

see? two -f flags, two stats, one iconic output file. periodt. πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -i filename, --input filename β€” Input image file.
  • -o filename, --output filename β€” Output image file
  • -f function, --function function β€” Statistics function (mean, median, var, stdev, min, max, sum, mode (provide classes), ismin, ismax, proportion (provide classes), percentile, nvalid)
  • -perc percentile, --perc percentile β€” Percentile value(s) used for rule percentile
  • -class class, --class class β€” class value(s) to use for mode, proportion
  • -nodata value, --nodata value β€” Set nodata value(s)
  • -ot type, --otype type β€” Data type for output image ({Byte / Int16 / UInt16 / UInt32 / Int32 / Float32 / Float64 / CInt16 / CInt32 / CFloat32 / CFloat64}). Empty string: inherit type from input image.
  • -of format, --oformat format β€” Output image format (see also gdal_translate(1)).
  • -ct filename, --ct filename β€” Color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid). Use none to omit color table.
  • -co NAME=VALUE, --co NAME=VALUE β€” Creation option for output file. Multiple options can be specified.
  • -d value, --down value β€” Down sampling factor. Use value 1 for no downsampling. Use value n>1 for downsampling (aggregation).
  • -v level, --verbose level β€” Verbose mode if > 0
gentle reminder: -ct has an unclosed paren situation in the original and we're keeping it exactly as-is, because the facts don't change, only the vibes do. πŸ™ˆ

🫢 the cute lil sign-off 🫢

and that's the whole page, bestie!! this was the pkstatprofile(1) manual, dated 01 January 2025, and the footer says the same thing twice because that's just how manpages are. slay. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from