Getting Height value of vertices in a polyline

1444
8
Jump to solution
11-26-2021 03:23 AM
Labels (1)
matu89
by
New Contributor II

hey,

i made a polyline that has 29 vertices i want to get the height value for each vertex..

is there a way to do that ?

see image attached:

 

matu89_0-1637925782790.png

 

thanks.

 

 

0 Kudos
1 Solution

Accepted Solutions
LeePenney
New Contributor II

Do you have a raster with elevation data handy? If so, you can use the following workflow:

1. Run the Feature Vertices to Points tool. This will give you a new point layer to work with.

2. Run the Extract Values to Points tool on your new point layer and use your elevation raster. This will create yet another new feature layer. These new points will have the elevation data in their attribute table and you can calculate away!

The disadvantage of this is that your original line layer will not have the point info itself, but you can probably link the information somehow through Spatial Join or some other table-based operation.

View solution in original post

0 Kudos
8 Replies
DanPatterson
MVP Esteemed Contributor

two solutions here

Solved: Trying to access coordinates of the vertices in po... - Esri Community

just add 

pnt.Z

to the geometry properties needed


... sort of retired...
0 Kudos
matu89
by
New Contributor II

I'm a bit confused..

Where do I need to paste this code ?

Do I need first to create a new feild ?

I think first I need to see 29 lines of my vertices in the attribute table no?

Thanks..

0 Kudos
DanPatterson
MVP Esteemed Contributor

putting the z values in a table wouldn't be an option, the suggestions produce a new file.

What do you want to do with the Z values?


... sort of retired...
0 Kudos
matu89
by
New Contributor II

What do u mean by producing a new file?

It creates a new feature class ?

How do I execute the code ?

Eventually I want to list those z values inside the attribute table (if it's possible) and make a calculations with them...

 

0 Kudos
LeePenney
New Contributor II

Do you have a raster with elevation data handy? If so, you can use the following workflow:

1. Run the Feature Vertices to Points tool. This will give you a new point layer to work with.

2. Run the Extract Values to Points tool on your new point layer and use your elevation raster. This will create yet another new feature layer. These new points will have the elevation data in their attribute table and you can calculate away!

The disadvantage of this is that your original line layer will not have the point info itself, but you can probably link the information somehow through Spatial Join or some other table-based operation.

0 Kudos
matu89
by
New Contributor II

Thanks!

it works!

 

DanPatterson
MVP Esteemed Contributor
0 Kudos
sjones_esriau
Esri Contributor

You can also look at the Geometry tab in the attributes pane to quickly review vertex Z values.

sjones_esriau_0-1638163687762.png

 

0 Kudos