ASCII 3D → フィーチャクラス(ASCII 3D to Feature Class) (3D Analyst)

サマリ

XYZ、XYZI、または GENERATE 形式で保存された 1 つ以上の ASCII ファイルから新しいフィーチャクラスへ 3D フィーチャをインポートします。

[ASCII 3D → フィーチャクラス(ASCII 3D to Feature Class)](3D Analyst)の仕組みに関する詳細

ASCII 3D To Feature Class example

使用法

構文

ASCII3DToFeatureClass_3d (input, in_file_type, out_feature_class, out_geometry_type, {z_factor}, {input_coordinate_system}, {average_point_spacing}, {file_suffix}, {decimal_separator})
パラメータ説明データ タイプ
input
<input; input...>

ASCII XYZ、XYZI(LIDAR 強度付き)、または 3-D GENERATE 形式のデータが格納された ASCII ファイルまたはフォルダです。フォルダを指定すると、[ファイル接尾辞] パラメータの指定が求められ、そこで指定した接尾辞と同じ拡張子を持つすべてのファイルが使用されます。ファイルが複数ある場合は、すべて同じ形式である必要があります。

Folder; File
in_file_type
String
out_feature_class

The output feature class.

Feature Class
out_geometry_type

出力フィーチャクラスのジオメトリ タイプです。

  • MULTIPOINT - ポイントが入力される場合のみ有効です。ポイントごとに属性を追加しない場合、特に何千または何百万というポイントが含まれる場合には、マルチポイントをお勧めします。これがデフォルトです。
  • POINT - ポイントが入力される場合のみ有効です。
  • POLYLINES - ポリラインまたはポリゴンが入力される場合のみ有効です。ポリゴンを入力すると、POLYLINES を出力として使用できます。
  • POLYGONS - ポリゴンが入力される場合のみ有効です。
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
input_coordinate_system
(オプション)

入力データの座標系です。デフォルトは [不明な座標系] です。指定した場合、出力は別の座標系に投影されることも、されないこともあります。これは、ジオプロセシング環境でターゲット フィーチャクラスの位置に対して座標系が定義されているかどうかに左右されます。

Coordinate System
average_point_spacing
(オプション)

入力ポイント間の平均平面距離です。このパラメータは、出力ジオメトリを MULTIPOINT に設定した場合のみ使用できます。その機能は、ポイントをグループ化することです。この値は、シェープの制限ごとのポイントと組み合わせて、ポイントをグループ化するときに使用される仮想タイル システムの作成時に使用されます。タイル システムの原点は、ターゲット フィーチャクラスのドメインに基づきます。ターゲット フィーチャクラスの横方向の単位で間隔を指定します。

Double
file_suffix
(オプション)

The suffix of the files to import from an input folder. This parameter is required when a folder is specified as input.

String
decimal_separator
(オプション)

The decimal character used in the text file to differentiate the integer of a number from its fractional part.

  • DECIMAL_POINTA point is used as the decimal character. This is the default.
  • DECIMAL_COMMAA comma is used as the decimal character.
String

コードのサンプル

ASCII3DToFeatureClass(ASCII 3D → フィーチャクラス)の例 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.Ascii3DToFeatureClass_3d("masspnts.txt", "GENERATE", "masspnts.shp", "POINT", 1, "Coordinate Systems/Projected Coordinate Systems/State Plane/NAD 1983 (Feet)/NAD 1983 StatePlane Massachusetts Mainland FIPS 2001 (Feet).prj")
ASCII3DToFeatureClass(ASCII 3D → フィーチャクラス)の例 2(スタンドアロン スクリプト)

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

'''****************************************************************************
Name: ASCII3D_to_Feature_Class Example
Description: This script demonstrates how to use the 
             ASCII3D_to_Feature_Class tool to create a point feature class
             from a set of text files in the specified workspace.
****************************************************************************'''
# Import system modules`
import arcpy
from arcpy import env
import exceptions, sys, traceback

try:
    # Obtain a license for the ArcGIS 3D Analyst extension
    arcpy.CheckOutExtension("3D")
    # Set environment settings
    env.workspace = "C:/data"
    # Set Local Variables
    inFormat = "GENERATE"
    # Name of the output file
    outFC = "Pts_from_ASCII.shp"
    # Geometry of the output feature class
    outType = "POINT"
    zFactor = 1
    # Coordinate system of the output feature class
    CS = "Coordinate Systems/Geographic Coordinate Systems/World/WGS 1984.prj"
    fileSuffix = "ascii.txt" 
    decSep = "DECIMAL_POINT" # Specifies the decimal delimeter
    # Create list of ASCII files
    txtList = arcpy.ListFiles("*" + fileSuffix)
    # Verify the presence of TINs in the list
    if len(txtList) > 0:
        # Execute ASCII3D_to_Feature_Class
        arcpy.ASCII3DToFeatureClass_3d(txtList, inFormat, outFC, outType, 
                                     zFactor, CS, fileSuffix, decSep)

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