Summary
Instructions provided are steps to extract Z values from 3D data and write it into a point shapefile attribute table.
Procedure
The shapefile must have 3D point features. Following these steps to add Z values to the data:
- Create 3D points by deriving existing features height from a surface.
A. Add the 2D feature shapefile and the surface to a map or scene.
B. Click 3D Analyst > Convert > Features to 3D.
C. Click the Input Features dropdown arrow > specify the features to convert.
D. Click the Raster or TIN Surface button to set the source for the features' heights.
E. Click the dropdown arrow > specify the surface to use.
F. Optional, browse to the location to save the output feature class or shapefile.
G. Type the name of the output 3D feature class or shapefile.
H. Click OK.
- Add a numeric field to 3D point attribute table.
A. Click Options in the table where field will be added.
B. Click Add Field.
C. Type the name of the field.
D. Click the Type dropdown arrow and specify the field type.
E. Set any other field properties.
F. Click OK.
- Right-click on the new field heading > Calculate Values > Check on the Advanced box.
- In the pre-logic script edit box enter:
Code:
dim pGeometry as ipoint
set pGeometry = [shape]
- In the '<new fieldname> =' box enter:
Code:
pGeometry.z
- Click OK. The point Z geometry is added to the attribute field.