| Label | Explanation | Data Type |
Input features | The input point features containing the z-values to be interpolated. | Feature Layer |
Z value field | Field that holds a height or magnitude value for each point. This can be a numeric field or the Shape field if the input features contain z-values or m-values. | Field |
Output geostatistical layer (Optional) | The geostatistical layer produced. This layer is required output only if no output raster is requested. | Geostatistical Layer |
Output raster (Optional) | The output raster. This raster is required output only if no output geostatistical layer is requested. | Raster Dataset |
Output cell size (Optional) | The cell size at which the output raster will be created. This value can be explicitly set in the Environments by the Cell Size parameter. If not set, 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 |
Power (Optional) | The exponent of distance that controls how quickly the weights decrease with distance. A higher power results in less influence from distant neighboring points. The value must be greater than or equal to 1. If no value is provided, a value will be estimated while the tool runs and displayed as a message. The estimated value will be the value that results in the lowest root-mean-square cross validation error. | Double |
Search neighborhood (Optional) | Defines which surrounding points will be used to control the output. Standard is the default. Standard
Smooth
Standard Circular
Smooth Circular
| Geostatistical Search Neighborhood |
Weight field (Optional) | Used to emphasize an observation. The larger the weight, the more impact it has on the prediction. For coincident observations, assign the largest weight to the most reliable measurement. | Field |
Available with Geostatistical Analyst license.
Summary
Uses inverse distance weighted interpolation to predict a value for any unsampled location using the measured values surrounding the prediction location. The tool uses the assumption that things that are close to one another are more alike than those that are farther apart.
Usage
The predicted value is limited to the range of the values used to interpolate. Because inverse distance weighted interpolation is a weighted distance average, the average cannot be greater than the highest or less than the lowest input data value. For example, it cannot predict ridges or valleys if the top of the ridge or bottom of the valley have not already been sampled.
Inverse distance weighted interpolation can produce contours at short distances around data locations (often called the bull's-eye effect).
Unlike other interpolation methods such as kriging, inverse distance weighted interpolation does not make explicit assumptions about the statistical properties of the input data. Inverse distance weighted interpolation is often used when the input data does not meet the statistical assumptions of more advanced interpolation methods.
Parameters
arcpy.ga.IDW(in_features, z_field, {out_ga_layer}, {out_raster}, {cell_size}, {power}, {search_neighborhood}, {weight_field})| Name | Explanation | Data Type |
in_features | The input point features containing the z-values to be interpolated. | Feature Layer |
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 input features contain z-values or m-values. | Field |
out_ga_layer (Optional) | The geostatistical layer produced. This layer is required output only if no output raster is requested. | Geostatistical Layer |
out_raster (Optional) | The output raster. This raster is required output only if no output geostatistical layer is requested. | Raster Dataset |
cell_size (Optional) | The cell size at which the output raster will be created. This value can be explicitly set in the Environments by the Cell Size parameter. If not set, 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 |
power (Optional) | The exponent of distance that controls how quickly the weights decrease with distance. A higher power results in less influence from distant neighboring points. The value must be greater than or equal to 1. If no value is provided, a value will be estimated while the tool runs and displayed as a message. The estimated value will be the value that results in the lowest root-mean-square cross validation error. | Double |
search_neighborhood (Optional) | Defines which surrounding points will be used to control the output. Standard is the default. The following are Search Neighborhood classes: SearchNeighborhoodStandard, SearchNeighborhoodSmooth, SearchNeighborhoodStandardCircular, and SearchNeighborhoodSmoothCircular. Standard
Smooth
Standard Circular
Smooth Circular
| Geostatistical Search Neighborhood |
weight_field (Optional) | Used to emphasize an observation. The larger the weight, the more impact it has on the prediction. For coincident observations, assign the largest weight to the most reliable measurement. | Field |
Code sample
Interpolate a series of point features onto a raster.
import arcpy
arcpy.env.workspace = "C:/gapyexamples/data"
arcpy.ga.IDW("ca_ozone_pts", "OZONE", "outIDW", "C:/gapyexamples/output/idwout", "2000", "2",
arcpy.SearchNeighborhoodStandard(300000, 300000, 0, 15, 10, "ONE_SECTOR"), "")Interpolate a series of point features onto a raster.
# Name: InverseDistanceWeighting_Example_02.py
# Description: Interpolate a series of point features onto a rectangular raster
# using Inverse Distance Weighting (IDW).
# Requirements: Geostatistical Analyst Extension
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/gapyexamples/data"
# Set local variables
inPointFeatures = "ca_ozone_pts.shp"
zField = "OZONE"
outLayer = "outIDW"
outRaster = "C:/gapyexamples/output/idwout"
cellSize = 2000.0
power = 2
# Set variables for search neighborhood
majSemiaxis = 300000
minSemiaxis = 300000
angle = 0
maxNeighbors = 15
minNeighbors = 10
sectorType = "ONE_SECTOR"
searchNeighbourhood = arcpy.SearchNeighborhoodStandard(majSemiaxis, minSemiaxis,
angle, maxNeighbors,
minNeighbors, sectorType)
# Execute IDW
arcpy.ga.IDW(inPointFeatures, zField, outLayer, outRaster, cellSize,
power, searchNeighbourhood)Environments
Licensing information
- Basic: Requires Geostatistical Analyst
- Standard: Requires Geostatistical Analyst
- Advanced: Requires Geostatistical Analyst