arcpy.3d.AppendTerrainPoints(in_terrain, terrain_feature_class, in_point_features, {polygon_features_or_extent})
|
名前
|
説明
|
データ タイプ
|
|
in_terrain
|
処理対象のテレイン データセット。
|
Terrain Layer
|
|
terrain_feature_class
|
ポイントまたはマルチポイントの追加先となるテレイン データセットで使用されるフィーチャクラスです。
このパラメーターには、フィーチャクラスの名前のみが必要で、絶対パスは不要です。
|
String
|
|
in_point_features
|
テレイン データセットの追加データ ソースとして追加するポイントまたはマルチポイントのフィーチャクラスです。
|
Feature Layer
|
|
polygon_features_or_extent
(オプション)
|
ポイント フィーチャが追加されるエリアを定義するポリゴン フィーチャクラスまたは arcpy.Extent オブジェクトを指定します。 このパラメーターは、デフォルトでは空になっており、入力フィーチャクラスからすべてのポイントがテレイン フィーチャに読み込まれます。
|
Extent; Feature Layer
|
派生した出力
|
名前
|
説明
|
データ タイプ
|
|
derived_out_terrain
|
更新されたテレイン。
|
Terrain Layer
|
コードのサンプル
AppendTerrainPoints の例 1 (Python ウィンドウ)
次のサンプルは、Python ウィンドウでこのツールを使用する方法を示しています:
arcpy.env.workspace = 'C:/data'
arcpy.ddd.AppendTerrainPoints('sample.gdb/featuredataset/terrain',
'existing_points', 'new_points.shp')
AppendTerrainPoints の例 2 (スタンドアロン スクリプト)
次のサンプルは、スタンドアロン Python スクリプトでこのツールを使用する方法を示しています:
'''****************************************************************************
Name: Update Terrain
Description: This script demonstrates how to update a terrain dataset
with new elevation measurements obtained from Lidar by
importing LAS files to multipoint features, then appending the
new points to another multipoint feature that participates in a
terrain. The terrain's pyramids are modified to optimize its
draw speed.
****************************************************************************'''
# Import system modules
import arcpy
try:
# Set environment settings
arcpy.env.workspace = "C:/data"
# Set Variables
inTerrain = "sample.gdb/featuredataset/terrain"
currentPts = "existing_points"
lasFiles = ['las/NE_Philly.las',
'las/NW_Philly.las']
newPts = 'in_memory/update_pts'
# Define spatial reference of LAS files using factory code
# for NAD_1983_StatePlane_Pennsylvania_South
lasSR = arcpy.SpatialReference(2272)
arcpy.AddMessage("Converting LAS files to multipoint features...")
arcpy.ddd.LASToMultipoint(lasFiles, newPts, 1.5, 2, 1,
'INTENSITY', lasSR)
arcpy.AddMessage("Appending LAS points to {0}..."\
.format(currentPts))
arcpy.ddd.AppendTerrainPoints(inTerrain, currentPts, newPts)
arcpy.AddMessage("Changing terrain pyramid reference scales...")
arcpy.ddd.ChangeTerrainReferenceScale(inTerrain, 1000, 500)
arcpy.ddd.ChangeTerrainReferenceScale(inTerrain, 2500, 2000)
arcpy.AddMessage("Adding terrain pyramid level...")
arcpy.ddd.AddTerrainPyramidLevel(inTerrain, "", "4 4500")
arcpy.AddMessage("Changing pyramid resolution bounds for breaklines...")
arcpy.ddd.ChangeTerrainResolutionBounds(inTerrain, "breaklines", 5, 4)
arcpy.AddMessage("Building terrain...")
arcpy.ddd.BuildTerrain(inTerrain)
arcpy.AddMessage("Completed updates.")
except arcpy.ExecuteError:
print(arcpy.GetMessages())
except Exception as err:
print(err)