更改 Terrain 参考比例 (3D Analyst)

需要 3D Analyst 许可。

摘要

更改与 terrain 金字塔等级相关联的参考比例。

使用情况

  • 如果遇到不良的绘制速度性能,或在金字塔显示比例范围内需要更密集的数据点,请考虑更改 terrain 金字塔的参考比例。

  • 更改现有金字塔等级的分辨率时,可能还需要添加或移除金字塔等级,这可通过使用添加 Terrain 金字塔移除 Terrain 金字塔来完成。

  • 如果在 SDE 数据库中使用,则输入 terrain 将无法注册为版本。

参数

标注说明数据类型
输入 Terrain

待处理的 terrain 数据集。

Terrain Layer
旧的参考比例

现有金字塔等级的参考比例。

Long
新的参考比例

金字塔等级的新参考比例。

Long

派生输出

标注说明数据类型
更新后的输入 Terrain

更新后的 terrain。

地形图层

arcpy.ddd.ChangeTerrainReferenceScale(in_terrain, old_refscale, new_refscale)
名称说明数据类型
in_terrain

待处理的 terrain 数据集。

Terrain Layer
old_refscale

现有金字塔等级的参考比例。

Long
new_refscale

金字塔等级的新参考比例。

Long

派生输出

名称说明数据类型
derived_out_terrain

更新后的 terrain。

地形图层

代码示例

ChangeTerrainReferenceScale 示例 1(Python 窗口)

下面的示例演示了如何在 Python 窗口中使用此工具。

arcpy.env.workspace = 'C:/data'
arcpy.ChangeTerrainReferenceScale_3d('terrain.gdb/terrainFDS/terrain1', 
                                   1000, 2000)
ChangeTerrainReferenceScale 示例 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.AppendTerrainPoints_3d(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.ChangeTerrainResolutionBounds_3d(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)

许可信息

  • Basic: 需要 3D Analyst
  • Standard: 需要 3D Analyst
  • Advanced: 需要 3D Analyst

相关主题