1

I generated an idealized walking path between two points using terrain data and r.drain.

I'm attempting to visualize the pathway that may have connected two sites occupied in antiquity.
However, humans are of course not machines, and I could be missing a completely different path around a mountainous terrain because its "cost" is slightly higher than the ideal path, however, a human pathfinder may be completely oblivious to the more efficient path because the time savings is relatively meaningless.

Is there a way to iterate paths? To generate, for example, all the paths that fall within +/-10% of the travel time of the ideal path?

7
  • 1
    You might look at r.cost, which will provide a map of cumulative costs. This might help identify other likely-traveled paths. It also allows you to generalize your cost surface to include local slope (humans may avoid lots of elevation changes) or vegetation (e.g. easier to walk through desert than forest), or desirable features (perhaps humans were more likely to take paths along rivers or other waterbodies).
    – Jon
    Nov 6 '18 at 18:37
  • 1
    Would you mind detailing your proposed workflow a little more? I'm having a little trouble following (im pretty new to QGIS). So instead of using r.walk, use r.cost, and then r.drain on the output? I believe this would still get me just a single path, right?
    – BogBody
    Nov 7 '18 at 4:28
  • 1
    The short answer is that r.drain, as far as I can tell, will only ever give you a single path. You have two options: build a cost surface (just a raster where each cell has a cost value which you can set however you see fit) that you can adjust, or try to "block" r.drain from going down its selected path by adjusting the elevations along that path. A cost surface, or grid, will allow you flexibility to adjust costs and see how the optimal path changes as a function of the adjustments. It might be overkill, I don't know what your overall goal is.
    – Jon
    Nov 7 '18 at 23:54
  • 1
    Thanks, I appreciate you sticking with me, it's helping. I'm really hoping to be able to find a way to just iterate, or at least view, other routes. I mean, the algorithm itself must essentially brute force the cost raster, no? So it's trying most paths already, it's just hidden to the user. Is there some way to output all of those path attempts? I realize I can block the ideal path and run r.drain again, but that doesn't seem ideal, and is liable to give me erroneous paths and paths that aren't consistently repeatable for someone else.
    – BogBody
    Nov 8 '18 at 3:14
  • 1
    I have never used r.drain, but from scanning the documentation it seems unable to provide non-optimal paths. Look at the -d flag and using different algorithms to compute the "movement direction map." It's difficult to produce multiple paths from a single cost surface in a meaningful way: for example, say you've computed a path of least resistance or whatever, and you want the "path of second-most least resistance." In most cases, this path will not be a new path altogether, but the same as the first path with only a single pixel difference. This is why I suggest playing with the cost surface.
    – Jon
    Nov 8 '18 at 15:42

Your Answer

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

Browse other questions tagged or ask your own question.