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
|
コードのサンプル
CopyTin の例 1 (Python ウィンドウ)
次のサンプルは、Python ウィンドウでこのツールを使用する方法を示しています:
arcpy.env.workspace = "C:/data"
arcpy.ddd.CopyTin("elevation", "elevation_copy", "CURRENT")
CopyTin の例 2 (スタンドアロン スクリプト)
次のサンプルは、スタンドアロン 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)