Terrain 转 TIN (3D Analyst)

摘要

可将 terrain 数据集转换为不规则三角网 (TIN) 数据集。

用法

语法

TerrainToTin_3d (in_terrain, out_tin, {pyramid_level_resolution}, {max_nodes}, {clip_to_extent})
参数说明数据类型
in_terrain

The input terrain dataset.

Terrain Layer
out_tin

The output TIN dataset.

TIN
pyramid_level_resolution
(可选)

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
(可选)

输出 TIN 中允许的结点的最大数量。如果分析范围和金字塔等级会产生超出该大小的 TIN,则该工具将返回错误。默认值为 5 百万。

Long
clip_to_extent
(可选)

指定是否根据分析范围裁剪生成的 TIN。仅当定义了分析范围并且分析范围小于输入 terrain 范围时,该选项才有效。

  • CLIP根据分析范围裁剪输出 TIN。这是默认设置。
  • NO_CLIP不根据分析范围裁剪输出 TIN。
Boolean

代码示例

TerrainToTIN 示例 1(Python 窗口)

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 示例 2(独立脚本)

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

环境

相关主题

许可信息

ArcView: 需要 3D Analyst
ArcEditor: 需要 3D Analyst
ArcInfo: 需要 3D Analyst

7/10/2012