## 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 Geometry Z 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.

- Slope values for line features and polygon perimeters are calculated along each segment:
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.

## Syntax

AddZInformation_3d (in_feature_class, out_property, {noise_filtering})

Parameter | Explanation | Data 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: - 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 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. The Area filter is made available when the input is a multipatch, whereas the Length filter is provided when the input is a line or polygon. | String |

## Code Sample

##### AddZInformation 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.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
import exceptions, sys, traceback
from arcpy import env
try:
arcpy.CheckOutExtension('3D')
# Set environment settings
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)
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

## Licensing Information

- ArcGIS for Desktop Basic: Requires 3D Analyst
- ArcGIS for Desktop Standard: Requires 3D Analyst
- ArcGIS for Desktop Advanced: Requires 3D Analyst