Terrain To TIN (3D Analyst)

License Level:BasicStandardAdvanced

Summary

Converts a terrain dataset to a triangulated irregular network (TIN) dataset.

Usage

Syntax

TerrainToTin_3d (in_terrain, out_tin, {pyramid_level_resolution}, {max_nodes}, {clip_to_extent})
ParameterExplanationData Type
in_terrain

The input terrain dataset.

Terrain Layer
out_tin

The output TIN dataset.

TIN
pyramid_level_resolution
(Optional)

The z-tolerance or window-size resolution of the terrain pyramid level that will be used by this tool. The default is 0, or full resolution.

Double
max_nodes
(Optional)

The maximum number of nodes permitted in the output TIN. The tool will return an error if the analysis extent and pyramid level would produce a TIN that exceeds this size. The default is 5 million.

Long
clip_to_extent
(Optional)

Specifies whether the resulting TIN will be clipped against the analysis extent. This only has an effect if the analysis extent is defined and it's smaller than the extent of the input terrain.

  • CLIPClips the output TIN against the analysis extent. This is the default.
  • NO_CLIPDoes not clip the output TIN against the analysis extent.
Boolean

Code Sample

TerrainToTIN example 1 (Python window)

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.TerrainToTin_3d("sample.gdb/featuredataset/terrain", "tin", 6, 5000000, False)
TerrainToTIN example 2 (stand-alone script)

The following sample demonstrates the use of this tool in a stand-alone Python script:

'''*********************************************************************
Name: TerrainToTin Example
Description: This script demonstrates how to use the 
             TerrainToTin 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
inTerrain = "sample.gdb/featuredataset/terrain"
pyrRes = 6
maxNodes = 5000000
clipExtent = False
# Ensure output name is unique
outTIN = arcpy.CreateUniqueName("tin")

#Execute TerrainToTin
arcpy.TerrainToTin_3d(inTerrain, outTIN, pyrRes, maxNodes, clipExtent)
    
del arcpy

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires 3D Analyst
ArcGIS for Desktop Standard: Requires 3D Analyst
ArcGIS for Desktop Advanced: Requires 3D Analyst
3/7/2014