ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Terrain To TIN

Available with 3D Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

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

Usage

  • Define the extent of the output TIN using the geoprocessing extent environment setting.

  • Use an extent and pyramid level that will not exceed the node limit for a TIN. While the maximum number of TIN nodes in a 32-bit Windows platform is estimated to be between 15 to 20 million, a cap of a few million is recommended to maintain optimal display performance. Triangulation of a larger surface is best handled by the terrain dataset.

Syntax

arcpy.ddd.TerrainToTin(in_terrain, out_tin, {pyramid_level_resolution}, {max_nodes}, {clip_to_extent})
ParameterExplanationData Type
in_terrain

The terrain dataset to process.

Terrain Layer
out_tin

The TIN dataset that will be generated.

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.

  • CLIP —Clips the output TIN against the analysis extent. This is the default.
  • NO_CLIP —Does 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

  • Current Workspace
  • Scratch Workspace
  • Extent
  • Output Coordinate System
  • Geographic Transformations
  • Version
  • Terrain Memory Usage

Licensing information

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

Related topics

  • An overview of the Conversion toolset
  • Fundamentals of geoprocessing with the ArcGIS 3D Analyst extension
  • Surface formats

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal