ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Append Terrain Points

Available with 3D Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Appends points to a point feature referenced by a terrain dataset.

Usage

  • This tool will invalidate a terrain dataset. Run Build Terrain after adding points or multipoints.

  • If the terrain is in SDE, it must be registered as versioned.

Syntax

arcpy.ddd.AppendTerrainPoints(in_terrain, terrain_feature_class, in_point_features, {polygon_features_or_extent})
ParameterExplanationData Type
in_terrain

The terrain dataset to process.

Terrain Layer
terrain_feature_class

The feature class that contributes to the terrain dataset into which the points or multipoints will be added.

This parameter only requires the name of the feature class and not its full path.

String
in_point_features

The feature class of points or multipoints to add as an additional data source for the terrain dataset.

Feature Layer
polygon_features_or_extent
(Optional)

Specify a polygon feature class or arcpy.Extent object to define the area where point features will be added. This parameter is empty by default, which results in all the points from the input feature class being loaded to the terrain feature.

Extent; Feature Layer

Derived Output

NameExplanationData Type
derived_out_terrain

The updated terrain.

Terrain Layer

Code sample

AppendTerrainPoints example 1 (Python window)

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.AppendTerrainPoints_3d('sample.gdb/featuredataset/terrain', 
                           'existing_points', 'new_points.shp')
AppendTerrainPoints example 2 (stand-alone script)

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

'''****************************************************************************
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
from arcpy import env
import exceptions, sys, traceback

try:
    arcpy.CheckOutExtension("3D")
    
    # Set environment settings
    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()
    lasSR.factoryCode = 2272
    lasSR.create()
    
    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:
    # 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)

finally:
    arcpy.CheckInExtension("3D")

Environments

  • Current Workspace
  • Scratch Workspace
  • Extent
  • Auto Commit

Licensing information

  • Basic: Requires 3D Analyst
  • Standard: Requires 3D Analyst
  • Advanced: Requires 3D Analyst

Related topics

  • An overview of the Data Management toolset
  • Fundamentals of Surfaces
  • Surface formats
  • What is a terrain dataset?
  • Benefits of using terrain datasets
  • Types of source data supported in terrain datasets
  • Data import and load tools for terrain datasets

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal