Part II: Interpolate Point Data to a Continuous Raster
In Part II, we will use the Spatial Analyst extension tools to interpolate the carbon sequestration data we calculated for each plot to the entire forest. We will run the same interpolation tool several times to see how altering the extent, mask, and cell size settings affect the results. We will start by accepting all default settings. Then we will change the settings one at a time to see how each one affects the results.
-
Look for Trends in the Data
- Remember from Lesson 3 that it is wise to be aware of trends and spatial patterns in your data before you start to modify it using automated tools.
- Open the "Plots_carbon" attribute table and explore the data. You may need to set the alias of the Cnt_PLOTID again.
Do some plots have more trees than others? Is there a lot of variation in the total amount of carbon or carbon per square meter value? If so, why do you think this may occur? Hint: Look at an aerial image basemap.
- Change the symbology to Proportional Symbols. Use the "c_lbsqm" as the Field value. Accept the remaining defaults.
Do you see any spatial patterns in the data? For example, do some areas of the forest have higher values than others? If so, why do you think this may occur?
-
Explore Spatial Analyst Toolbox.
- Go to the Analysis tab, in the Geoprocessing group select Tools.
- In the open Geoprocessing pane, select Toolboxes and scroll to the Spatial Analyst Tools, and browse through the available tools. We will be using these tools for the remainder of this course.
-
Interpolate Data Using All Default Settings
Remember from the Background Information section that the Spatial Analyst tools are governed by user-specified settings. Two of the most common errors when using Spatial Analyst tools are to either completely ignore these settings, or to set them improperly. Let’s try to interpolate our data using all of the defaults and see what our results look like.
Make sure you double-check ALL environment settings before running ANY tools in Spatial Analyst! The program often resets your cell size, extent, and mask to program or data layer defaults.
- Within the Analysis tab, go to Tools > Toolboxes > Spatial Analyst Tools > Interpolation > IDW. Use the settings below to interpolate the carbon per square meter values. Save the output raster in your L6Data folder and name it "default." Click Run.
Click the Show Help >> button to help define particular input parameters.
You can review the specific input and environment settings you used in the Analysis tab, Geoprocessing group > History. This can be helpful if you are not sure if you made a mistake somewhere along the way during a complex workflow.
- Change the symbology of the default raster as shown below (5 classes, colors light to dark red).
Make sure you have the correct answer before moving on to the next step.
If your map does not match the example below, go back and redo the previous step.
- Compare the results with the "Plots_carbon" shapefile. Areas near plots with high carbon values should be darker than areas near plots with low carbon values. Confirming your output results assures you that you selected the correct input dataset and field to interpolate.
- Notice how the interpolated raster does not match the forest boundary, how the shape of the output grid is a perfect rectangle, how the extent of the raster matches that of the smallest rectangle that can contain all of the plot points, and that the cell size is 0.87999… meters.
- Why did this occur? Let’s take a look at some of the environment settings utilized by Spatial Analyst to find out. Go to Geoprocessing > Environments. As noted earlier in this course, environment settings are the system-wide default settings that are used by every tool. Spatial Analyst utilizes Workspace, Output Coordinates, Processing Extent, Raster Analysis, and Raster Storage settings.
- Read the embedded help articles for:
- Processing Extent > Extent
- Raster Analysis > Cell Size
- Raster Analysis > Mask
- Raster Storage > Pyramid (scroll down)
- Pyramids allow for the rapid display of large raster datasets at multiple scales. While this may prove useful for very large datasets, creating pyramids has two important drawbacks. First, because of its design, it will generalize data as the scale gets larger, which will reduce the visible accuracy of the displayed data. Second, because of this generalization, layouts created at large scales may not properly represent the actual data, and may appear coarser than it actually is.
- I recommend NOT creating pyramids unless working with a particular dataset significantly degrades the performance of ArcGIS. For this course, we will disable pyramid creation when we set the Spatial Analyst environment settings. To do this, go to Analysis tab, Geoprocessing group, Environments > Raster Storage (scroll down), and uncheck Build. Click OK to save this setting.
What is the default setting for analysis extent?
What is the cell size of the "default" raster we created? Why?
Raster Attribute Tables
You may notice that the option to open the attribute table of the "default" raster is grayed out. ArcGIS Pro only builds raster attribute tables if certain conditions are met. One of the conditions is that the values in the raster have to be integers. Since the values in our raster have decimals, it is not possible to view the attribute table.
- Within the Analysis tab, go to Tools > Toolboxes > Spatial Analyst Tools > Interpolation > IDW. Use the settings below to interpolate the carbon per square meter values. Save the output raster in your L6Data folder and name it "default." Click Run.
-
Interpolate Data – Set Extent
Now that we’ve explored the default settings, let’s see what happens if we alter just the extent settings. Unlike vector files, rasters will always have the shape of a perfect rectangle. The size and location of the rectangle is defined by its extent.
- Within the Analysis tab, Geoprocessing group go to Tools > Toolboxes > Spatial Analyst Tools > Interpolation > IDW.
- Name the output raster C:\GEOG487\L6Data\forest_extent.
- Notice the default cell size is currently listed as 0.879999994163401.
- There is an oddity within ArcGIS where it does not apply all of the global environment settings from the Analysis tab, Geoprocessing group > Environments to some tools within Geoprocessing Toolbox. We’ll need to set the extent settings using the Environments option within the IDW tool itself. Click on Environments > Processing Extent, choose "Same as Layer Forest_Boundary" as the extent.
- Notice how the output cell size changed to “1.17340837377682.” Make sure to review the embedded help topic to understand why this happened.
- To keep the output rasters consistent throughout the lesson, we need to manually override the cell size setting in Parameters. Copy and paste 0.879999994163401 into the cell size input and click Run.
Make sure you have the correct answer before moving on to the next step.
If your map does not match the example below, go back and redo the previous step.
- Change the symbology of the forest_extent raster as we did in Step 3b, except use light to dark blue for the color ramp.
- Compare the "forest_extent" raster to the "default" raster. You may need to rearrange the files in the Contents pane. Notice how the extent of the "forest_extent" raster matches that of the smallest rectangle that can contain the forest boundary polygon.
- Repeat Step 4, except use the "Parcel_Boundary" file as the extent. Make sure you use the same cell size as the default and forest-extent rasters. Name the output raster "parcel_extent."
- Change the symbology just as we did previously, except use an orange color scale. Compare the output with the parcel boundary. Save your map.
How do the extents of the "parcel_extent," "forest_extent" and "default" rasters compare?
-
Interpolate Data – Set Mask
Now, let’s see what happens if we alter the mask and extent settings. Even though all rasters are defined as perfect rectangles, you can still represent your data as a sinuous shape. The computer creates this illusion by assigning cells outside the sinuous shape values of "NoData." There is not a direct equivalent to this concept in vector files.
- Within the Analysis tab, Geoprocessing group go to Tools > Toolboxes > Spatial Analyst Tools > Interpolation > IDW.
- Change the output name to “for_msk_ext.”
- Click on Environments > Processing Extent > choose "Same as layer Forest_Boundary" as the extent.
- Within Raster Analysis > select Forest_Boundary as the Mask.
- Make sure the cell size is 0.879999994163401 under the Parameters. Click Run to run the tool.
- Change the symbology as before except use a purple color scale. Compare the output raster to the forest boundary. Your raster should now match the shape and size of the forest boundary polygon.
- What happened to the cells outside of the forest boundary? By default, ArcGIS displays raster values of NoData without a color. Change the color of NoData to black on the symbology tab and examine the results.
-
What would the output raster look like in the following scenario?
- Mask: forest boundary; Extent: parcel boundary
- Mask: parcel boundary; Extent: forest boundary
- Mask: "Plots_carbon" shapefile; Extent: forest boundary
-
Interpolate Data – Set Cell Size
In Step 3, we learned that the default cell size will depend on the input data. If you are using one or more rasters as inputs, the cell size will default to the coarsest raster resolution. If you are using a vector file, it will calculate the cell size based on the extent of the file to create 250 cells. The default for rasters seems appropriate since GIS best practices dictate that you should always go with the cell size of your coarsest input dataset. However, the default for vector files is quite arbitrary.
How do we choose a more meaningful cell size for our analysis? One rule of thumb is that you don’t want to "create" higher resolution data than what exists in your measured values. We know that the tree data was collected by measuring trees that fell within 10 m diameter circular plots. A cell size of 1 cm would not be appropriate, because we do not know how the data varies at that scale. A cell size of 1,000 m would be too large, since it is larger than our study area. For this project, we will use a cell size of 1 m, since our carbon values are in pounds per square meter.
- Within the Analysis tab, Geoprocessing group go to Tools > Toolboxes > Spatial Analyst Tools > Interpolation > IDW.
- Change the output name to "carbon1m."
- Click on Environments to Set the "Forest Boundary" as the mask and extent.
- Change the output cell size to 1. Click Run.
- Change the symbology as before, except use a green color scale. Compare the output to the "for_msk_ext" raster. At first glance, the output raster may not look very much different than the "for_msk_ext" raster, since they have the same mask, extent, and very similar cell size settings.
-
Right-click on the "carbon1m" raster in the Contents pane > Properties > Source. Browse through the available information. Notice the extent and cell size. Compare this information to the properties of the "for_msk_ext" raster as shown on the right."for_msk_ext" properties
"carbon1m" properties
- Interpret Results – Calculate Carbon for Entire Study Area
Now that we have an understanding of how the spatial analyst environment settings function, we can return to our original question. We want to figure out how much carbon the study forest sequesters. To accomplish this, we will use the "Zonal Statistics" tool in Spatial Analyst. This tool allows us to calculate statistics of the cell values of one raster (e.g., carbon1m) within zones specified by another file (e.g., forest boundary). We will use it to sum the carbon values in each cell to create a total for the entire forest.
- Within the Analysis tab, Geoprocessing group go to Tools > Toolboxes > Spatial Analyst Tools > Zonal > Zonal Statistics as Table. Use the settings below to find the total carbon for the forest. Name the output table "carbon1m_sum" in your L6 folder.
- After you click Run, the summary table will appear in the Contents pane. Right-click to Open the table. Notice the field "SUM." This value represents the total carbon in the forest. Close the table.
- Notice that this table can be joined to the "Forest_Boundary" layer since they share the field "Name". You may find it useful to join these tables together if you wish to visually map the zonal statistics.
ArcGIS may not show all the digits in a table by default. If your numbers do not match the numbers in the quiz, expand the columns in your table to display all the digits.
- One credit is earned for each metric ton (mT) of carbon sequestered. How many carbon credits does the study forest qualify for? Note that 1 metric ton = 2,204.6 lbs.
The monetary value of each carbon credit fluctuates based on the current market conditions. Check out the more information about the California’s cap and trade system at Center for Climate and Energy Solutions(C2ES).
One of the main take away points from this lesson is that Spatial Analyst is a modeling tool. Models don’t give exact final answers; rather they give you estimates of reasonable answers based on a set of assumptions.
Environments settings allow you to easily alter the underlying assumptions of your model (cell size, mask, extent) and then quickly recalculate your results.
Selecting environment settings in Spatial Analyst tools can be confusing and seem somewhat arbitrary. If you don’t know which Environments setting you should use for a particular scenario, you can try experimenting with a variety of options. This type of sensitivity analysis will help you understand how changing model assumptions affect your final results.
That’s it for the required portion of the Lesson 6 Step-by-Step Activity. Please consult the Lesson Checklist for instructions on what to do next.
Try This!
Try one or more of the activities listed below:
- In Lesson 6, we used the defaults for many of the input parameters of the Interpolation Tool such as "z value field," "power," and "search radius type." Alter some of these parameters to see how they affect your results.
- There are several other interpolation methods to choose from in addition to Inverse Distance Weighted, such as "Spline" and "Kriging." Explore some of the other options to see how they affect your results.
- Export the study boundary to a KML file using Toolboxes > Conversion Tools > KML > KML to Layer. Open the KML file in Google Earth, zoom to the study boundary, and explore the historical imagery for the study site.
Note: Try This! Activities are voluntary and are not graded, though I encourage you to complete the activity and share comments about your experience on the lesson discussion board.