Label | Explanation | Data Type |
Input before raster surface | The input representing the surface before the cut or fill operation. | Raster Layer |
Input after raster surface | The input representing the surface after the cut or fill operation. | Raster Layer |
Output 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) | The 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 the z-units are feet and the x,y units are meters, use a z-factor of 0.3048 to convert the z-units from feet to meters (1 foot = 0.3048 meter). | Double |
Summary
Calculates the volume change between two surfaces. This is typically used for cut and fill operations.
Illustration
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.
Parameters
arcpy.ddd.CutFill(in_before_surface, in_after_surface, out_raster, {z_factor})
Name | Explanation | Data 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) | The 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 the z-units are feet and the x,y units are meters, use a z-factor of 0.3048 to convert the z-units from feet to meters (1 foot = 0.3048 meter). | Double |
Code sample
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)
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.ddd.CutFill(inBeforeRaster, inAfterRaster, outRaster, zFactor)