需要 3D Analyst 许可。
描述
将栅格转换为不规则三角网 (TIN) 数据集。
插图

使用方法
- 就其本身而言,将栅格转换为 TIN 并不会生成更好的表面。您需要与表面定义兼容且能够改善表面定义的辅助数据。可以使用编辑 TIN 工具将此类数据添加到 TIN。 
- 默认情况下,输入栅格与输出 TIN 之间所允许的最大高度差为输入栅格 z 范围的 1/10。 
- 虽然在 Win32 下可用的 TIN 的最大大小在 1500 万个结点到 2000 万个结点之间,但仍建议将此大小限制为几百万。大型输入栅格和小 z 容差设置可能会超出这个范围。如果大小成为了问题,则应考虑处理子集。 
语法
arcpy.ddd.RasterTin(in_raster, out_tin, {z_tolerance}, {max_points}, {z_factor})| 参数 | 说明 | 数据类型 | 
| in_raster | 待处理的栅格。 | Raster Layer; Mosaic Layer | 
| out_tin | 将要生成的 TIN 数据集。 | TIN | 
| z_tolerance (可选) | 输入栅格与输出 TIN 之间所允许的最大高度差(z 单位)。默认情况下,z 容差是输入栅格 z 范围的 1/10。 | Double | 
| max_points (可选) | 将在处理过程终止前添加到 TIN 的最大点数。默认情况下,该过程将一直持续到所有点被添加完。 | Long | 
| z_factor (可选) | 在生成的 TIN 数据集中与栅格的高度值相乘的因子。此值通常用于转换 Z 单位来匹配 XY 单位。 | Double | 
代码示例
RasterTin 示例 1(Python 窗口)
下面的示例演示了如何在 Python 窗口中使用此工具。
import arcpy
from arcpy import env
arcpy.CheckOutExtension("3D")
env.workspace = "C:/data"
arcpy.RasterTin_3d("vermont_ele.tif", "C:/output/TIN_VT", "2", "1000", "1")
RasterTin 示例 2(独立脚本)
下面的示例演示了如何在独立 Python 脚本中使用此工具。
'''*********************************************************************
Name: RasterTin Example
Description: This script demonstrates how to use the 
             RasterTin tool to create a TIN for each IMG raster in the 
             target workspace.
**********************************************************************'''
# 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"
try:
    # Create the list of IMG rasters
    rasterList = arcpy.ListRasters("*", "IMG")
    # Loop the process for each raster
    if rasterList:
        for raster in rasterList:
            # Set Local Variables
            zTol = 2
            maxPts = 1500000
            zFactor = 1
            # [:-4] strips the last 4 characters (.img) from the raster name
            outTin = "C:/Output/TIN_" + raster[:-4] 
            print "Creating TIN from " + raster + "."
            #Execute RasterTin
            arcpy.RasterTin_3d(raster, outTIN, zTol, maxPts, zFactor)
        print "Finished."
    else:
        "There are no IMG rasters in the " + env.workspace + " directory."
except Exception as e:
    # Returns any other error messages
    print e.message
环境
许可信息
- Basic: 需要 3D Analyst
- Standard: 需要 3D Analyst
- Advanced: 需要 3D Analyst