Show Navigation | Hide Navigation
You are here:
Extensions > Spatial Analyst > Spatial Analyst functional reference > Interpolation (Spatial Analyst)

Kriging

Release 9.3
Last modified September 7, 2011
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Interpolation (Spatial Analyst)"


Related Topics

Interpolates a surface from points using kriging.

Learn more about how Kriging works


Usage tips

Command line syntax
An overview of the Command Line window
Kriging_sa <in_point_features> <z_field> <out_surface_raster> <SPHERICAL | CIRCULAR | EXPONENTIAL | GAUSSIAN | LINEAR | LINEARDRIFT | QUADRATICDRIFT | NONE> {Lag size} {Major range} {Partial sill} {Nugget} {cell_size} {search_radius} {out_variance_prediction_raster}

Parameter Explanation Data Type
<in_point_features>

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

Composite Geodataset
<z_field>

Field that holds a height or magnitude value for each point.

This can be a numeric field or the Shape field, if the in_point_features contains z-values.

Field
<out_surface_raster>

The output raster surface to be created.

Raster Dataset
<SPHERICAL | CIRCULAR | EXPONENTIAL | GAUSSIAN | LINEAR | LINEARDRIFT | QUADRATICDRIFT | NONE>

Semivariogram model to be used.

  • SPHERICAL  — Spherical semivariogram model. This is the default.
  • CIRCULAR  — Circular semivariogram model.
  • EXPONENTIAL  — Exponential semivariogram model.
  • GAUSSIAN  — Gaussian (or normal distribution) semivariogram model.
  • LINEAR  — Linear semivariogram model with a sill.
  • LINEARDRIFT  — Universal Kriging with linear drift.
  • QUADRATICDRIFT  — Universal Kriging with quadratic drift.

SemiVariogram
{Lag size} {Major range} {Partial sill} {Nugget}

These advanced parameters must be enclosed in double quotation marks along with the semivariogram model option.

  • Lag size  — The default is the output raster cell size.
  • Major range  — Represents a distance beyond which there is little or no correlation.
  • Partial sill  — The difference between the nugget and the sill.
  • Nugget  — Represents the error and variation at spatial scales too fine to detect. The nugget effect is seen as a discontinuity at the origin.

An example semiovariogram:

    "Spherical 0.4496 2.6185 542.65 0"

{cell_size}

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 in_point_features, in the input spatial reference, divided by 250.

Analysis cell size
{search_radius}

Defines which of the input points will be used to interpolate the value for each cell in the output raster.

There are two options: VARIABLE and FIXED. Variable is the default.

  • VARIABLE {number_of_points} {maximum_distance}
  • Uses a variable search radius in order to find a specified number of input sample points for the interpolation.
    • {number_of_points}  — An integer value specifying the number of nearest input sample points to be used to perform interpolation. The default is 12 points.
    • {maximum_distance}  — Specifies the distance, in map units, by which to limit the search for the nearest input sample points. The default value for maximum_distance is the length of the extent's diagonal.
  • FIXED {distance} {minimum_number_of_points}
  • Uses a specified fixed distance within which all input points will be used for the interpolation.
    • {distance}  — Specifies the distance as a radius within which input sample points will be used to perform the interplation.
    • The value of the radius is expressed in map units. The default radius is five times the cell size of the output raster.
    • {minimum_number_of_points}  — An integer defining the minimum number of points to be used for interpolation. The default value is zero (0).

Radius
{out_variance_prediction_raster}

Optional output raster where each cell contains the predicted semi-variance values for that location.

Raster Dataset
Data types for geoprocessing tool parameters


Command line example

Kriging_sa C:/data/pts.shp z_value C:/data/final_1 "Spherical 0.4496 2.6185 542.65 0" 1 "VARIABLE 12" ""

Scripting syntax
About getting started with writing geoprocessing scripts
Kriging_sa (in_point_features, z_field, out_surface_raster, semiVariogram_props, {Lag size} {Major range} {Partial sill} {Nugget}, cell_size, search_radius, out_variance_prediction_raster)

Parameter Explanation Data Type
in_point_features (Required)

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

Composite Geodataset
z_field (Required)

Field that holds a height or magnitude value for each point.

This can be a numeric field or the Shape field, if the in_point_features contains z-values.

Field
out_surface_raster (Required)

The output raster surface to be created.

Raster Dataset
semiVariogram_props (Required)

Semivariogram model to be used.

  • SPHERICAL  — Spherical semivariogram model. This is the default.
  • CIRCULAR  — Circular semivariogram model.
  • EXPONENTIAL  — Exponential semivariogram model.
  • GAUSSIAN  — Gaussian (or normal distribution) semivariogram model.
  • LINEAR  — Linear semivariogram model with a sill.
  • LINEARDRIFT  — Universal Kriging with linear drift.
  • QUADRATICDRIFT  — Universal Kriging with quadratic drift.

SemiVariogram
{Lag size} {Major range} {Partial sill} {Nugget} (Optional)

These advanced parameters must be enclosed in double quotation marks along with the semivariogram model option.

  • Lag size  — The default is the output raster cell size.
  • Major range  — Represents a distance beyond which there is little or no correlation.
  • Partial sill  — The difference between the nugget and the sill.
  • Nugget  — Represents the error and variation at spatial scales too fine to detect. The nugget effect is seen as a discontinuity at the origin.

An example semiovariogram:

    "Spherical 0.4496 2.6185 542.65 0"

cell_size (Optional)

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 in_point_features, in the input spatial reference, divided by 250.

Analysis cell size
search_radius (Optional)

Defines which of the input points will be used to interpolate the value for each cell in the output raster.

There are two options: VARIABLE and FIXED. Variable is the default.

  • VARIABLE {number_of_points} {maximum_distance}
  • Uses a variable search radius in order to find a specified number of input sample points for the interpolation.
    • {number_of_points}  — An integer value specifying the number of nearest input sample points to be used to perform interpolation. The default is 12 points.
    • {maximum_distance}  — Specifies the distance, in map units, by which to limit the search for the nearest input sample points. The default value for maximum_distance is the length of the extent's diagonal.
  • FIXED {distance} {minimum_number_of_points}
  • Uses a specified fixed distance within which all input points will be used for the interpolation.
    • {distance}  — Specifies the distance as a radius within which input sample points will be used to perform the interplation.
    • The value of the radius is expressed in map units. The default radius is five times the cell size of the output raster.
    • {minimum_number_of_points}  — An integer defining the minimum number of points to be used for interpolation. The default value is zero (0).

Radius
out_variance_prediction_raster (Optional)

Optional output raster where each cell contains the predicted semi-variance values for that location.

Raster Dataset

Data types for geoprocessing tool parameters


Script example

# Kriging_sample.py
# Description:
#   Interpolate a series of point features onto a rectangular raster using kriging.
# Requirements: None
# Author: ESRI
# Date: Sept 6, 2005
# Import system modules
import arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

try:
    # Set the input feature dataset
    inputFeatureDataset = "C:/data/pts.shp"

    # Set the output raster name
    outputRaster = "C:/data/final_1"

    # Don't write out the variance raster
    Output_variance_of_prediction_raster = ""

    # Set the output extent 
    gp.Extent = "0 0 6 6"

    # Define the semivariogram 
    Model = "Spherical "         #(Remember the space at the end)
    LagSize = "0.4496 "          #(Remember the space at the end)
    MajorRange = "2.6185 "       #(Remember the space at the end)
    PartialSill = "542.65 "      #(Remember the space at the end)
    Nugget = "0"
    Semivariogram = Model + LagSize + MajorRange + PartialSill + Nugget

    # Set the attribute field
    attributeName = "z_value"

    # Check out Spatial Analyst extension license
    gp.CheckOutExtension("Spatial")

    # Process: Kriging...
    gp.Kriging_sa(inputFeatureDataset, attributeName, outputRaster, Semivariogram, _
                  "1", "VARIABLE 12", Output_variance_of_prediction_raster)

except:
    # If an error occurred while running a tool, then print the messages
    print gp.GetMessages()

Map Algebra syntax
Kriging(<point_feature | point_file>, {spot_item}, {barrier_cover | barrier_file}, {BOTH | GRAPH | GRID}, {output_variance}, {method}, {SAMPLE, {num_points}, {max_radius}}, {cellsize}, {xmin, ymin, xmax, ymax})

Kriging(<point_feature | point_file>, {spot_item}, {barrier_cover | barrier_file}, {BOTH | GRAPH | GRID}, {output_variance}, {method}, {RADIUS, {radius}, {min_points}}, {cellsize}, {xmin, ymin, xmax, ymax})

Parameter Explanation
<point_feature | point_file> The source of the data containing points with z-values to be converted to a raster surface.
  • point_feature  — A point coverage or shapefile with z-values stored in an item.
  • point_file  — An ASCII GENERATE file in the POINT format.
{spot_item} Name of a numeric item in the <in_feature>.PAT or a related table containing the point values.
The default item name is SPOT. Use the # symbol as a placeholder when the point locations are input using a <point_file>.
{barrier_feature | barrier_file} The source of barrier information used for limiting the line search for input sample points.
  • barrier_feature  — A coverage or shapefile containing arcs.
  • barrier_file  — An ASCII file of lines in GENERATE format.
{BOTH | GRAPH | GRID} Keyword specifying whether the output will be a surface raster, a datafile containing semivariance values, or both, will be created.
The semivariance values datafile is an INFO file with the specified output name followed by ".SVG". The semivariance values can be used to plot a semivariogram graph. Note that if a datafile with the same name already exists in the workspace, the new information will be appended to it; otherwise, a new file will be created.
  • BOTH  — Both an INFO datafile as well as the specified output surface raster and optional {output_variance} raster will be created. This is the default.
  • GRAPH  — Only the INFO datafile will be created. The INFO datafile will be named output.SVG. No {output_variance} raster will be created with the Graph option.
  • GRID  — Only the specified output surface raster and optional {output_variance} raster will be created.
{output_variance} Name of the optional out_grid containing predicted semivariance values for each mesh point in <out_grid>.
If the GRAPH option is specified, an {output_variance} raster will not be created.
{method} Keyword specifying the type of mathematical function used to model the semivariance.
An out_grid.SVG file can also be used.
  • SPHERICAL  — Spherical semivariogram model. This is the default.
  • CIRCULAR  — Circular semivariogram model.
  • EXPONENTIAL  — Exponential semivariogram model.
  • GAUSSIAN  — Gaussian or normal distribution semivariogram model.
  • LINEAR  — Linear semivariogram model with a sill.
  • UNIVERSAL1  — Universal kriging with linear drift.
  • The GRAPH and BOTH options are not available with the UNIVERSAL1 method.
  • UNIVERSAL2  — Universal kriging with quadratic drift.
  • The GRAPH and BOTH options are not available with the UNIVERSAL2 method.

An out_grid.SVG file allows you to make several kriging runs with a variety of methods and cell sizes, then use that SVG file as the semivariogram model.
SAMPLE Keyword indicating the method used to select neighboring input sample points for interpolating the value of each cell in the output raster.
{num_points} An integer value specifying the number of the nearest input sample points to be used to perform interpolation.
A commonly used value is 12 points.
{max_radius} Specifies the distance, in map units, within which to limit the search for the nearest input sample points.
If the number of points for the SAMPLE option cannot be satisfied within the {max_radius}, a smaller number of points will be used.
RADIUS Keyword indicating that a search radius will be used to select neighboring points for interpolating the value for each cell in the output raster.
{radius} The distance, in map units, specifying that all input sample points within the specified radius will be used to perform interpolation.
The default radius is five times the cell size of the output raster.
{min_points} An integer value defining the minimum number of points to be used for interpolation.
If the required number of points is not found within the specified radius, the search radius will be increased until the specified minimum number of points is met. The default is zero.
{cellsize} The width or height of a cell in map units.
Cell size defaults to the current environment setting. If no {cellsize} is set, the cell size on the Cell Size tab on the ArcGIS Spatial Analyst Options dialog box must be set to establish the current environment setting.
{xmin, ymin, xmax, ymax} The dimensions, in map units, of the window in which to perform the interpolation.
Defaults to the current environment settings. If no environment is set, the default is the boundary of the input extended outward 0.5 times the cell size.

Map Algebra example

kriging(cover)
kriging(file, #, #, graph, #, circular)
kriging(cover, item, #, #, out_var, linear, sample, 9)
kriging(cover, #, #, #, #, gaussian, #, #, #, 36)
kriging(file, #, #, grid, #, universal2, radius, 400)

ArcObjects syntax
See Krige and Variogram

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.