ASCII 3D → フィーチャクラス(ASCII 3D to Feature Class) (3D Analyst)
サマリ
XYZ、XYZI、または GENERATE 形式で保存された 1 つ以上の ASCII ファイルから新しいフィーチャクラスへ 3D フィーチャをインポートします。
[ASCII 3D → フィーチャクラス(ASCII 3D to Feature Class)](3D Analyst)の仕組みに関する詳細
図

使用法
-
入力ファイルが複数の場合、このツールを使用する前に、すべてのファイルが同じ形式で、同じジオメトリ タイプを持つことを確認します。
GENERATE 形式のポリゴンは、時計回りで自己交差していないポリゴンで、閉じている(最後の頂点が 1 番目の頂点に等しい)必要があります。これらの条件のいずれかを満たしていない場合、出力ポリゴンは無効になります。[ジオメトリのチェック(Check Geometry)] ツールを使用して、作成されたフィーチャの整合性をチェックできます。また、[ジオメトリの修正(Repair Geometry)] ツールを使用して、エラーの修正ができます。
構文
| パラメータ | 説明 | データ タイプ |
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 |
出力フィーチャクラスのジオメトリ タイプです。
| 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.
| String |
コードのサンプル
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")
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)