pktools  2.6.4
Processing Kernel for geospatial data
pkfilter

program to filter raster images

SYNOPSIS

Usage: pkfilter -i input -o ouptut [-f filter | -perc value | -srf file [-srf file]* -win wavelength [-win wavelength]* | -wout wavelength -fwhm value [-wout wavelength -fwhm value]* -win wavelength [-win wavelength]*]

Options: [-dx value [-dy value] | -dz value] [-nodata value]

Advanced options: check table

Description

This utility implements spatial and spectral filtering for raster data. In the spatial domain (X, Y), the filter typically involves a rectangular convolution kernel (moving window). To avoid image shifting, the size of the window should be odd (3, 5, 7, ...). You can set the window sizes in X and Y directions separately with the options -dx and -dy. A circular kernel (disc) is applied if option -circ is set. An overview of the supported filters (option -f|–filter) is given below. You can create customized filters by defining your own filter taps (multiplicative elements of the filter kernel) via an ascii file (option -tap). In the spectral/temporal domain (Z) you can filter multi-band raster inputs. The kernel filter size can be set with the option -dz (use odd values only).

hiero

composite rule composite output
overwrite Overwrite overlapping pixels: the latter input image on the command line overrules the previous image
maxndvi Create a maximum NDVI (normalized difference vegetation index) composite from multi-band input images. Use option -cb to set the indexes of the red and near infrared bands respectively (e.g., -cb 0 -cb 1)
maxband Select the pixel with a maximum value in the band specified by option -cb
minband Select the pixel with a minimum value in the band specified by option -cb
mean Calculate the mean (average) of overlapping pixels
stdev Calculate the standard deviation of overlapping pixels
median Calculate the median of overlapping pixels
mode Select the mode of overlapping pixels (maximum voting): use for Byte images only
sum Calculate the arithmetic sum of overlapping pixels
maxallbands For each individual band, assign the maximum value found in all overlapping pixels. Unlike maxband, output band values cannot be attributed to a single (date) pixel in the input time series
minallbands For each individual band, assign the minimum value found in all overlapping pixels. Unlike minband, output band values cannot be attributed to a single (date) pixel in the input time series

Options

Examples

Some examples how to use pkfilter can be found here