My name is Klemen. I work a lot with road networks in 3D GIS.
I would like to calculate an accurate slope for road network lines. I use the tool "Add Surface Information" (ArcGIS for Desktop).
As a result, in the areas of steeper slope, the slope value of road segment differs so much from the slope of underlying raster.
There is an example in the attached figure. We can see an area of 9 cells. The size of one cell is 5 x 5 meters. Red numbers represent the values of elevations (in meters) for each cell. Blue numbers represent the values of slope for each cell (in degrees). The green line is one road segment. It's length in 2D GIS is only 9,189 meters. The green segment crosses four cells. After using the tool "Add Surface Information", the result for 3D length is 10,99 meters and for average slope is 65,61 degrees. How can the value of average slope of road segment differ so much from the slope of raster cells (blue valus)??
I'm thinking that the solution of my problem could be the use of code in following support: How To: Calculate the instantaneous slope of a linear feature across a surface . I would like to use that code in ArcPy, but my colleagues told me, that the existing code is not written in ArcPy (my personal knowledge of Python is not good). Do you know this code in Python (ArcPy)? I would really like to try it.
Thank you very much!
It is not an appropriate calculation for your situation
Note that this calculation is different than finding the slope of the surface along the feature.
Even if you assumed an portioned slope calculation based on segment length, it would be much smaller.
If your intent is to identify slope along the line, then you need a much more detailed DEM. 5x5 m is pretty coarse in today's world and availability of data doesn't automatically mean it is appropriate for use.
Hi Dan! Thank you very much for your reply. I intend to use DEM 1x1 m, which is derived from Lidar data.
To calculate the slope of a road segment, should I use "Add Surface Information Tool" or any other script, maybe in Python?
Thank you very much!
If you are using a 1x1 m dem, you could try it. If there are segments that you are concerned about and not the whole road network, then you could densify the polyline at a spacing similar to the cell size and extract the information at those locations
Extract by Points—Help | ArcGIS Desktop then you can process the resultant
Update: Never mine! I figured it out. I needed to project the features to UTMs. Silly me! 🙂
Hi, I'm also trying to use the Average Slope function of the Add Surface Information tool, but I'm getting crazy slope numbers (in the thousands). I used too large a cell size (GTOPO30), but I don't understand why larger cell sizes would result in crazy slope values. Is it possibly a units problem? The documentation says slope is measured in percentage units, so I wouldn't expect anything greater than 100, or more realistically, 25, since the line feature are roads. Any help much appreciated. 🙂 -- Amy