1

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:

enter image description here

Points referring to specific segment have the same Object_ID and Length (column form river shapefile):

enter image description here

Now I'd like to calculate stream gradient using formula:

(segmentStartElevation-segmentEndElevation)/segmentLength

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 Length.

I've tried to figure it out, but don't know how to make those calculation.

Any ideas how to do that?

1

if you use "summarize table" (Statistics_analysis), you can ask the minimum and the maximum value for each ID, as well as mean length (or min or max length). This gives you all three needed values in the same row, so that you can compute the stream gradient. You can join this table with your segment at the end of the process, if needed.

1

This may be what the other answer is trying to say, I'm not familiar with the tool mentioned there.

Use Summary Statistics (Analysis) to get all the fields you need in one row in a new table. With the table you have now run this selecting RASTERVALU twice as a statistics field, one set to "min" one set to "max," then set Length as a statistics field... Then set Object_ID as your Case field. The new table should have everything you need!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.