3

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,

  1. why doesn't this tool assign negative values for downhill lines, and
  2. 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?

  • 2
    Slopes calculated by the Add Surface Information are always absolute values. There are possible workarounds involving converting line vertices to points and making the difference between their respective Z, but you should provide more details about what you actually try to achieve, what version of ArcGIS and licence level you use, and the geometry of your lines. Are they straight lines or do they have many vertices? Do you need the slope between the start and end points or the slope for every single line segment? – GISGe Jul 11 '14 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.