I've got a polyline shapefile and a LIDAR elevation dataset. I've successfully used Add Surface Information (from 3D Analyst) to calculate the average slope (avg_slope) of each line segment. The problem is that all values are positive, no matter if the line is heading downhill or uphill. I've checked the geometry of the line segments to ensure that the starting points of the segments I believe are heading downhill are indeed at a higher elevation than the end points...and they are. When building a contour graph using the spatial analyst, it tells me the slope is downhill.
I'm working with a large set of lines, and I don't want to manually check each segment to see if it should have a positive (uphill) or negative (downhill) slope value. So,
- why doesn't this tool assign negative values for downhill lines, and
- what is an automatable process that will compute downhill segments as having negative slope values?
An alternative way of stating the question is: if a polyline had a segment running from point A (elevation 200 ft) to point B (elevation 100 ft) and another segment running back from point B to point A, the Add Surface Information tool would return the exact same value for avg_slope, when one should be positive (B to A, going uphill) and one should be negative (A to B, going downhill).
How do I achieve this result?