Add Z Information (3D Analyst)

Summary

Adds information about elevation properties of features in a Z-enabled feature class.

Each 3D shape is examined and the selected properties are appended to the attribute table of the input feature class. The output options vary based on the feature's geometry.

Usage

  • The following Z properties are available:

    Feature GeometryZ Properties

    Point

    Z value of the point.

    Multipoint

    Point count and minimum, maximum, and mean Z values of all points in the multipoint record.

    Polyline and Polygon

    Vertex count and 3D distance of the line or polygon perimeter.

    Minimum, maximum, and mean of the Z value and slope of the line or polygon perimeter.

    Multipatch

    Surface area and volume of a closed multipatch.

    Minimum, maximum, and mean of the Z value and slope along the multipatch surface.

  • Slope is returned as a percentage value, or grade, and is calculated differently for each geometry type that supports this property.

    • Slope values for line features and polygon perimeters are calculated along each segment:
      • Minimum slope is obtained from the segment whose value is closest to 0, or horizontal grade.
      • Maximum slope is obtained from the segment with the largest calculated value.
      • Average slope is obtained by averaging the slope of all line segments after weighing each segment by its 3D length. This results in longer segments having greater influence over shorter segments.
    • Slope values for multipatch features are calculated for each triangle face.
      • Minimum slope is obtained from the face whose value is closest to 0, or horizontal grade.
      • Maximum slope is obtained from the face with the largest value.
      • Average slope is obtained by averaging the slope of all triangle faces after weighing each segment by its 3-dimensional area. This results in larger areas having greater influence on the resulting value over smaller ones.
    • Slope values for polygon features are calculated along the edges using the same technique applied for line segments.
  • Volume can only be computed for closed multipatches. An open multipatch feature will return a value of 0.0. On the Solaris platform, a design limitation currently prevents the tool from determining if a multipatch is closed, resulting in volume measurements being calculated for all multipatches under the assumption they are closed.

Parameters

LabelExplanationData Type
Input Features

The input features to process.

Feature Layer
Output Property

The Z properties that will be added to the attribute table of the input feature class. The following options are available:

  • Spot Z —Spot elevation of single-point feature.
  • Point Count —Number of points in each multipoint feature.
  • Lowest Z —Lowest Z value found in each multipoint, polyline, polygon, or multipatch feature.
  • Highest Z —Highest Z value found in each multipoint, polyline, polygon, or multipatch feature.
  • Average Z —Average Z value found in each multipoint, polyline, polygon, or multipatch feature.
  • 3-Dimensional Length —3-dimensional length of each polyline or polygon feature.
  • Surface Area —Total area of the surface of a multipatch feature.
  • Vertex Count —Total number of vertices in each polyline or polygon feature.
  • Lowest Slope —Lowest slope value calculated for each polyline, polygon, or multipatch feature.
  • Highest Slope —Highest slope value calculated for each polyline, polygon, or multipatch feature.
  • Average Slope —Average slope value calculated for each polyline, polygon, or multipatch feature.
  • Volume —Volume of space enclosed by each multipatch feature.
String
Noise Filtering
(Optional)

An optional numeric value used to exclude portions of features from the resulting calculations. This can be useful when the 3D input contains relatively small features with extreme slopes which may bias statistical results. If the 3D input's linear units are meters, specifying a value of 0.001 will result in the exclusion of lines or polygon edges that are shorter than 0.001 meters. For multipatch features, the same value will result in the exclusion of its subparts that have an area less than 0.001 square meters. This parameter does not apply to point and multipoint features.

String

Derived Output

LabelExplanationData Type
Updated Input Features

The updated Z-enabled feature class.

Feature Layer

arcpy.ddd.AddZInformation(in_feature_class, out_property, {noise_filtering})
NameExplanationData Type
in_feature_class

The input features to process.

Feature Layer
out_property
[out_property,...]

The Z properties that will be added to the attribute table of the input feature class. The following options are available:

  • ZSpot elevation of single-point feature.
  • POINT_COUNTNumber of points in each multipoint feature.
  • Z_MINLowest Z value found in each multipoint, polyline, polygon, or multipatch feature.
  • Z_MAXHighest Z value found in each multipoint, polyline, polygon, or multipatch feature.
  • Z_MEANAverage Z value found in each multipoint, polyline, polygon, or multipatch feature.
  • LENGTH_3D3-dimensional length of each polyline or polygon feature.
  • SURFACE_AREATotal area of the surface of a multipatch feature.
  • VERTEX_COUNTTotal number of vertices in each polyline or polygon feature.
  • MIN_SLOPELowest slope value calculated for each polyline, polygon, or multipatch feature.
  • MAX_SLOPEHighest slope value calculated for each polyline, polygon, or multipatch feature.
  • AVG_SLOPEAverage slope value calculated for each polyline, polygon, or multipatch feature.
  • VOLUMEVolume of space enclosed by each multipatch feature.
String
noise_filtering
(Optional)

An optional numeric value used to exclude portions of features from the resulting calculations. This can be useful when the 3D input contains relatively small features with extreme slopes which may bias statistical results. If the 3D input's linear units are meters, specifying a value of 0.001 will result in the exclusion of lines or polygon edges that are shorter than 0.001 meters. For multipatch features, the same value will result in the exclusion of its subparts that have an area less than 0.001 square meters. This parameter does not apply to point and multipoint features.

String

Derived Output

NameExplanationData Type
output_feature_class

The updated Z-enabled feature class.

Feature Layer

Code sample

AddZInformation example 1 (Python window)

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

arcpy.env.workspace = 'C:/data'
arcpy.AddZInformation_3d('lines_3D.shp', 'Z_MEAN; LENGTH_3D; AVG_SLOPE', 
                        'NO_FILTER')
AddZInformation example 2 (stand-alone script)

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

'''******************************************************************
Name: AddZInformation Example
Description: This script demonstrates AddZInformation on all 
             z-aware features in a target workspace.
******************************************************************'''
# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = 'C:/data'
# Create list of feature classes
fcList = arcpy.ListFeatureClasses()
if fcList:
    for fc in fcList:
        desc = arcpy.Describe(fc)
        if desc.hasZ:
            # Set Local Variables
            noise = 'No_Filter'
            if desc.shapeType == 'Polygon':
                Prop = ['Z_MIN', 'Z_MAX', 'VERTEX_COUNT']
            elif desc.shapeType == 'Point':
                Prop = 'Z'
            elif desc.shapeType == 'Multipoint':
                Prop = ['Z_MIN', 'Z_MAX', 'Z_MEAN']
            elif desc.shapeType == 'Polyline':
                Prop = 'LENGTH_3D'
            print('Completed adding Z information.')
            # Execute AddZInformation
            arcpy.AddZInformation_3d(inFC, Prop, noise)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics