I have a large data set of points, all of which lie on a river network and have x, y co-ordinates. I want to calculate the slope of the river channel at each point from the underlying DEM by taking the elevation at each point and the elevation of a point on the network 1km upstream. The best way I can think of doing this is by creating a line upstream from each point that stops when it reaches 1km away (obviously the line will not be straight in most instances), then create a point at the end of that line. I guess the flow direction or accumulation layer could be used to draw the line in the correct direction (upstream) from each point but I don't know where to start!

  • 1
    You can use Extract multi values to points to get the elevation at certain points. Your method of getting the upstream point is not likely to work; one point downstream have many different points/routes upstream. Even if you select the steepest path your not guaranteed to end up with a point that lies within your river at 1 km upstream. Maybe you can create a line feature in the river to trace backwards and pick a point close to it?
    – Martin
    Commented Feb 21, 2014 at 14:13
  • Have a look at RivEX it has tools for generating u/s and d/s line segments based upon points snapped to a river network.
    – Hornbydd
    Commented Jan 29, 2015 at 20:28

1 Answer 1


This is a little difficult because of the branching nature of stream networks. Over 1km you will likely need your solution to be able to make a choice of which branch/tributary to trace up. I suggest calculating Horton stream order for your stream lines and then dissolving features based on the Horton order field. Once that is done you can create a point 1km upstream in python by using the shapely library and the .interpolate() function.

To calculate Horton order you can use GRASS or I have a messy script to calculate Horton order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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