I am using ArcGIS Pro.

I want to draw a line at the starting and ending of elevation, and then use straight line interpolation to assign the rest of the line an elevation.

  • 1
    It is not possible!
    – nagib
    Sep 20 at 19:44

To achieve this you need 3D Analyst and also elevation model:

arcpy.InterpolateShape_3d("DEM", "ROADS", "in_memory/road_3d")
arcpy.AddGeometryAttributes_management("road_3d", "LINE_START_MID_END")
arcpy.FeatureTo3DByAttribute_3d("road_3d", "in_memory/LINEAR_3D", "START_Z", "END_Z")

So for the road shown:

enter image description here

it will result in:

enter image description here

Note: If you know elevations at line ends, you'll need just one tool, that is feature to 3d by attribute(s).

This is actually a very primitive way of 'DEM burning' used by many applications.

  • So if I have a line, I can create 2 new fields (elevation at start and end of line) and use this to create my line with 3D attributes? How could I then turn that line into say 20 points, with each point containing an elevation value?
    – jcholly
    Sep 20 at 21:31
  • Use feature vertices to points, add Z information. Two tools.
    – FelixIP
    Sep 20 at 21:55

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.