How to find the highest and lowest point of a polyline

1912
6
10-16-2019 05:51 AM
Liliaaaaaa
New Contributor III

Hi fellas,

I have a line feature, also have a DEM, just want to extract the highest and lowest points of this line. I will need to get the coordinates of the highest and lowest points of this line, to compare with the existing highest and lowest points data. Any suggestions?

(Please find the demo data as screenshot)

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

Did you try extract by mask, using the polyline as the mask?

Make sure you set the extent and cell size to match those of the input raster

0 Kudos
Liliaaaaaa
New Contributor III

Thank you Dan, I have tried and it does work if I have small amount of lines. But this case I have lots of lines and I will need to find the highest and lowest points of each line. Any quicker ways to achieve it?

0 Kudos
DanPatterson_Retired
MVP Emeritus

How did you create your mask?  Did you use the feature ID when converting the polyline to raster?  You should then have a raster version of your polylines with unique ids and nodata between them.  The result should be a raster which you can use for the mask

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Hi Lilia,

You can convert the polyline to points using the Feature Vertices to Points tool.  Then, if you have the Spatial Analyst extension, you can execute the Extract Values to Points.  This will provide the elevation in a field called RASTERVALU in the new output:

0 Kudos
Liliaaaaaa
New Contributor III

Thank you Jake, I found the "Feature Vertices To Points" does not have the function to find the highest or lowest? (as below copied from this tool's online help)

ALL —A point will be created at each input feature vertex. This is the default.
MID —A point will be created at the midpoint, not necessarily a vertex, of each input line or polygon boundary.
START —A point will be created at the start point (first vertex) of each input feature.
END —A point will be created at the end point (last vertex) of each input feature.
BOTH_ENDS —Two points will be created, one at the start point and another at the endpoint of each input feature.
DANGLE —A dangle point will be created for any start or end point of an input line, if that point is not connected to another line at any location along that line. This option does not apply to polygon input.

Do I still have to export the attribute of the points and compare the Z values of each pipeline?

Cheers,

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Choose the option ALL to export all of the polyline's vertices.  If you need to add more vertices to the line, you can run the Densify tool.  Once you create the point vertices feature class you will need to run the Extract Values to Points tool.  This will create a new output with the DEM values in a field called RASTERVALU. 

0 Kudos