Constant gradient path between two points

1503
7
04-01-2014 08:20 AM
SamTaylor
New Contributor
Hello,

I have a DEM raster layer and am trying to find the shortest surface path between two points at different elevations but the path must have a constant gradient.  Has anyone done this before or have any suggestions of how I might tackle this problem?

Many thanks,

Sam
0 Kudos
7 Replies
GrljAles
Occasional Contributor
Using Contour Tool on the Slope raster might help you visualy indentify your path.  Using Path Distance and Cost Path could also do the job though i have some doubts about this tools.

Aleš
0 Kudos
SamTaylor
New Contributor
Hi thanks for the replies.  Yes sorry I don't mean constant gradient, what I mean is that it can only go downhill, not a mixture of up and down.  I'm trying to experiment with Path Distance and Cost Path but I'm not getting very far.

Sam
0 Kudos
GrljAles
Occasional Contributor
I just fugured out how it works; you don't need any input cost raster just surface raster, and vertical factor, use DEM for both and table provided in the link in my thread on similar topic. What you have to do is just to change the table values that correspond to the positive angles to act as a constraints. With Distance Raster and Backlink Raster produces by this tool go to Cost Path and you should have your path.
0 Kudos
SamTaylor
New Contributor
Thanks Aleš - I'm getting closer now. If I change the table to penalise (set all to 3) all positive gradients then I get an error in the Path Distance tool.  Does this mean it can't be done with my DEM?  If I change the table to be a linear function from 0 to 3 for angles above 0 then I get something close to what I want but do still have some uphills.  I need to bound it by the elevation of the two points i.e. the elevation along the path must be between the elevations of the source and destination points.

Perhaps I'll go with the path I have now and where it gets to one of the bounding elevations I will just follow that elevation level along the contour line until I get to the end point.

Sam
0 Kudos
GrljAles
Occasional Contributor
Hmmm,

I need to bound it by the elevation of the two points i.e. the elevation along the path must be between the elevations of the source and destination points.


Now I don't understand that completely, before you said that your path may not go uphill, but I understand this quote that it can but only through elevations higher than start/destination and lower than second start/destination.

To achieve that you can SetNull to all other elevations.
0 Kudos
SamTaylor
New Contributor
I just need it to generally be going downhill.  Hopefully the image below will help explain.  I'm trying to travel from point 1 to 0 gradually moving down.  So if this was a 2D problem in the z plane it would smoothly move from 1 down to 0.  The contour lines are marked on so I know roughly the path it should take.  I've been making progress setting my DEM to some high value outside of the areas I want the path to go in.  I still haven't quite sorted it though.   The path can't go outside the red contours which are just the contour lines corresponding the elevations of the two points.  The path can be as long as it needs just needs to be travelling down smoothly.

[ATTACH=CONFIG]32808[/ATTACH]
0 Kudos
GrljAles
Occasional Contributor
Have you tried reclassifying elevations just above starting point and just below destination (0.5 m) to no data (null) so there is no way the path will go there. Then you should change the weight values of the Tobler's table to I think -1 for angles from 0.1° to 90°. If you don't want the path to go down over very steep slopes then change also weights for angles from let's say 20° to 90° or whatever your max should be to -1.
0 Kudos