TIN 三角ポリゴン(TIN Triangle) (3D Analyst)

サマリ

TIN(triangulated irregular network)データセットからポリゴン フィーチャクラスに三角形のフェイスをエクスポートし、傾斜角、傾斜方向、およびオプションで陰影起伏の属性と各三角形のタグ値を提供します。

TIN Triangle illustration

使用法

構文

TinTriangle_3d (in_tin, out_feature_class, {units}, {z_factor}, {hillshade}, {tag_field})
パラメータ説明データ タイプ
in_tin

The input TIN.

TIN Layer
out_feature_class

The output feature class.

Feature Class
units
(オプション)

The units of measure to be used in calculating slope.

  • PERCENTSlope is expressed as a percentage value. This is the default.
  • DEGREESlope is expressed as the angle of inclination from a horizontal plane.
String
z_factor
(オプション)

The factor by which elevation values will be multiplied. This is typically used to convert Z linear units that match those of the XY linear units. The default is 1, which leaves elevation values unchanged.

Double
hillshade
HILLSHADE <azimuth>, <angle>
(オプション)

陰影起伏効果をフィーチャ レイヤ出力に適用する場合、光源の方位角と高度角を指定します。方位角の範囲は 0 ~ 360 度で、高度角の範囲は 0 ~ 90 度です。方位角 45 度、高度角 30 度の場合、「HILLSHADE 45, 30」と入力します。

String
tag_field
(オプション)

三角形のタグ値を格納する出力フィーチャのフィールド名。このパラメータは、デフォルトでは空です。デフォルトでは、タグ値は出力に書き込まれません。

String

コードのサンプル

TinTriangle(TIN 三角ポリゴン)の例 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.TinTriangle_3d("tin", "tin_triangle.shp", "DEGREE", 1,"HILLSHADE 310,45", "tag")
TinTriangle(TIN 三角ポリゴン)の例 2(スタンドアロン スクリプト)

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

'''****************************************************************************
Name: TinTriangle Example
Description: This script demonstrates how to use the 
             TinTriangle tool to extract triangles from each TIN in the 
             target workspace.
****************************************************************************'''
# Import system modules
import arcpy
from arcpy import env
import exceptions, sys, traceback

try:
    arcpy.CheckOutExtension("3D")
    # Set environment settings
    env.workspace = "C:/data" # the target workspace
    # Create list of TINs
    TINList = arcpy.ListDatasets("*", "Tin")
    # Verify the presence of TINs in the list
    if TINList:
        for dataset in TINList:
            # Set Local Variables
            TINList = arcpy.ListDatasets("*", "Tin")
            slopeUnits = "PERCENT"
            zfactor = 1
            hillshade = "HILLSHADE 300, 45" # defines hillshade azimuth & angle
            tagField = "Tag"
            Output = dataset + "_triangles.shp" # name of the output file
            #Execute TinTriangle
            arcpy.ddd.TinTriangle(dataset, Output, slopeUnits, zfactor,
                                  hillshade, tagField)
            print "Finished."
    else:
        print "There are no TIN(s) in the " + env.workspace + " directory."
    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