Terrain To Points (3D Analyst)

Summary

Converts a terrain dataset into a new point or multipoint feature class.

Illustration

Terrain to Points Example

Usage

  • Points are extracted for the specified pyramid level resolution and area of interest.
  • If an embedded feature class is specified, the output points will only come from the embedded features. Otherwise, the output points will be derived from all points contributing to the terrain surface.
  • If an embedded feature contains lidar attributes, such as RGB, classification, or return values, the attributes will be written to the output feature class. However, the way the attributes are written will depend on the geometry type that is specified:

    • MULTIPOINT—Attributes will be stored in BLOB field.
    • POINT—Attributes will be stored in numeric fields.

Parameters

LabelExplanationData Type
Input Terrain

The terrain dataset that will be processed.

Terrain Layer
Output Feature Class

The feature class that will be produced.

Feature Class
Pyramid Level Resolution
(Optional)

The z-tolerance or window-size resolution of the terrain pyramid level that will be used. The default is 0, or full resolution.

Double
Input Embedded Feature Class
(Optional)

The name of the terrain dataset's embedded points to be exported. If an embedded feature is specified, only the points from the feature will be written to the output. Otherwise, all points from all data sources in the terrain will be exported.

String
Output Feature Class Type
(Optional)

The geometry of the output feature class.

  • MULTIPOINTThe output point features will be written to a multipoint feature class. This is the default.
  • POINTThe output point features will be written to a point feature class.
String

arcpy.ddd.TerrainToPoints(in_terrain, out_feature_class, {pyramid_level_resolution}, {source_embedded_feature_class}, {out_geometry_type})
NameExplanationData Type
in_terrain

The terrain dataset that will be processed.

Terrain Layer
out_feature_class

The feature class that will be produced.

Feature Class
pyramid_level_resolution
(Optional)

The z-tolerance or window-size resolution of the terrain pyramid level that will be used. The default is 0, or full resolution.

Double
source_embedded_feature_class
(Optional)

The name of the terrain dataset's embedded points to be exported. If an embedded feature is specified, only the points from the feature will be written to the output. Otherwise, all points from all data sources in the terrain will be exported.

String
out_geometry_type
(Optional)

The geometry of the output feature class.

  • MULTIPOINTThe output point features will be written to a multipoint feature class. This is the default.
  • POINTThe output point features will be written to a point feature class.
String

Code sample

TerrainToPoints example 1 (Python window)

The following sample demonstrates the use of this tool in the Python window:

arcpy.env.workspace = "C:/data"
arcpy.ddd.TerrainToPoints("sample.gdb/featuredataset/terrain", "terrain_points.shp", 
                         pyramid_level_resolution=6, out_geometry_type="POINT")
TerrainToPoints example 2 (stand-alone script)

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

'''*****************************************************************
Name: TerrainToPoints Example
Description: This script demonstrates how to use the 
             TerrainToPoints tool.
*****************************************************************'''
# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/data"

# Set Local Variables
terrain = "sample.gdb/featuredataset/terrain"
outPts = arcpy.CreateUniqueName("terrain_pts", "sample.gdb")
outGeo = "POINT"

# Execute TerrainToPoints
arcpy.ddd.TerrainToPoints(terrain, outPts, 6, "<NONE>", outGeo)

Related topics