Update Feature Z (3D Analyst)

Summary

Updates the z-coordinates of 3D feature vertices using a surface.

Usage

  • Only features that entirely overlap the input surface will have their vertices updated. Features that do not overlap the surface will be skipped.

    Note:

    If the z-value obtained for a given vertex is outside of a geodatabase feature's spatial reference z-domain, the vertex's z-value will not be updated. Create a copy of the input features and specify an appropriate z-domain to process the affected features.

Parameters

LabelExplanationData Type
Input Features

The 3D features whose vertex z-values will be modified.

Feature Layer
Input Surface

The surface that will be used to determine the new z-value for the 3D feature vertices.

LAS Dataset Layer; Mosaic Layer; Raster Layer; TIN Layer
Interpolation Method
(Optional)

Interpolation method used in determining information about the surface. The available options depend on the data type of the input surface:

  • BILINEARAn interpolation method exclusive to the raster surface, which determines cell values from the four nearest cells. This is the only option available for a raster surface.
  • LINEAR Default interpolation method for a TIN, terrain, and LAS dataset. Obtains elevation from the plane defined by the triangle that contains the XY location of a query point.
  • NATURAL_NEIGHBORS Obtains elevation by applying area-based weights to the natural neighbors of a query point.
  • CONFLATE_ZMIN Obtains elevation from the smallest z-value found among the natural neighbors of a query point.
  • CONFLATE_ZMAX Obtains elevation from the largest z-value found among the natural neighbors of a query point.
  • CONFLATE_NEAREST Obtains elevation from the nearest value among the natural neighbors of a query point.
  • CONFLATE_CLOSEST_TO_MEAN Obtains elevation from the z-value that is closest to the average of all the natural neighbors of a query point.
String
Status Field
(Optional)

An existing numeric field that will be populated with values to reflect whether the feature's vertices were successfully updated. A value of 1 would be specified for updated features and 0 for features that were not updated. Features that partially overlap the surface will not be updated.

Field

Derived Output

LabelExplanationData Type
Updated Input Features

The updated 3D features whose vertex z-values have been modified.

Feature Layer

arcpy.ddd.UpdateFeatureZ(in_features, in_surface, {method}, {status_field})
NameExplanationData Type
in_features

The 3D features whose vertex z-values will be modified.

Feature Layer
in_surface

The surface that will be used to determine the new z-value for the 3D feature vertices.

LAS Dataset Layer; Mosaic Layer; Raster Layer; TIN Layer
method
(Optional)

Interpolation method used in determining information about the surface. The available options depend on the data type of the input surface:

  • BILINEARAn interpolation method exclusive to the raster surface, which determines cell values from the four nearest cells. This is the only option available for a raster surface.
  • LINEAR Default interpolation method for a TIN, terrain, and LAS dataset. Obtains elevation from the plane defined by the triangle that contains the XY location of a query point.
  • NATURAL_NEIGHBORS Obtains elevation by applying area-based weights to the natural neighbors of a query point.
  • CONFLATE_ZMIN Obtains elevation from the smallest z-value found among the natural neighbors of a query point.
  • CONFLATE_ZMAX Obtains elevation from the largest z-value found among the natural neighbors of a query point.
  • CONFLATE_NEAREST Obtains elevation from the nearest value among the natural neighbors of a query point.
  • CONFLATE_CLOSEST_TO_MEAN Obtains elevation from the z-value that is closest to the average of all the natural neighbors of a query point.
String
status_field
(Optional)

An existing numeric field that will be populated with values to reflect whether the feature's vertices were successfully updated. A value of 1 would be specified for updated features and 0 for features that were not updated. Features that partially overlap the surface will not be updated.

Field

Derived Output

NameExplanationData Type
out_feature_class

The updated 3D features whose vertex z-values have been modified.

Feature Layer

Code sample

UpdateFeatureZ example 1 (Python window)

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

arcpy.env.workspace = 'C:/data'

arcpy.UpdateFeatureZ_3d('lines_3d.shp', 'dsm.tif', status_field='Updated')
UpdateFeatureZ example 2 (stand-alone script)

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

'''****************************************************************************
       Name: Update Antenna Positions
Description: Updates antenna positions based on elevations from a surface.
****************************************************************************'''
# Import system modules
import arcpy

in_fc = arcpy.GetParameterAsText(1) # pt features representing antenna locations
surface = arcpy.GetParameterAsText(2) # surface used to modify feature Z values


try:
    if arcpy.Describe(surface).dataType in ('Raster', 'RasterLayer'):
        method = 'BILINEAR'
    else:
        method = 'CONFLATE_ZMAX'
    arcpy.ddd.UpdateFeatureZ(in_fc, surface, method)

except arcpy.ExecuteError:
    print(arcpy.GetMessages())

Related topics