创建 TIN (3D 分析)

摘要

创建 TIN 数据集。

用法

语法

CreateTIN_3d (out_tin, {spatial_reference}, {in_features}, {constrained_delaunay})
参数说明数据类型
out_tin

The output TIN dataset.

TIN
spatial_reference
(可选)

输出 TIN 的空间参考。

Coordinate System
in_features
[[in_feature_class, height_field, SF_type, tag_value],...]
(可选)

将引用添加到要在 TIN 中包含的一个或多个要素类中。对于每个要素类,您都需要设置相应的属性以指明如何使用该要素来定义表面。

in_feature_class:要将其要素导入 TIN 的要素类。

height_field:字段,为要素指定高程值的源。可以使用要素属性表中的任何数值字段。如果要素支持 Z 值,可通过选择 Shape.Z 选项读取要素几何。如果没有所需高度,则指定关键字 <无> 来创建 Z-less 要素,其高程可从表面进行内插。

SF_type:表面要素类型定义从要素导入的几何如何合并到表面的三角测量中。当三角化网格面转换为栅格时,具有硬或软标识的选项表示是否要素边表示坡度中或平缓变化中的明显中断。可用的关键字如下:

  • 离散多点将导入为结点的高程点。
  • 硬断线或软断线强制高度值的隔断线
  • 硬裁剪或软裁剪定义 TIN 边界的面数据集
  • 硬擦除或软擦除 在 TIN 外部部分中定义多个孔的面数据集
  • 硬替换或软替换定义高度恒定的区域的面数据集
  • 硬值填充或软值填充根据 tag_value 列中指定的整型字段定义三角形的标签值的面数据集。

tag_value:在表面要素类型设置为值填充选项时使用的来自要素类属性表的整型字段。标签填充用作三角形属性的基本形式,其边界在三角测量中强制为隔断线。默认选项设置为 <无>。

Value Table
constrained_delaunay
(可选)

Specifies the triangulation technique used along the breaklines of the TIN.

  • DELAUNAYThe TIN will use Delaunay conforming triangulation, which may densify each segment of the breaklines to produce multiple triangle edges. This is the default.
  • CONSTRAINED_DELAUNAYThe TIN will use constrained Delaunay triangulation, which will add each segment as a single edge. Delaunay triangulation rules are honored everywhere except along breaklines, which will not get densified.
Boolean

代码示例

CreateTIN 示例 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.CreateTin_3d("NewTIN", "Coordinate Systems/Projected Coordinate Systems/State Plane/NAD 1983 (Feet)/NAD 1983 StatePlane California II FIPS 0402 (Feet).prj", "points.shp Shape.Z masspoints", "constrained_delaunay")
CreateTIN 示例 2(独立脚本)

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

'''****************************************************************************
Name: Define Data Boundary of LAS File
Description: This script demonstrates how to delineate data boundaries of 
             LAS files with irregularly clustered points. It is intended for 
             use as a script tool with one input LAS file.
****************************************************************************'''
# Import system modules
import arcpy
import exceptions, sys, traceback

# Set local variables
inLas = arcpy.GetParameterAsText(0) #input LAS file
ptSpacing = arcpy.GetParameterAsText(1) # LAS point spacing
classCode = arcpy.GetParameterAsText(2) # List of integers
returnValue = arcpy.GetParameterAsText(3) # List of strings
outTin = arcpy.GetParameterAsText(4) # TIN created to delineate data area
outBoundary = arcpy.GetParameterAsText(5) # Polygon boundary file

try:
    arcpy.CheckOutExtension("3D")
    # Execute LASToMultipoint
    arcpy.AddMessage("Creating multipoint features from LAS...")
    lasMP = arcpy.CreateUniqueName('lasMultipoint', 'in_memory')
    arcpy.ddd.LASToMultipoint(inLas, LasMP, ptSpacing, class_code, 
                             "ANY_RETURNS", "", sr, inFormat, zfactor)
    # Execute CreateTin
    arcpy.AddMessage("Creating TIN dataset...")
    arcpy.ddd.CreateTin(outTin, sr, "{0} Shape.Z masspoints"\
                       .format(lasMP), "Delaunay")
    # Execute CopyTin
    arcpy.AddMessage("Copying TIN to delineate data boundary...")
    arcpy.ddd.CopyTin(outTin, "{0}_copy".format(outTin))
    # Execute DelineateTinDataArea
    arcpy.AddMessage("Delineating TIN boundary...")
    maxEdge = ptSpacing * 4
    arcpy.ddd.DelineateTinDataArea(outTin, maxEdge, "PERIMETER_ONLY")
    # Execute TinDomain
    arcpy.AddMessage("Exporting data area to polygon boundary...")
    arcpy.ddd.TinDomain(outTin, outBoundary, "POLYGON")
    arcpy.AddMessage("Finished")
    arcpy.CheckInExtension("3D")
        
except arcpy.ExecuteError:
    print arcpy.GetMessages()
except:
    # Get the traceback object
    tb = sys.exc_info()[2]
    tbinfo = traceback.format_tb(tb)[0]
    # Concatenate error information into message string
    pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\
          .format(tbinfo, str(sys.exc_info()[1]))
    msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2))
    # Return python error messages for script tool or Python Window
    arcpy.AddError(pymsg)
    arcpy.AddError(msgs)

环境

相关主题

许可信息

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

7/10/2012