# Ensuring that a path goes downhill

GIS student hoping for a bit of wisdom on the Path Distance tool. I am doing a ski slope analysis, trying to find runs using cost grids (that incorporate slope, aspect, avalanche risk, etc.) While I am familiar with the cost distance tool for finding the path of lowest cost, I wanted to see if there is a way to find paths that are: 1) of lowest "cost" in terms of my cost grid, 2) always sloping downhill (or at least remaining flat). I have played with the path distance tool for a while now, and the documentation is limited. Is this the right tool to use? I've been setting the vertical factor parameters with my DEM to have a zero factor of 1, a low-cut angle of -90 degrees, and a high-cut angle of 0 degrees. This produces a grid containing only one cell, with value 0.

• I can only help with your 2nd q. Interpolate Shape (3d analyst required) to get Z for your lines. Export your line uphill ends and downhill ends using feature vertices to points (Start and End respectively, advanced license required), if your lines and thus points are 3d addXY will put the Z into the table for start and end points, then join the lines to the Start/End points. Lines where start.Z < end.Z will be flipped the wrong way. This method only checks the ends and will not tell you if the line goes over a hill in the middle... to check every vertex python or ArcObjects would be required. – Michael Stimson Apr 12 '17 at 21:56
• Always tag ArcMap questions with arcgis-desktop if you want them to reach that wide audience. – PolyGeo Apr 12 '17 at 22:02
• Thank you for the reply. If I understand your response correctly, you are suggesting that I create a spreadsheet giving the elevation value along each pixel of the ski run/path once a LCP has been created? This I have done, and it does generally maintain a downward slope throughout the path. However, I want to make sure that every portion of the run goes downhill, not just that the general pattern is downhill. Did I misunderstand your response or is there another way to achieve my goal? Cheers. – Oscar Lisa Apr 12 '17 at 22:05
• I'd raise avalanche risk areas N meters above existing terrain and run hydrlogical analysis on it. Flow direction will give you what is called back-link in cost paths. Put any number of skiers on the top and run cost paths. skiing – FelixIP Apr 12 '17 at 22:53
• I afraid that most of your route will eventually run along avalanche prone areas – FelixIP Apr 12 '17 at 23:05