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

LabelExplanationData 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 ZSpot elevation of single-point feature.
  • Point CountNumber of points in each multipoint feature.
  • Lowest ZLowest z-value found in each multipoint, polyline, polygon, or multipatch feature.
  • Highest ZHighest z-value found in each multipoint, polyline, polygon, or multipatch feature.
  • Average ZAverage z-value found in each multipoint, polyline, polygon, or multipatch feature.
  • 3-Dimensional Length3-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.
  • Lowest SlopeLowest slope value calculated for each polyline, polygon, or multipatch feature.
  • Highest SlopeHighest slope value calculated for each polyline, polygon, or multipatch feature.
  • Average SlopeAverage slope value calculated for each polyline, polygon, or multipatch feature.
  • VolumeVolume 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

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 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.

  • 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 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

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.ddd.AddZInformation('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.ddd.AddZInformation(inFC, Prop, noise)

Related topics