How can I replicate in ArcPy the 3D Analyst Toolbar operations which extract an elevation profile from a transect line drawn atop an elevation layer? This will be incorporated into an automated workflow that will loop ~500K times. Hence, streamlining is critical.
Here's the procedure using the toolbar:
- Point toolbar to the elevation layer
- Click 'Interpolate Line' to draw the cross-section
- Click 'Profile Graph' to generate the profile
- Right-click graph, 'Export', 'Data'
(Inputs: elevation layer, transect. Outputs: graph, XY table.)
Rather than manually drawing a transect, as in the toolbar functions, I need the ability to specify the transect start & end by entering coordinates. Similar to the tool, I want the output to be XY pairs (ideally a numpy array), with x=0 being the transect origin, X-values being distance from origin, and Y-values being elevation.