Trend (Spatial Analyst)


Interpolates a raster surface from points using a trend technique.

Learn more about how Trend works



Trend (in_point_features, z_field, {cell_size}, {order}, {regression_type}, {out_rms_file})
ParameterExplanationData Type

The input point features containing the z-values to be interpolated into a surface raster.

Feature Layer

The field that holds a height or magnitude value for each point.

This can be a numeric field or the Shape field if the input point features contain z-values.

If the regression type is Logistic, the values in the field can only be 0 or 1.


The cell size at which the output raster will be created.

This will be the value in the environment if it is explicitly set; otherwise, it is the shorter of the width or the height of the extent of the input point features, in the input spatial reference, divided by 250.

Analysis Cell Size

The order of the polynomial.

This must be an integer between 1 and 12. A value of 1 will fit a flat plane to the points, and a higher value will fit a more complex surface. The default is 1.


The type of regression to be performed.

  • LINEAR Polynomial regression is performed to fit a least-squares surface to the set of input points. This is applicable for continuous types of data.
  • LOGISTIC Logistic trend surface analysis is performed. It generates a continuous probability surface for binary, or dichotomous, types of data.

File name for the output text file that contains information about the RMS error and the Chi-Square of the interpolation.

The extension must be ".txt".


Return Value

NameExplanationData Type

The output interpolated surface raster.


Code Sample

Trend example 1 (Python window)

This example inputs a point shapefile and interpolates the output surface as a TIFF raster.

import arcpy
from arcpy import env  
from import *
env.workspace = "C:/sapyexamples/data"
outTrend = Trend("ozone_pts.shp", "ozone", 2000, 2, "LINEAR")"C:/sapyexamples/output/trendout.tif")
Trend example 2 (stand-alone script)

This example inputs a point shapefile and interpolates the output surface as a GRID raster.

# Name:
# Description: Interpolate a series of point features 
#    onto a rectangular raster using a trend technique.
# Requirements: Spatial Analyst Extension
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env
from import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inPointFeatures = "ca_ozone_pts.shp"
zField = "ozone"
cellSize = 2000.0
PolynomialOrder = 2
regressionType = "LINEAR"

# Check out the ArcGIS Spatial Analyst extension license

# Execute Trend
outTrend = Trend(inPointFeatures, zField, cellSize, 
                 PolynomialOrder, regressionType)

# Save the output"C:/sapyexamples/output/trendout02")


Related Topics

Licensing Information

ArcView: Requires Spatial Analyst or 3D Analyst
ArcEditor: Requires Spatial Analyst or 3D Analyst
ArcInfo: Requires Spatial Analyst or 3D Analyst