# 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. A value of -1 indicates the feature is vertical.

• 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.
• The mean z-value for polygon features is calculated in the same manner as line features. Polygon interiors are ignored, as only the boundary gets evaluated. The z-value at the midpoint of each segment is multiplied by the 3D length of that segment, and the product of all segments are added together. This sum is then divided by the total 3D length of the line feature or polygon boundary to produce the result.

• The mean z-value for each multipatch feature is calculated by multiplying the z-value at the mid-point of each triangle with the 3D area of that triangle. The product of all triangles in a given feature are added together then divided by the total 3D surface area of the multipatch feature to produce the result.

• 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

 Label Explanation Data Type Input Features The input features that will be processed. Feature Layer Output Property Specifies the z-properties that will be added to the attribute table of the input feature class.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 numeric value that will be 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

 Label Explanation Data Type Updated Input Features The updated z--enabled feature class. Feature Layer

`arcpy.ddd.AddZInformation(in_feature_class, out_property, {noise_filtering})`
 Name Explanation Data Type in_feature_class The input features that will be processed. Feature Layer out_property[out_property,...] Specifies the z-properties that will be added to the attribute table of the input feature class.Z—Spot elevation of single-point feature.POINT_COUNT—Number of points in each multipoint feature.Z_MIN—Lowest z-value found in each multipoint, polyline, polygon, or multipatch feature.Z_MAX—Highest z-value found in each multipoint, polyline, polygon, or multipatch feature.Z_MEAN—Average z-value found in each multipoint, polyline, polygon, or multipatch feature.LENGTH_3D—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.MIN_SLOPE—Lowest slope value calculated for each polyline, polygon, or multipatch feature.MAX_SLOPE—Highest slope value calculated for each polyline, polygon, or multipatch feature.AVG_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 numeric value that will be 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

 Name Explanation Data Type output_feature_class The updated z--enabled feature class. Feature Layer

### Code sample

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

``````arcpy.env.workspace = 'C:/data'
'NO_FILTER')``````

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

``````'''******************************************************************
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'