Cut Fill (Spatial Analyst)

License Level:BasicStandardAdvanced

Summary

Calculates the volume change between two surfaces. This is typically used for cut and fill operations.

Learn more about how Cut Fill works

Illustration

Cut Fill illustration
OutRas = CutFill(Before_Ras, After_Ras)
Cut Fill fields illustration
When the Cut Fill operation is performed, by default, a specialized renderer is applied to the layer that highlights the locations of cut and of fill. The determinant is in the attribute table of the output raster, which considers positive volume to be where material was cut (removed), and negative volume where material was filled (added).

Usage

Syntax

CutFill (in_before_surface, in_after_surface, {z_factor})
ParameterExplanationData Type
in_before_surface

The input representing the surface before the cut or fill operation.

Raster Layer
in_after_surface

The input representing the surface after the cut or fill operation.

Raster Layer
z_factor
(Optional)

Number of ground x,y units in one surface z unit.

The z-factor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface.

If the x,y units and z units are in the same units of measure, the z-factor is 1. This is the default.

If the x,y units and z units are in different units of measure, the z-factor must be set to the appropriate factor, or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a z-factor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).

Double

Return Value

NameExplanationData Type
out_raster

The output raster defining regions of cut and of fill.

The values show the locations and amounts where the surface has been added to or removed from.

Raster

Code Sample

CutFill example 1 (Python window)

This example calculates the volume and area of cut and fill locations and outputs the result as a Grid raster.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outCutFill = CutFill("elevation01", "elevation02", 1)
outCutFill.save("C:/sapyexamples/output/outcutfill01")
CutFill example 2 (stand-alone script)

This example calculates the volume and area of cut and fill locations and outputs the result as a Grid raster.

# Name: Cutfill_Ex_02.py
# Description: Calculates the volume and area of cut and 
#              fill locations.
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inBeforeRaster = "elevation01"
inAfterRaster =  "elevation02"
zFactor = 0.5

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute CutFill
outCutFill = CutFill(inBeforeRaster, inAfterRaster, zFactor)

# Save the output 
outCutFill.save("C:/sapyexamples/output/outcutfill02")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires Spatial Analyst or 3D Analyst
ArcGIS for Desktop Standard: Requires Spatial Analyst or 3D Analyst
ArcGIS for Desktop Advanced: Requires Spatial Analyst or 3D Analyst
11/8/2012