Trend surface

This tool can be used to interpolate a trend surface from a raster image. The technique uses a polynomial, least-squares regression analysis. The user must specify the name of the input raster file. In addition, the user must specify the polynomial order (0 to 10) for the analysis. A first-order polynomial is a planar surface with no curvature. As the polynomial order is increased, greater flexibility is allowed in the fitted surface. Although polynomial orders as high as 10 are accepted, numerical instability in the analysis often creates artifacts in trend surfaces of orders greater than 5. The operation will display a text report on completion, in addition to the output raster image. The report will list each of the coefficient values and the r-square value. Note that the entire raster image must be able to fit into computer memory, limiting the use of this tool to relatively small rasters. The Trend Surface (Vector Points) tool can be used instead if the input data is vector points contained in a shapefile.

See Also:

Scripting:

The following is an example of a Python script that uses this tool:

wd = pluginHost.getWorkingDirectory()
inputFile = wd + "input.dep"
outputFile = wd + "output.dep"
polyOrder = "1"
args = [inputFile, outputFile, polyOrder]
pluginHost.runPlugin("TrendSurface", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "input.dep"
def outputFile = wd + "output.dep"
def polyOrder = "2"
String[] args = [inputFile, outputFile, polyOrder]
pluginHost.runPlugin("TrendSurface", args, false)

Credits: