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:
thanks.
Solved! Go to Solution.
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.
two solutions here
Solved: Trying to access coordinates of the vertices in po... - Esri Community
just add
pnt.Z
to the geometry properties needed
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..
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?
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...
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.
Thanks!
it works!
Feature Vertices To Points (Data Management)—ArcGIS Pro | Documentation
then
Add Geometry Attributes (Data Management)—ArcGIS Pro | Documentation
to get the Z values and X, Y if needed
You can also look at the Geometry tab in the attributes pane to quickly review vertex Z values.