Surface Difference (3D Analyst)
Summary
Calculates the volumetric difference between two surface models stored as either a triangulated irregular networks (TIN) or terrain dataset.
Usage
- The output will only represent the portions of overlapping extent from the input surfaces.
The triangles from the first surface are classified as either completely above, below, or intersecting the second (reference) surface.
- An output raster or one or more TIN datasets can optionally be generated to display the result.
When an output difference raster is requested, the tool converts the integrated difference TIN that's been calculated during the geometric comparison to the raster using linear interpolation.
- It's best if the horizontal and vertical coordinate systems of the input surfaces are the same.
Syntax
Parameter | Explanation | Data Type |
in_surface |
The input terrain or TIN dataset. | Terrain Layer; TIN Layer |
in_reference_surface |
The reference terrain or TIN dataset. | Terrain Layer; TIN Layer |
out_feature_class |
The output feature class containing contiguous triangles and triangle parts that have the same classification grouped into polygons. The volume enclosed by each region of difference is listed in the attribute table. | Feature Class |
pyramid_level_resolution (Optional) |
The pyramid-level resolution of the input terrain dataset. The default is 0, or full resolution. | Double |
reference_pyramid_level_resolution (Optional) |
The pyramid-level resolution of the reference terrain dataset. The default is 0, or full resolution. | Double |
raster_cell_size (Optional) |
The cell size of the output raster dataset. | Double |
out_raster (Optional) |
The output difference raster dataset. The raster will be converted from the integrated difference TIN using a linear interpolation method. | Raster Dataset |
out_tin_folder (Optional) |
The folder location to write the TIN or TINs. | Folder |
out_tin_basename (Optional) |
The base name given to each output TIN surface. If one TIN dataset is not sufficient to represent the data, multiple TINs will be created with the same base name. | String |
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.SurfaceDifference_3d("sample.gdb/featuredataset/terrain", "sample.gdb/featuredataset/terrain2", "surface_diff.shp")
The following sample demonstrates the use of this tool in a stand-alone Python script:
'''****************************************************************************
Name: SurfaceDifference Example
Description: This script demonstrates how to use the
SurfaceDifference tool.
****************************************************************************'''
# Import system modules
import arcpy
from arcpy import env
# Obtain a license for the ArcGIS 3D Analyst extension
arcpy.CheckOutExtension("3D")
# Set environment settings
env.workspace = "C:/data"
# Set Local Variables
inSurface = "flood_tin"
inReference = "elev_tin"
# Ensure output name is unique
outPoly = arcpy.CreateUniqueName("difference.shp")
#Execute SurfaceDifference
arcpy.SurfaceDifference_3d(inSurface, inReference, outPoly)
del arcpy, inSurface, inReference, outPoly