How To: Export a line to use for a profile in a graphical/charting program
Instructions provided describe how to convert a line feature to points for export to a table. The table can be used in charting or graphing programs to allow additional flexibility of a profile graph.
Follow the steps below to export line coordinates.
Add the surface and line data to ArcMap.
Convert the polylines to 3D:
A. Select Convert Features to 3D using the 3D Analyst toolbar. B. Select the line layer as the input. C. Select the surface as the Source of heights.
Convert the polylines to points with the ArcToolbox > Features toolset > Features to Points tool.
Note: Each vertex of every line is converted to a point with the elevation of the vertex assigned to the geometry of the output points.
Alternatively, use a sample script called 'shapes to points' from the Related Section below. This form driven tool exports the vertices of features in the selected point, polygon or line shapefile to a delimited ASCII table. This conversion enables the transfer of shapefile vector point, lines, or polygons to an interchangeable XY flat file format and the option to select another field.
Add the field to store the z-coordinate information.
Add the z-coordinate information to the table using the field calculator.
A. Right-click the field. B. Select Calculate Values. C. Click the Advanced check box. D. Enter the following code into the Pre-Logic VBA Script Code.
Code: Dim Output As Double Dim pPoint As IPoint Set pPoint = [Shape] Output = pPoint.Z
E. Enter 'Output' in the Field = box.
Export the attribute table to a DBF.
Open the DBF in a graphing/charting program to create the profile.