TIN 面标签 (3D Analyst)

摘要

使用不规则三角网 (TIN) 数据集中的标签值创建面要素。

插图

TIN Polygon Tag illustration

使用情况

  • 可以使用面要素类中的整型字段指定标签值,方法是:将面作为 valuefill 表面类型加载到 TIN 中。

  • 对于未明确定义标签的三角形,其值将被指定为默认值 0。

  • 所有具有相同标签值的相邻三角形都将存储在单个面要素中。

  • 标签值将被表示为输出要素类中的属性。

参数

标注说明数据类型
输入 TIN

待处理的 TIN 数据集。

TIN Layer
输出要素类

将生成的要素类。

Feature Class
标签值字段
(可选)

将标签属性存储在输出要素类中的字段的名称。默认字段名称为 Tag_Value.

String

arcpy.ddd.TinPolygonTag(in_tin, out_feature_class, {tag_field})
名称说明数据类型
in_tin

待处理的 TIN 数据集。

TIN Layer
out_feature_class

将生成的要素类。

Feature Class
tag_field
(可选)

将标签属性存储在输出要素类中的字段的名称。默认字段名称为 Tag_Value.

String

代码示例

TinPolygonTag 示例 1(Python 窗口)

下面的示例演示了如何在 Python 窗口中使用此工具。

arcpy.env.workspace = "C:/data"
arcpy.TinPolygonTag_3d("tin", "tin_polytag.shp", tag_field="LanduseCode")
TinPolygonTag 示例 2(独立脚本)

下面的示例演示了如何在独立 Python 脚本中使用此工具。

'''****************************************************************************
Name: TinPolygonTag Example
Description: This script demonstrates use of the 
             TinPolygonTag tool to extract tag information 
             from each TIN in the target workspace.
****************************************************************************'''
# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/data"

# Set Local Variables
TagField = "Code"

# Create list of TINs
TINList = arcpy.ListDatasets("*", "Tin")

# Verify the presence of TINs in the list
if TINList:
    # Iterate through the list of TINs
    for dataset in TINList:
        # Define the name of the output file
        Output = dataset + "_domain.shp"
        # Execute TinPolygonTag
        arcpy.TinPolygonTag_3d(dataset, Output, TagFieldField)
    print("Finished.")
else:
    print("No TIN files reside in {0}".format(env.workspace))

许可信息

  • Basic: 需要 3D Analyst
  • Standard: 需要 3D Analyst
  • Advanced: 需要 3D Analyst

相关主题