Cut Fill (3D Analyst)

Available with Spatial Analyst license.

Available with 3D Analyst license.

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
CutFill_3d (Before_Ras, After_Ras, OutRas)
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

  • The Cut Fill tool enables you to create a map based on two input surfaces—before and after—displaying the areas and volumes of surface materials that have been modified by the removal or addition of surface material.

  • Both the input raster surfaces must be coincident. That is, they must have a common origin, the same number of rows and columns of cells, and the same cell size.

  • For accurate results, the z-units should be the same as the x,y ground units. This ensures that the resulting volumes are meaningful cubic measures (for example, cubic meters). If they are not the same, use a z-factor to convert z units to x,y units. For example, if your x,y units are meters and your z units are feet, you could specify a z-factor of 0.3048 to convert feet to meters.

    Alternatively, use the Times math tool to create a surface raster in which the z-values have been adjusted to correspond to the ground units.

  • The attribute table of the output raster presents the changes in the surface volumes following the cut/fill operation. Positive values for the volume difference indicate regions of the before raster surface that have been cut (material removed). Negative values indicate areas that have been filled (material added). See How Cut Fill works for more details on how the results are calculated.

  • When the cut/fill operation is performed from the tool, by default a specialized renderer is applied that highlights the locations of cut and of fill. The renderer draws areas that have been cut in blue, and areas that have been filled in red. Areas that have not changed are displayed in grey.

  • When the input raster needs to be resampled, the bilinear technique will be used. An example of when an input raster may be resampled is when the output coordinate system, extent, or cell size is different from that of the input.

Syntax

CutFill(in_before_surface, in_after_surface, out_raster, {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
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 Dataset
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

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
env.workspace = "C:/data"
arcpy.CutFill_3d("elevation01", "elevation02", "c:/output/outcutfill01", 1)
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_3d_Ex_02.py
# Description: Calculates the volume and area of cut and 
#              fill locations.
# Requirements: 3D Analyst Extension

# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
inBeforeRaster = "elevation01"
inAfterRaster =  "elevation02"
outRaster = "C:/output/outcutfill02"
zFactor = 0.5

# Execute CutFill
arcpy.CutFill_3d(inBeforeRaster, inAfterRaster, outRaster, zFactor)

Licensing information

  • Basic: Requires 3D Analyst or Spatial Analyst
  • Standard: Requires 3D Analyst or Spatial Analyst
  • Advanced: Requires 3D Analyst or Spatial Analyst

Related topics