arcpy.3d.CopyTin(in_tin, out_tin, {version})
|
名称
|
说明
|
数据类型
|
|
in_tin
|
将要复制的 TIN。
|
TIN Layer
|
|
out_tin
|
将要生成的 TIN 数据集。
|
TIN
|
|
version
(可选)
|
输出 TIN 的版本。
CURRENT—The current TIN version, which supports constrained Delaunay triangulation, enhanced spatial reference information, and storage of node source and edge tag values. The resulting TIN will not be backward compatible with versions of ArcGIS prior to 10.0. This is the default.
PRE_10.0—The TIN will be backward compatible with versions of ArcGIS prior to 10.0, which only supports conforming Delaunay triangulation.
|
String
|
代码示例
下面的示例演示了如何在 Python 窗口中使用此工具:
arcpy.env.workspace = "C:/data"
arcpy.ddd.CopyTin("elevation", "elevation_copy", "CURRENT")
下面的示例演示了如何在独立 Python 脚本中使用此工具:
'''****************************************************************************
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
# 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:
# Run LASToMultipoint
lasMP = arcpy.CreateUniqueName('lasMultipoint', 'in_memory')
arcpy.ddd.LASToMultipoint(inLas, LasMP, ptSpacing, class_code,
"ANY_RETURNS", "", sr, inFormat, zfactor)
# Run CreateTin
arcpy.ddd.CreateTin(outTin, sr, "{0} Shape.Z masspoints"\
.format(lasMP), "Delaunay")
# Run CopyTin
arcpy.ddd.CopyTin(outTin, "{0}_copy".format(outTin))
# Run DelineateTinDataArea
maxEdge = ptSpacing * 4
arcpy.ddd.DelineateTinDataArea(outTin, maxEdge, "PERIMETER_ONLY")
# Run TinDomain
arcpy.ddd.TinDomain(outTin, outBoundary, "POLYGON")
except arcpy.ExecuteError:
print(arcpy.GetMessages())
except Exception as err:
print(err)