I have a road feature class (not currently Z enabled), and a contour feature class (which has elevations as an attribute).

How can I generate the 3d length of roads as an attribute?


  • ArcGIS Desktop 10.3.1
  • Extensions: 3D Analyst, Network Analyst
  • 5000 road features

For illustration purposes, I have generated a point feature class that is the intersection of the road and the contours.

road FC and contour FC

For bonus points: is '3d length' the correct term?


"You need a surface (not contours) to calculate this in ArcGIS. The tool is called Add Surface Information, and for polylines it will return the 3d length (surface length) of the line. If you do not have the DEM originally used to derive the contours, you can interpolate a new DEM from the contours using the Topo to Raster tool. Otherwise, just use the original DEM the contours came from." ref

See this video. https://www.youtube.com/watch?v=vPk93VfydB4 The gist of it is that you need to pass the line to a geoprocessing tool from the 3D Analyst Toolbox called "Add Surface Information"

If you are looking for a direct way to measure distance over topo lines, you are really asking about "Slope Distance" or "Ground Distance", at which point you have to intersect the lines, get the start and end elevation, the length of the segment, and apply some simple Pythagorean math to accomplish this. Visit this page for details on the math part.

Either of these options can be done programmatically using Python or in either desktop clients (ArcMap, Pro).

  • Edit your question to give a few more details on how you wish to implement this given the answer provided. Are you looking for UI or a programmatic approach? do you have a script started? – Ben S Nadler Aug 15 '16 at 22:24
  • Ben, your answer was extremely helpful. Thanks. I did it the 3d analyst way, then checked it by doing the math manually. Worked like a charm. I plan to do it programmatically with python tomoŕrow. Will update the question and give more details then. – Wilson Aug 16 '16 at 0:54

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.