Calculate Z values of 3D Polyline for new vertices

2262
3
08-11-2016 08:10 AM
PeterWilson
Occasional Contributor III

I've created a 3D polyline from a 3D point feature class and then reshaped the polyline feature class to follow the meandering of the river thawleg (centreline). I would like to calculate the Z values for the new vertices that are added to the 3D polyline based on the existing vertices that already have Z values and the distance along the polyline as a linear proportion of the elevation drop. Is there a way that I can achieve the following in  python.

Points (Red) were used to create the 3D polyline

New vertices added through reshaping 3D Polyline

0 Kudos
3 Replies
ChrisDonohue__GISP
MVP Alum

Not to nitpick, but a thalweg is often not the same as a centerline. A thalweg is the lowest point in a waterbody and in a moving waterbody that meanders it will be found on the outside of the curve (not in the center).  Depending upon what your goal is of this analysis, that can throw things a bit if centerline data is used instead of thalweg location data.

Thalweg - Wikipedia, the free encyclopedia

thalweg_asymetrical.jpg

thalweg.jpg

images source:  Aerial Geologist: Thawing Thalweg

EDIT - added images from the link to help folks better visualize the spatial location of a thalweg.

Chris Donohue, GISP

NeilAyres
MVP Alum

Well, once you have moved or inserted vertices, the only way is to re-interpolate the elevation from the dem using interpolate shape. To calculate an elevation from the vertex before and after would be a mistake surely? What if you have reshaped a small segment of line to better follow the stream bottom (which is what you appear to be doing).

So without the original dem, where are the elevations coming from?

The line segment geom object could be fed into Interpolate shape to create an in_memory fc, then update the original from that.

ChrisDonohue__GISP
MVP Alum

There is a Python Code sample in the help section for Interpolate Shape that may be use.  Note that it requires access to the 3D Analyst extension.

Interpolate Shape—Help | ArcGIS for Desktop

Chris Donohue, GISP