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 windowmedianβ perform a median filter in spatial (dx,dy) or spectral/temporal (dz) domainvarβ calculate variance in windowstdevβ calculate standard deviation in windowminβ calculate minimum in windowmaxβ calculate maximum in windowsumβ calculate sum in windowmodeβ calculate mode of all valuesisminβ 1 if value is minimum, else 0ismaxβ 1 if value is maximum, else 0perβ calculate percentile in time series (provide percentage value as argument)propβ calculate proportionnvalidβ report number of valid observations
heads up bestie: a couple of these need extra info from you βmodewants classes,proportionwants classes, andpercentilewants 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 formode,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 alsogdal_translate(1)).-ct filename,--ct filenameβ Color table (file with 5 columns:id R G B ALFA(0: transparent, 255: solid). Usenoneto 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 value1for no downsampling. Use valuen>1for 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
- ubuntu questing: pktools 2.6.7.6+ds-6build4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms