I'm working on some project (in ModelBuilder) and of its element is calculating stream gradient.
I have shapefile with rivers, each segment have specific length. I want to calculate stream gradient in my model using ModelBuilder, but I have some problem with that.
I've created points on both ends of each river segment using
Feature Vertices to Points, then to those points added elevation from DEM using
Extract Values To Points.
It looks like that:
Points referring to specific segment have the same Object_ID and Length (column form river shapefile):
Now I'd like to calculate stream gradient using formula:
In other words if Object_ID is the same for two points I have to take elevation (here
RASTERVALU) of point with lower FID subtract from elevation of point with higher FID and divide by
I've tried to figure it out, but don't know how to make those calculation.
Any ideas how to do that?