Surface Volume (3D Analyst)
Summary
Calculates the area and volume of a raster, triangulated irregular network (TIN), or terrain dataset surface above or below a given reference plane.
Illustration
Usage
-
Consider using the Polygon Volume tool to determine the volume of a specified portion of a TIN or terrain dataset surface.
-
Using a Z Factor is essential for correcting volume calculations when the surface z-units are expressed in a different unit of measure than the ground units. Using a Z Factor does not modify the original data.
A raster DEM is comprised of regularly spaced points and not cells such as an image. The area calculation reported by the Surface Volume tool is based on the extent of the regularly spaced points of the DEM and not the extent of the cells. Because this calculation is based on points, not cells, the data area for the raster DEM is decreased by half a cell relative to the data area displayed as a raster image.
Syntax
Parameter | Explanation | Data Type |
in_surface |
The input raster, TIN, or terrain dataset surface used for calculating area and volume. | Raster Layer; Terrain Layer; TIN Layer |
out_text_file (Optional) |
The optional output text file containing the results. | File |
reference_plane (Optional) |
Choose whether to calculate above or below a given height.
| String |
base_z (Optional) |
The elevation of the plane that will be used to calculate area and volume. | Double |
z_factor (Optional) |
The factor by which the heights of the input surface will be multiplied to calculate surface volume; used for converting Z-units to match XY units. | Double |
pyramid_level_resolution (Optional) |
The resolution of the terrain dataset pyramid level to use for geoprocessing. The default is 0, or full resolution. | Double |
Code Sample
The following sample demonstrates the use of this tool in the Python window:
import arcpy from arcpy import env arcpy.CheckOutExtension("3D") env.workspace = "C:/data" arcpy.SurfaceVolume_3d("sample.gdb/featuredataset/terrain", "surf_vol.txt", "ABOVE", 300, 1, 5)
The following sample demonstrates the use of this tool in a stand-alone Python script:
'''**************************************************************************** Name: Surface Volume Example Description: This script demonstrates how to use the Surface Volume tool. ****************************************************************************''' # Import system modules import arcpy from arcpy import env import exceptions, sys, traceback try: # Obtain a license for the ArcGIS 3D Analyst extension arcpy.CheckOutExtension("3D") # Set environment settings env.workspace = "C:/data" # Set Local Variables inSurface = "elevation_tin" #Execute SurfaceVolume result = arcpy.SurfaceVolume_3d(inSurface, "", "ABOVE", "300", "1", "5") print result.GetMessage(0) except arcpy.ExecuteError: print arcpy.GetMessages() except: # Get the traceback object tb = sys.exc_info()[2] tbinfo = traceback.format_tb(tb)[0] # Concatenate error information into message string pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\ .format(tbinfo, str(sys.exc_info()[1])) msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2)) # Return python error messages for script tool or Python Window arcpy.AddError(pymsg) arcpy.AddError(msgs)