<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Several weeks back, Helena gave a very good explanation of how r.walk actually works. It makes very good sense (see below). However, from this explanation, it is clear that lambda and a friction map should be *optional* rather than *required* as they are now.&nbsp;<div><br></div><div>The main part of r.walk calculates the time (in seconds) needed to walk across a landscape.&nbsp;</div><div><br></div><div>For any cell,&nbsp;</div><div><br></div><div>total time = (walking time in seconds to traverse the cell given its slope) + (lambda * friction map)</div><div><br></div><div>Lambda is a weighting coefficient to convert the friction map to units that match the costs due to slope (i.e., units in seconds normally).</div><div><br></div><div>If you want to calculate walking time to traverse a landscape that is based solely on the topography (i.e., slope), then you need a friction map with a value of 0; lambda can be anything.</div><div><br></div><div>So this should be optional. Currently, you need to create a 0 friction map and try to figure out what lambda should be in order to run r.walk. This is sort of pointless and can cause considerable confusion.</div><div><br></div><div>So, can lambda and friction map be changed to optional arguments for our upcoming releases?</div><div><br></div><div>Thanks</div><div>Michael<br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><div><div>____________</div></div></div></div></div></div></span></div></span></div></span> </div><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="4" color="#000000" style="font: 13.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="4" style="font: 13.0px Helvetica">Michael Barton &lt;<a href="mailto:michael.barton@asu.edu">michael.barton@asu.edu</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="4" color="#000000" style="font: 13.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="4" style="font: 13.0px Helvetica">October 10, 2008 9:27:46 PM GMT-07:00</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="4" color="#000000" style="font: 13.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="4" style="font: 13.0px Helvetica">Helena Mitasova &lt;<a href="mailto:hmitaso@unity.ncsu.edu">hmitaso@unity.ncsu.edu</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="4" color="#000000" style="font: 13.0px Helvetica; color: #000000"><b>Cc: </b></font><font face="Helvetica" size="4" style="font: 13.0px Helvetica">grass developers &lt;<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>>, Ullah Isaac &lt;<a href="mailto:Isaac.Ullah@asu.edu">Isaac.Ullah@asu.edu</a>>, <a href="mailto:David.Quixal@uv.es">David.Quixal@uv.es</a>, Sean Bergin &lt;<a href="mailto:Sean.Bergin@asu.edu">Sean.Bergin@asu.edu</a>>, Moreno Martín Andrea &lt;<a href="mailto:andrea.moreno@uv.es">andrea.moreno@uv.es</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="4" color="#000000" style="font: 13.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="4" style="font: 13.0px Helvetica"><b>Re: [GRASS-dev] default for r.walk</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div>Thanks very much for this thorough explanation Helena. It is quite helpful. I hope that Roberto can verify (or correct) this.<br><br>I'm copying some folks who have been working with r.walk recently. Our lab discussions on this caused me to raise these questions.<br><br>On the issue I first asked about, it seems that lambda should either 1) have a default value of 1 or 2) be optional.<br><br>Michael<br><br><br>On Oct 10, 2008, at 6:09 PM, Helena Mitasova wrote:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">On Oct 10, 2008, at 7:39 PM, Michael Barton wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Oct 10, 2008, at 11:32 AM, Helena Mitasova wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I opened the code and it has it right in header:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">TOTAL COST = [(WALKING ENERGY ) + (LAMBDA*FRICTION)]<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">maybe this is how it should go into the man page<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">That seems like a good idea.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">This suggests that friction and lambda should be in some kind of energy units.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">However, as I understand it, the values in an r.walk map--using the default values--are an estimate of the number of seconds to traverse a cell walking 'normally' (i.e., according to the default values). Is this true anyone? If so, wouldn't the additive friction need to be in time units?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'm not trying to be dense, but trying to get clear about what the output is actually telling us, since it does not seem to be in arbitrary units like r.cost is (unless you do some numerical massaging).<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">these are perfectly valid questions - authors should probably answer them rather than me<br></blockquote><blockquote type="cite">but we tried to put some explanation based on the manual in to the appendix of GRASSbook<br></blockquote><blockquote type="cite">and I have just covered it in the class so I had to spend some time trying to understand it.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">the units are - according to the manual - time - see below<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">S, H are meters but the coefficients a,b,c,d are 1/speed which is sec/meter &nbsp;giving you time in seconds,<br></blockquote><blockquote type="cite">then friction map can be either in units of time (sec) and lambda is unitless weight<br></blockquote><blockquote type="cite">or friction is unitless factor and lambda is in seconds which converts it to time.<br></blockquote><blockquote type="cite">So the results are in seconds - when you derive contours from the results you will get isochrones -<br></blockquote><blockquote type="cite">so you can delineate an area where the person gets within 2 hours or whatever time you chose.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">But it would be really good to hear from the authors because these are my interpretations<br></blockquote><blockquote type="cite">of the manual and my experiments with the module. The man page is pretty good it just needs to be more clear that the cost is measured by time (if I understand it correctly)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Helena<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">T= [(a)*(Delta S)] + [(b)*(Delta H uphill)] + [(c)*(Delta H moderate downhill)] + [(d)*(Delta H steep downhill)]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">where:<br></blockquote><blockquote type="cite">T is time of movement in seconds,<br></blockquote><blockquote type="cite">Delta S is the distance covered in meters,<br></blockquote><blockquote type="cite">Delta H is the altitude difference in meter.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The a, b, c, d parameters take in account movement speed in the different conditions and are linked to:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;* a: underfoot condition (a=1/walking_speed)<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;* b: underfoot condition and cost associated to movement uphill<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;* c: underfoot condition and cost associated to movement moderate downhill<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;* d: underfoot condition and cost associated to movement steep downhill<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It has been proved that moving downhill is favourable up to a specific slope value threshold, after that it becomes unfavourable. The default slope value threshold (slope factor) is -0.2125, corresponding to tan(-12), calibrated on human behaviour (>5 and &lt;12 degrees: moderate downhill; >12 degrees: steep downhill). The default values for a, b, c, d are those proposed by Langmuir (0.72, 6.0, 1.9998, -1.9998), based on man walking effort in standard conditions.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The lambda parameter of the linear equation combining movement and friction costs:<br></blockquote><blockquote type="cite">total cost = movement time cost + (lambda) * friction costs<br></blockquote><blockquote type="cite">must be set in the option section of r.walk.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Michael<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">On Oct 10, 2008, at 2:21 PM, Michael Barton wrote:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I've been emailing with Helena to try to understand exactly how lambda and a friction surface interacts with information about topography (extracted from a DEM) in r.walk. It seems a good idea to put this back on the list. Perhaps I'm the only one a little in the dark, but maybe it can help others.<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">On Oct 10, 2008, at 10:40 AM, Helena Mitasova wrote:<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">To clarify for me, is it<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">total cost = (movement time cost + lambda) * friction costs<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">OR<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">total cost = movement time cost + (lambda * friction costs)<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I did not look into the code but if there are no brackets in the code, this second interpretation applies.<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">For anyone familiar with the code, is this the case? If so, should I be thinking in time units for creating a friction map? If I remember, r.walk normally outputs in seconds to traverse the cell.<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">So, should the friction map be in additional seconds to traverse the cell? Or is friction a weighting factor (i.e., multiplicative rather than additive)?<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Thanks<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Michael<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br></div></body></html>