Update Line Z value from Points

1030
2
06-11-2020 09:54 AM
ScottWagoner1
New Contributor II

I have a line feature with z enabled, but no elevation, it is a 0.  Each line has 2 vertices, one at the beginning and one at the end.

I have a point feature with z enabled and have elevation.  Each point is at the end of each line.

How can I add the point elevation to my line elevation?  I have tried a one to one spatial join.  That only gives 1 of the point's elevation data.  Which leaves me with a flat line, and not a sloped line.

I tried a one to many spatial join.  That gives me multiple lines with only 1 elevation.  I tried Points to Line, but that seemed to miss some of my points and not connect them correctly.  Update Feature Z will only accept a surface.

What workflow is there that can accomplish my goal?  I have access to all the extensions.

0 Kudos
2 Replies
KoryKramer
Esri Community Moderator

I'm not sure if there is an easier way, but you could try something like this:

https://pro.arcgis.com/en/pro-app/tool-reference/data-management/feature-vertices-to-points.htm

Since you already have elevation points that correspond with the start and end vertices of your line(s) (do they exactly correspond?  you might want to QA that using something like the Snap gp tool....) could you add a line ID field to the elevation points from a spatial join?

Then you have elevation points with a corresponding line ID.  Run Points To Line—Data Management toolbox | Documentation to create the 3d line with the correct elevations.

0 Kudos
by Anonymous User
Not applicable

This is a great problem.
GP Snap would be ideal it snapped in Z also but unfortunately its only 2D. Great enhancement idea there.

The vertices to points and back to lines is fine if the input lines are straight but the users image looks to have curves.

Python could probably do it, walking each lines vertices, searching for the elevation point then transferring the elevation to the vertex Z, but thats code...