arcpy.3d.CreateTin(out_tin, {spatial_reference}, {in_features}, {constrained_delaunay})
|
名称
|
说明
|
数据类型
|
|
out_tin
|
将要生成的 TIN 数据集。
|
TIN
|
|
spatial_reference
(可选)
|
输出 TIN 的空间参考。 将空间参考设置为投影坐标系。 不建议使用地理坐标系,因为当以角度单位表示 x,y 坐标时无法确保 Delaunay 三角测量,这可能会对基于距离的计算(如坡度、体积和视线)的准确性产生负面影响。
|
Coordinate System
|
|
in_features
[[in_features, height_field, SF_type, tag_value],...]
(可选)
|
输入要素以及定义如何将其添加到 TIN 的相关属性。
值表列:
Input Features—The feature whose geometry will be imported to the TIN.
Height Field—The source of elevation for the input features. Any numeric field from the input feature's attribute table can be specified, along with Shape.Z for the z-values of 3D features and Shape.M for the m-values stored with the geometry. Choosing the <None> keyword will result in the feature's elevation being interpolated from the surrounding surface.
Type—The input feature's role in defining the TIN surface. The available options depend on the geometry of the input features. For line- and polygon-based surface feature types, the hard and soft designations for the surface feature type impact the way the line or polygon boundary is handled when interpolating a raster surface from the TIN dataset when using natural neighbor interpolation. A hard surface feature type represents a border with a sharp discontinuity in elevation, such as the edge of a cliff, a wall, or a curb on the side of the road. A soft surface feature type represents a border where the elevation is more smoothly defined.
Mass_Points—Elevation measurements will be incorporated as TIN nodes.
Hard_Line—Breakline features will define linear discontinuities in the TIN.
Soft_Line—Breakline features will define linear discontinuities in the TIN.
Hard_Clip—Polygon features will define the data area of the TIN surface.
Soft_Clip—Polygon features will define the data area of the TIN surface.
Hard_Erase—Polygon features will define interior voids in the data.
Soft_Erase—Polygon features will define interior voids in the data.
Hard_Replace—Polygon features will define areas of constant height.
Soft_Replace—Polygon features will define areas of constant height.
Hardvalue_Fill—Integer attributes will be assigned to nodes and triangle faces.
Softvalue_Fill—Integer attributes will be assigned to nodes and triangle faces.
Tag Field—A numeric attribute will be assigned to the TIN's data elements using values obtained from an integer field in the input feature's attribute table.
|
Value Table
|
|
constrained_delaunay
(可选)
|
指定将与 TIN 隔断线一同使用的三角测量技术。
CONSTRAINED_DELAUNAY—The 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 be densified.
DELAUNAY—The TIN will use Delaunay conforming triangulation, which may densify each segment of the breaklines to produce multiple triangle edges. This is the default.
|
Boolean
|
代码示例
CreateTin 示例 1(Python 窗口)
下面的示例演示了如何在 Python 窗口中使用此工具:
arcpy.env.workspace = "C:/data"
arcpy.ddd.CreateTin("NewTIN", "NAD 1983 StatePlane California II FIPS 0402 (Feet).prj",
"points.shp Shape.Z masspoints", "constrained_delaunay")
下面的示例演示了如何在独立 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)