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

Delete Terrain Points

Available with 3D Analyst license.

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

Summary

Deletes points within a specified area of interest from one or more features that participate in a terrain dataset.

Usage

  • Deleting points from an embedded feature class will invalidate the terrain. Run the Build Terrain tool after deleting points.

  • If the terrain is in an enterprise geodatabase, it must be registered as versioned.

Syntax

arcpy.ddd.DeleteTerrainPoints(in_terrain, data_source, polygon_features_or_extent)
ParameterExplanationData Type
in_terrain

The terrain dataset to process.

Terrain Layer
data_source
[data_source,...]

One or more feature classes from which points will be removed.

String
polygon_features_or_extent

Specifies the area from which points will be removed. A polygon feature class or an extent can be used.

If extent values are desired, use an arcpy.Extent object.

Feature Layer; Extent

Derived Output

NameExplanationData Type
derived_out_terrain

The updated terrain.

Terrain Layer

Code sample

DeleteTerrainPoints 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.DeleteTerrainPoints_3d("sample.gdb/featuredataset/terrain", 
                           "mass_pts_embed", "1379938 235633 1382756 237681")
DeleteTerrainPoints example 2 (stand-alone script)

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

'''**********************************************************************
Name: Delete Terrain Outliers
Description: Uses Locate Outliers to identify outlier points in 
             a terrain dataset, and eliminates the outliers from the 
             terrain with Delete Terrain Points.
**********************************************************************'''
# Import system modules
import arcpy
import exceptions, sys, traceback
from arcpy import env

try:
    arcpy.CheckOutExtension('3D')
    # Set Local Variables
    env.workspace = 'C:/data'
    terrain = 'test.gdb/featuredataset/sample_terrain'
    terrainPt = 'elevation_pts' # name of terrain point data source
    outliers = 'in_memory/outliers'
    # Execute LocateOutliers
    arcpy.ddd.LocateOutliers(terrain, outliers, 'APPLY_HARD_LIMIT', -10, 
                             350, 'APPLY_COMPARISON_FILTER', 1.2, 120, 
                             0.8, 8000)
    # Execute Delete Terrain Points
    arcpy.ddd.DeleteTerrainPoints(terrain, terrainPt, outliers)
    arcpy.CheckInExtension('3D')
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)

Environments

  • Current Workspace
  • Scratch Workspace
  • 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

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