Perform a 3x3 smoothing filter on channel 4. Note the use of backslashes to extend a statement over multiple lines.
MODEL
%7 = (%4[@x-1,@y-1] + %4[@x,@y-1] + %4[@x+1,@y-1] + \
%4[@x-1,@y ] + %4[@x,@y ] + %4[@x+1,@y ] + \
%4[@x-1,@y+1] + %4[@x,@y+1] + %4[@x+1,@y+1] ) / 9
ENDMODEL
When processing pixels on the border of the image, the neighborhood of the current pixel will extend off the database. To ensure that referenced pixels that are off the database (such as %4[@x-1,@y-1] in the top left corner) are usable the image values are replicated out from the edge of the database to supply values that are missing.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.