Inverse Distance Weighting (IDW) Interpolation
Before tackling this tutorial, you will need to download and install a dataset following these instructions:
Create a folder called idw somewhere under your personal directory (e.g. C:\Users\jdoe\Documents\Tutorials\idw\).
Download the data for this exercise then extract the contents of Precipitation.zip into your newly created idw folder.
Open the map document
Open the idw.aprx map document.
The map consists of two layers: a precipitation point layer, precip_in.shp (in inches), and the outline of the State of Texas, texas.shp. The point layer represents sampled precipitation values. As such, the variable of interest, precipitation, is a spatially continuous variable. In other words, it is a variable that can be measured at any location within the study extent. The goal is to come up with precipitation estimates at all non-sampled locations. In this tutorial, you will interpolate between the sampled locations using Inverse Distance Weighting (IDW) techniques.
Launch the Geostatistical Wizard tool
Click on the Analysis tab to bring up its ribbon.
Near the right-hand side of the ribbon, click on the Geostatistical Wizard tool.
If the tool is grayed out, you might not be properly licensed to use the tool.
Define the initial set of IDW parameters
In the geostatistical wizard window, select Inverse Distance Weighting under the Deterministic methods option.
Set the Precipitation layer as the input dataset and Precip_in as the data field.
Click Next.
In the next window, you will see a preview of the interpolated surface.
The preview window offers some insights into how the sampled points around an unsampled location are weighted. For example, the unsampled point location identified as a cross symbol in the following graphic is estimated from 15 of the nearest point neighbors with the three closest points contributing about 70% towards the estimated precipitation value. If you expand the Weights pull-down menu, you can see the list of weights assigned to each point. For example, the closest point contributes 47% towards the estimated value. The second closest point contributes 13%, and so forth.
Feel free to click anywhere in the preview window to observe the changes in sampled point weights and their configuration.
Changing the shape of the search ellipse
By default, the search ellipse used to identify the closest points around an unsampled location is a perfect circle. This may not properly reflect the underlying gradient. One noticeable feature of the precipitation distribution is its pronounced east/west gradient. Hence, you would expect precipitation values to be more similar along a common longitude band than along a common latitude band.
As such, you would want the estimated value at an unsampled location to be influenced by sampled locations sharing the same longitude band as opposed to sampled locations sharing the same latitude band. This can be accomplished by changing the search ellipse's shape from isotropic (the default) to anisotropic. We'll therefore change the two ellipse parameters such that its semi-minor axis covers a distance of about 150 km and its semi-major axis covers a distance of about 400 km. These values are usually eyeballed but can also be inferred from a priori knowledge of the underlying process (such as orographic effects, or the like).
In the Geostatistical wizard, change the Major Semiaxis to 400000 m and the Minor Semiaxis to 150000 m.
You should observe the change in ellipse shape in the preview window. You'll also notice the changes in sampled point weights.
Another ellipse parameter you might also want to modify is the angle parameter. This changes the orientation of the ellipse. This may be useful if the gradient follows a diagonal orientation. This is not the case in this working example.
Changing the power parameter
The power parameter influences the weights of each sampled point. An increase in its value assigns greater weight to points closest to the unsampled location. A smaller power value spreads the weights more evenly across the sampled points. Note that this tool limits you to a minimum power of 1.
Change the power parameter (top field in the IDW window) to a high value like 20 (you might need to click on the Tab or Enter key after typing the new value to make sure that the change takes place).
Note the Thiessen like pattern in the interpolated surface. If you scan the Weights list, you'll also note that the closest point to an unsampled location has a weight close to 1 (i.e. nearly 100% of the interpolated value comes from that one sampled point location).
Change the power parameter to its smallest allowed value, 1.
Here the interpolated surface appears much smoother. If the power parameter were allowed to be set to a value much smaller than 1 (such as 0.01), most points would have nearly identical weight values.
Set the power parameter back to 2 before moving onto the next section.
Using the cross-validation plot to optimize the interpolation parameters
The geostatistical wizard offers a leave-one-out cross validation tool that you can use to help guide your interpolation parameter settings.
In the Geostatistical wizard window, click on Next.
This next window plots the predicted values at each sampled location against the expected values given the parameter values set in the previous window. The goal is to generate a plot such that most of the points fall along the grey 1:1 line. The blue line is a slope that best fits the observed point pattern. You can also make use of the root mean square error statistic (RMSE) that offers an overall estimated error (in the same units as the input attribute value). In this example, the RMSE is 3.1 inches of rainfall.
On your own, click on the Back button to return to the parameters window.
Tweak the parameters as you see fit, then click Next to observe the changes in the RMSE and cross validation plot.
Repeat the last two steps until you come up with a set of interpolation parameters that you feel do the best job in reducing interpolation errors.
In this working example, the parameters shown in the adjoining figure are chosen. But note that there is no reason you can't come up with a better set of parameters.
Click Finish to add the layer to your Contents pane.
Exporting the interpolated surface to a permanent raster file
At this point, the interpolated surface resides only in memory. To make this a permanent raster, you must export it.
Near the bottom of the Contents pane, right-click on the Inverse Distance Weighting layer and select Export layer >> to Rasters.
This will bring up the GA Layer to Rasters geoprocessing pane.
Save the output raster to your idw/ folder and name it idw.tif.
Set the output pixel size to 5000 m.
Before clicking Run, we will need to set the output extent and mask.
Click on the Environments tab.
In the Environments window, set the Extent and the Mask to that of the Texas layer.
Click Run to generate the final raster.
You might need to turn off the temporary IDW layer or move it to the bottom of the stack in the Contents pane to view the newly created idw.tif layer.
Feel free to change the symbology of the newly created raster. In the attached screenshot, a divergent color scheme is adopted.
Save and close your project.
This completes the tutorial.