Kriging

Interpolates a surface from points using kriging.

Learn more about how Kriging works


Usage tips

Command line and Scripting

Map Algebra

Syntax

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 Datatype
Input point features (Required)

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

Composite Geodataset
Z value 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
Output surface raster (Required)

The output raster surface to be created.

Raster Dataset
Semivariogram properties (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
Semivariogram properties (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"

Output 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 surrounding points will be used to control the raster.

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

  • VARIABLE {number_of_points} {maximum_distance}

{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. If the number of points for the VARIABLE option cannot be satisfied within that maximum distance, a smaller number of points will be used.

  • FIXED {distance} {minimum_number_of_points}

{distance} — 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.

{minimum_number_of_points} — An integer 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 found. The default is zero.

Radius
Output variance of 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


See Also

  • An overview of the Interpolation tools
  • Spline
  • Natural Neighbor
  • Trend
  • IDW
  • Using the ArcGIS Spatial Analyst toolbar to create a surface using Kriging interpolation