Skip To Content

Feature To 3D By Attribute


Creates 3D features using height values derived from the attribute of the input features.


  • Supports point, multipoint, line, and polygon geometries.

  • Each feature's elevation will be derived from the value obtained in the specified height field. Line features can optionally provide a second height field. Using two height fields will result in each line feature starting from the Z-value obtained in the first height field and ending at the Z-value from the second height field. The heights for any intermediate vertices will be interpolated based on the slope of the line between the two endpoints.


FeatureTo3DByAttribute_3d (in_features, out_feature_class, height_field, {to_height_field})
ParameterExplanationData Type

The features that will be used to create 3D features.

Feature Layer

The feature class that will be produced by this tool.

Feature Class

The field whose values will define the height of the resulting 3D features.


An optional second height field used for lines. When using two height fields, each line will start at the first height and end at the second (sloped).


Code sample

FeatureTo3DByAttribute example 1 (Python window)

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

arcpy.env.workspace = 'C:/data'
arcpy.FeatureTo3DByAttribute_3d('Points2D.shp', 'Points3D.shp', 'Elevation')
FeatureTo3DByAttribute example 2 (stand-alone script)

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

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

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

# Set Local Variables
InFC = 'Points_2D.shp'
Height_Field = 'POPULATION'

# Ensure output has unique name
OutFC = arcpy.CreateUniqueName('Points_3D.shp')

# Execute ConstructSightLines
arcpy.FeatureTo3DByAttribute_3d(InFC, OutFC, Height_Field)

Licensing information

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

Related topics